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