使用该选项时,如何更改 Ansible 模板模块创建的文件的日期格式backup?
例如,命令:
template: src=supervisord.conf.j2 dest=/etc/supervisor/supervisord.conf backup=yes
创建备份文件:supervisord.conf.2015-08-24@12:17~
我希望它是这样的:supervisord.conf.20150824_1217
我有一个API,其curl请求如下:
curl --request POST \
--url 'http://some.url/api/Resource/findByIds' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'data[ids][]=100025' \
--data 'data[ids][]=100028'
Run Code Online (Sandbox Code Playgroud)
如何在 OpenAPI (Swagger) 请求定义和示例(版本 3)中表示这一点?
这是我到目前为止所拥有的,但我似乎无法让示例正确显示。
api/Resource/findByIds:
post:
summary: Find resource by IDs
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
data:
type: object
properties:
ids:
type: array
description: IDs of resources to fetch
items:
type: integer
encoding:
data:
style: deepObject
explode: true
example:
data:
ids: [2334, 234, 20043]
Run Code Online (Sandbox Code Playgroud)