7
我正在用Swagger文档记录API。我有几个共享一组通用属性的端点。我想使用$ ref引用该基本属性集,然后使用每个端点独有的附加属性扩展这些属性。我想象它会工作是这样的,但这是无效的:在Swagger文档中结合定义
"properties": {
"$ref": "#/definitions/baseProperties",
unique_thing": {
"type": "string"
},
"another_unique_thing": {
"type": "string"
}
}