以下 MSON 如何输出具有“格式”:“日期时间”的模式,类似于下面所述?
女士:
FORMAT: 1A
# Some API
## series [/api/v1/series]
Returns a list of series.
### View all series [GET]
+ Response 200 (application/json; charset=utf-8)
+ Attributes
+ CreatedAt (required, string)
获得的 Json Schema:
{
"type": "object",
"properties": {
"CreatedAt": {
"type": "string"
}
},
"required": [
"CreatedAt"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
所需的模式(注意“格式”字段):
{
"type": "object",
"properties": {
"CreatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"CreatedAt"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}