Can anyone suggest how to best go about setting up my schema correctly to take into account ‘explaining’ properties that are not as simple as a string|integer etc…
P.S Forgive me if this doesn’t make sense i’m still learning RAML.
For instance in the snippet below the ‘nodes’ is currently set as a ‘string’ that is ‘required’ but this is actually a object as illustrated in the example at the bottom of this post.
Can anyone give me any idea if this is possible or if I’m utilising this in the wrong way?
// part of schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "http://jsonschema.net",
"required": true,
"properties": {
"iID": {
"type": "integer",
"description": "ID of the zone (Read only)"
}
},
"nodes": {
"type": "string",
"required": true
}
}
The issue I have is how do I add the nodes to be structured in the following format as it isn’t a string but an object that is required (see below):
nodes : [{
"health" : 2,
"address" : "0xf26f7q3e:001"
}]