Open jfrconley opened 5 years ago
EDIT: Upon closer inspection, the spec says "SHOULD NOT" not "MUST NOT". Meaning this is merely bad practice, not an error
According to the Swagger 2 spec, readOnly properties are not allowed to be required. The following schema should fail, but does not.
{ "swagger": "2.0", "info": { "title": "Parser Bug", "version": "3.5.1" }, "paths": {}, "definitions": { "Burn": { "properties": { "id": { "type": "string", "readOnly": true } }, "required": [ "id" ], "type": "object" } } }
This does not apply to OA3
source
The openapi-enforcer handles this correctly.
EDIT: Upon closer inspection, the spec says "SHOULD NOT" not "MUST NOT". Meaning this is merely bad practice, not an error
According to the Swagger 2 spec, readOnly properties are not allowed to be required. The following schema should fail, but does not.
This does not apply to OA3
source