如何引用与 属性 相同的架构?

How do I reference the same schema as a property?

我的 oas.yaml 文件中有以下内容:

components:
  schemas:
    ServiceError:
      type: object
      properties:
        Message:
          type: string
          description: "The exception message."
        ExceptionMessage:
          type: string
        Type:
          type: string
          description: "The exception type.""
        InnerError:
            $ref: '#/components/schemas/ServiceError'
             description: "If there's an inner exception, the InnerException.

    Property:
      type: object
      properties:
        Name:
          type: string
          description: Name of the property.

它不喜欢 "description: "If there's an inner exception, InnerException." 行,如果我删除它,它不喜欢行 "Property:"。我已经尝试了很多的事情,没有任何作用。我不明白什么?

  • a description 不允许出现在 $ref。参见
  • InnnerError 之前有两个 '"'。不确定这是否只是一个复制粘贴错误。