1) आरएएमएल लिखते समय, क्या मैं अपनी स्कीमा परिभाषा में घोंसले का उपयोग कर सकता हूं?आरएएमएल: नेस्टेड स्कीमा
उदाहरण के लिए:
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) मैं nestable स्कीमा का एक सेट के चारों ओर एक विकल्प/enum का उपयोग कर सकते हैं?
"items": [ARecord, MXRecord, PTRRecord, ...]
1) $ ref को एपीआई डिजाइनर या raml2html द्वारा पार्स नहीं किया गया है, इसलिए नेस्टेड आइटम की स्कीमा कभी नहीं दिखायी जाती है। 2) क्या आपके पास स्कीमा बढ़ाने के लिए एक लिंक है? मुझे '{" $ स्कीमा "के अलावा रैमल स्पेक में कोई उदाहरण नहीं दिख रहा है:" http://json-schema.org/draft-03/schema "}' – KFunk
1): "(इस मुद्दे की रिपोर्ट करें विभिन्न परियोजनाओं ... 2) https://github.com/joelittlejohn/jsonschema2pojo/wiki/Reference#extends –
यह $ ref। – Sam