Swagger递归定义在Swagger编辑器中呈现为“未定义”

时间:2017-03-16 19:26:13

标签: swagger swagger-editor

我正在使用http://editor.swagger.io minimal.yaml示例来定义MenuItem,其submenuitem属性array递归地引用MenuItem。但我得submenuitemundefined。什么可能是错误的指针?

enter image description here

---
swagger: '2.0'
info:
  version: 0.0.0
  title: Simple API
paths:
  /:
    get:
      responses:
        200:
          description: OK
definitions:
 MenuItem: 
       properties: 
        submenuitem: 
          items: 
            $ref: "#/definitions/MenuItem"
          title: SubMenuItem
          type: array
        display_name: 
          minLength: 2
          title: "Link display name"
          type: string

0 个答案:

没有答案