Api蓝图文档中数据结构中的字符串
如果有人能告诉我是否可以在数据结构中描述字符串,我将不胜感激,因为我所写的(在下面的示例中)并没有发挥应有的作用。“Date”和“Point”在我的文档中的不同响应中重复了很多次,这就是为什么我考虑将其带到数据结构中。 在这种情况下,是否可以不获取对象而获取字符串Api蓝图文档中数据结构中的字符串,api,blueprint,apiblueprint,apiary.io,apiary,Api,Blueprint,Apiblueprint,Apiary.io,Apiary,如果有人能告诉我是否可以在数据结构中描述字符串,我将不胜感激,因为我所写的(在下面的示例中)并没有发挥应有的作用。“Date”和“Point”在我的文档中的不同响应中重复了很多次,这就是为什么我考虑将其带到数据结构中。 在这种情况下,是否可以不获取对象而获取字符串 + Response 200 (application/json) + Attributes + Date (Date) + Point (Point) + id: 123 (n
+ 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
}
您需要将日期和点定义为字符串:
## Date (string)
以下是您的示例:
FORMAT: 1A
# Stackoverflow 60415996
## Path [/]
### Verb [GET]
+ Response 200 (application/json)
+ Attributes
+ Date (Date)
+ Point (Point)
+ id: 123 (number)
# Data Structures
## Date (string)
### Sample
2019-05-12T04:55:00-01
### Sample
01.01.2019
### Sample
2019-01-01
## Point (string)
### Sample
(35.7545174,38.9170445)
结果如下:
您可以在和中找到许多示例非常感谢!身体里看起来像“2019-05-12T04:55:00-01\n\n”这样的东西可以吗?不幸的是,这是API蓝图解析器起草程序中的一个bug(跟踪地址为)