1) 在编写 RAML 时,我可以在架构定义中使用嵌套吗?
例如:
schemas:
- DNSResponse: |
{
"type": "object",
"properties": {
"AnswerSection": {
"type": "array",
"items": (((I want a re-useable schema here. ex: ARecord)))
},
"AA": {"type": "boolean"},
"AD": {"type": "boolean"},
...
}
}
- ARecord: |
{
"type": "object",
"properties": {
"address": "string",
"ttl": "number",
"name": "string"
}
}
2) 我可以围绕一组可嵌套模式使用选择/枚举吗?
"items": [ARecord, MXRecord, PTRRecord, ...]