【发布时间】:2019-07-21 03:46:05
【问题描述】:
鉴于已经存在一个特殊的“类型”属性,它是一个保留关键字,有什么方法可以命名自定义属性“类型”。
components:
schemas:
element:
type: object
properties:
name:
type: string #type here is the keyword
type: #type here is the actual name of the property!
type: string
enum:
- radiogroup
- checkbox
无法修改生成 JSON 消息的后端系统以重命名属性。 谢谢。
【问题讨论】:
-
ps。原始 json 数据样本为:elements: [ { type: "radiogroup", name: "DentalQuestion2" } , { type: "checkbox", name: "DentalQuesiton3" } ]
标签: yaml swagger openapi surveyjs