As reported in danielgtaylor/apisprout#30, when given a request schema with a required readOnly property the request validator mistakenly treats it as required. According to the spec:
readOnly boolean
Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
Basically this means that request & response can share a schema but will see different properties as required for validation purposes.
As reported in danielgtaylor/apisprout#30, when given a request schema with a required
readOnlyproperty the request validator mistakenly treats it as required. According to the spec:Basically this means that request & response can share a schema but will see different properties as required for validation purposes.