json schema 用于规范约束 json 的格式
主要关键字
- $schema
- $id
- type
- description
- title
- required
- definitions
类型
对象
"type": "object"
keywords
- maxProperties
- minProperties
- required
- properties
- patternProperties
- additionalProperties
- dependencies
- propertyNames
数组
"type": "array"keywords
- items
- additionalItems
- maxItems
- minItems
- uniqueItems
- contains
数字
keywords
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
字符串
keywords
- maxLength
- minLength
- pattern
逻辑
- allOf
- anyOf
- oneOf
- not
其他
- definitions
https://leafflow.top/2023/02/07/other/json-schema/