08b428ae96
* Add replaceOnChange to schema * replaceOnChange at generate time for resources * ReplaceOnChanges sees through optional types * Correctly deal with map,array,object,resource type This is responding to PR clarifications from @justinvp and @lblackstone. * Update CHANGELOG_PENDING.md * Detect recursively defined objects * Display recursion warning * Check which recursive structures fail * Add internal logic tests for replaceOnChanges * Add tests
42 lines
767 B
JSON
42 lines
767 B
JSON
{
|
|
"version": "0.0.1",
|
|
"name": "example",
|
|
"types": {
|
|
"example::Dog": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bone": {
|
|
"type": "string",
|
|
"replaceOnChanges": true
|
|
},
|
|
"cat": {
|
|
"$ref": "#/types/example::Cat"
|
|
}
|
|
}
|
|
},
|
|
"example::Cat": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fish": {
|
|
"type": "string",
|
|
"replaceOnChanges": true
|
|
},
|
|
"dog": {
|
|
"$ref": "#/types/example::Dog"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"resources": {
|
|
"example::Pets": {
|
|
"properties": {
|
|
"dog": {
|
|
"$ref": "#/types/example::Dog"
|
|
},
|
|
"cat": {
|
|
"$ref": "#/types/example::Cat"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|