Closed kvskkvsk closed 1 year ago
Is there any way to get the full schema with all loaded data by $ref without data validation?
For example: Loading schemaParent.json with some $ref
{ "type": "object", "required": [ "field1" ], "additionalProperties": false, "properties": { "field1": { "allOf": [ { "$ref": "./schemaChild.json" }, { "required": [ "value1" ] } ] }, "field2": { "type":"string", "enum":["a","b","c"] } } }
where schemaChild.json is
{ "type": "object", "additionalProperties": false, "properties": { "value1": { "type": "string" }, "value2": { "type": "string" } } }
And output like:
stdClass Object ( [type] => object [required] => Array ( [0] => field1 ) [additionalProperties] => [properties] => stdClass Object ( [field1] => stdClass Object ( [allOf] => Array ( [0] => stdClass Object ( [type] => object [additionalProperties] => [properties] => stdClass Object ( [value1] => stdClass Object ( [type] => string ) [value2] => stdClass Object ( [type] => string ) ) ) [1] => stdClass Object ( [required] => Array ( [0] => value1 ) ) ) ) [field2] => stdClass Object ( [type] => string [enum] => Array ( [0] => a [1] => b [2] => c ) ) ) )
Sorry, this is not possible.
@sorinsarca is it something you might consider adding?
Is there any way to get the full schema with all loaded data by $ref without data validation?
For example: Loading schemaParent.json with some $ref
where schemaChild.json is
And output like: