-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
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
Its Not validating Objects under an array #145
Comments
Could you please post your data, your schema, and how you use the code so that we can reproduce this... |
For example if i have something in my schema as before "examples": {
"type": "array",
"items": { "$ref": "#/definitions/example" }
},
"definitions": {
"example": {
"type": "object",
"properties": {
"exampleId": { "type": "integer" },
"solutions": { "$ref": "#/definitions/solutions" }
}
},
"solutions": {
"type": "array",
"items": { "$ref": "#/definitions/solution" }
},
"solution": {
"type": "object",
"additionalProperties": false,
"properties": {
"testName": {"type": "string"},
"solutionId": { "type": "string" },
"base": { "type": "number" },
"baseUOM": { "type": "string" },
},
"required": [
"base",
"baseUOM"
],
"oneOf": [
{
"type": "string",
"required": [
"testName"
]
},
{
"type": "string",
"required": [
"solutionId"
]
}
]
}
} Below when give the json as {
"examples": [{
"exampleId": 405666,
"solutions": [{
"base": 20,
"baseUOM": "test"
}]
}]
} it doesnt validation my TestName and solutionId , as oneof them is required |
Basically , is unable to validate ref under definitions , is there a way to specify them to be validated |
Hmm, I haven't used |
Are there any updates on this issue? I'm unable to validate simple objects within an array.. 😕 |
if i have an array of objects and object has certains properties , this library is not validation the objects under the array
The text was updated successfully, but these errors were encountered: