【发布时间】:2020-03-11 07:19:37
【问题描述】:
我有一个 OpenAPI 3.0 架构,其中一个属性(taskRequireSkills 数组)需要引用另一个架构(TaskRequireUserSkill),如下所示:
components:
schemas:
Task:
properties:
id:
type: integer
name:
type: string
taskRequireSkills:
type: array
schema: # ERROR : bad indentation of a mapping entry
$ref: '#/components/schemas/TaskRequireUserSkill'
created_at:
type: string
format: datetime
TaskRequireUserSkill:
properties:
id:
type: integer
skill_id:
type: integer
skill_name:
type: string
ordering:
type: integer
created_at:
type: string
format: datetime
但我收到“映射条目的缩进错误”错误。 我想我的语法无效。 但哪种语法有效?
【问题讨论】:
标签: openapi