Closed xurc closed 2 years ago
It looks as if in the 5.x version (of JSON::Validator?), at least the readOnly validation in nested refs is broken. For example:
"Id": { "type": "integer", "title": "Id", "description": "Id", "format": "int32", "readOnly": true },
And, in another model:
"id": { "$ref": "#/components/schemas/Id" },
When validating, POST gives an error about the absence of id in the body.
If you change the spec version to "openapi": "3.1.0" and add readOnly to reference the model, as version 3.1 allows:
"id": { "$ref": "#/components/schemas/Id", "readOnly": true },
the error is also present. Presumably also broken validation of writeOnly, nullable etc.
Thanks for reporting in 👍 This should be fixed in the upcoming release of JSON::Validator. (v5.03)
It looks as if in the 5.x version (of JSON::Validator?), at least the readOnly validation in nested refs is broken. For example:
And, in another model:
When validating, POST gives an error about the absence of id in the body.
If you change the spec version to "openapi": "3.1.0" and add readOnly to reference the model, as version 3.1 allows:
the error is also present. Presumably also broken validation of writeOnly, nullable etc.