We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from the spec: http://json-schema.org/latest/json-schema-validation.html#anchor75
js2model doesn't like this example:
$ cat test.json { "id": "http://some.site.somewhere/entry-schema#", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "required": [ "storage" ], "properties": { "storage": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] } } } $ ~/js2model/src/js2model -o output test.json -l cpp 2016-10-20 16:48:22,730: tr.jsonschema.JsonSchema2Model: WARNING: Unknown schema type in {u'oneOf': [{u'type': u'string'}, {u'type': u'integer'}]}
The text was updated successfully, but these errors were encountered:
Is there any update regarded to this issue? I am also trying to combine schemas (see https://spacetelescope.github.io/understanding-json-schema/reference/combining.html), escpecially in combination with definitions.
Note: For me the example above is generatable, but the C++ type of property "storage" is "int", which is not correct...
I have another example, which does not compile for me:
############################################################## {
"$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "pet": { "id": "http://foo.bar/schemas/pet.json", "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "number" } }, "additionalProperties": false, "required": ["name", "age"] } }, "type": "object", "properties": { "cat": { "anyOf": [ { "type": "string", "maxLength": 5 }, { "$ref": "#/definitions/pet" } ] }, "dog": { "anyOf": [ { "type": "string", "maxLength": 5 }, { "$ref": "#/definitions/pet" } ] } }
} ##############################################################
Sorry, something went wrong.
No branches or pull requests
from the spec:
http://json-schema.org/latest/json-schema-validation.html#anchor75
js2model doesn't like this example:
The text was updated successfully, but these errors were encountered: