【发布时间】:2020-02-26 14:22:02
【问题描述】:
如果有人能告诉我是否可以在数据结构中描述一个字符串,我将非常感激,因为我正在编写的内容(在下面的示例中)无法正常工作。 “日期”和“点”在我的文档中以不同的响应重复了很多次,这就是为什么我考虑将它带到数据结构中的原因。 在这种情况下,甚至有可能得到一个字符串而不是对象吗?
+ Response 200 (application/json)
+ Attributes
+ Date (Date)
+ Point (Point)
+ id: 123 (number)
# Data Structures
## Date
+ Date: `01.01.2019` (string) - or "2019-01-01"
## Point
+ Point: `(35.7545174,38.9170445)` (string)
这给了我在正文中的以下结构:
{
"Date": {
"Date": "01.01.2019"
},
"Point": {
"Point": "(35.7545174,38.9170445)"
},
"id": 123
}
但我需要这个:
{
"Date": "01.01.2019",
"Point": "(35.7545174,38.9170445)",
"id": 123
}
【问题讨论】:
标签: api blueprint apiblueprint apiary.io apiary