这是可能/正确的(在swagger ui中显示确定,但代码生成空类):
definitions:
name_and_abn:
type: object
properties:
name:
$ref: "#/definitions/entityName"
abn:
$ref: "#/definitions/abn"
abn:
type: string
minLength: 11
maxLength: 11
pattern: "^[0-9]{11}$"
entityName:
type: string
maxLength: 1000
pattern: '^[a-zA-Z][a-zA-Z0-9-_\.]{1,50}$'
如果没有,有没有办法可以在OpenApi3中重用字段定义?
换句话说,对象是唯一可以从架构对象引用($ ref)的类型吗?
由于