我正在使用Swagger文档记录API。 我有几个端点共享一组基本属性。 我想使用$ref引用该基本属性集,然后使用每个端点独有的其他属性来扩展这些属性。 我认为它应该像这样工作,但这是无效的:
"properties": {
"$ref": "#/definitions/baseProperties",
unique_thing": {
"type": "string"
},
"another_unique_thing": {
"type": "string"
}
}