What is the difference between additionalItems and additionalProperties in JSON Schema?
Date : March 29 2020, 07:55 AM
like below fixes the issue As it is explained in the docs, additionalProperties is a validation keyword for objects/documents, and additionalItems is a validation keyword for arrays.
|
Reuse properties from a remote JSON schema, at the same level of the original schema
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I have a remote schema "person.json", saved on another file. , You want to use the allOf keyword, combined with $ref: {
"id": "/schemas/man.json",
"allOf": [{"$ref": "person.json"}],
...
}
|
How to use additionalProperties with allOf in JSON schema?
Tag : json , By : eastcoastj
Date : March 29 2020, 07:55 AM
I wish this help you Your schema could be expanded this way: allof: It must validate independently against two schemas:
|
Json schema oneOf with additionalProperties draft-04
Tag : json , By : mansoor
Date : March 29 2020, 07:55 AM
around this issue The oneOf, anyOf, ... keywords cannot be used for referencing other definitions. They do work for required. The solution is to declare all properties and only require the properties that are needed in the context. My example would become the following: "assertion": {
"type": "object",
"additionalProperties": false,
"oneOf": [
{
"required": [
"operator"
]
},
{
"required": [
"primitive"
]
}
],
"properties": {
"operator": {
"$ref": "#/definitions/operator"
},
"primitive": {
"$ref": "#/definitions/primitive"
},
"preference": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true
},
"usage": {
"enum": [
"required",
"rejected",
"optional",
"observed",
"ignored"
]
}
}
}
|
In JSON Schema how are conflicting 'additionalProperties' to be parsed?
Tag : json , By : platformNomad
Date : March 29 2020, 07:55 AM
seems to work fine In JSON Schema if we have "additionalProperties":false at the root level and "additionalProperties":true nested how are we to resolve this putative "conflict" , They don't override. Their scope is limited to the JSON schema level.
|