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
Hi. I am trying to validate a response which is an array of objects and this case does not work properly.
spec:
paths: /one_of: get: responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/Cont' components: schemas: Cont: type: array items: oneOf: - $ref: '#/components/schemas/Obj1' - $ref: '#/components/schemas/Obj2' Obj1: type: object properties: a: type: string Obj2: type: object properties: b: type: string
If response is [{'a': '1'}, {'c': '2'}] - validator does not raise SchemaValidationError. Expecting that {'c': '2'} is rejected.
openapi_core-0.7.1 openapi_spec_validator-0.2.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi. I am trying to validate a response which is an array of objects and this case does not work properly.
spec:
If response is [{'a': '1'}, {'c': '2'}] - validator does not raise SchemaValidationError.
Expecting that {'c': '2'} is rejected.
The text was updated successfully, but these errors were encountered: