You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding a writeOnly or readOnly property to my schema, my RSpec test fails with the following error:
"The object requires the following keys: username, password. Missing keys: password"
But password is marked as writeOnly and therefore should be ignored as per the OpenAPI docs:
If a readOnly or writeOnly property is included in the required list, required affects just the relevant scope – responses only or requests only. That is, read-only required properties apply to responses only, and write-only required properties – to requests only.
Schema:
type: objectproperties:
id:
# Returned by GET, not used in POST/PUT/PATCHtype: integerreadOnly: trueusername:
type: stringpassword:
# Used in POST/PUT/PATCH, not returned by GETtype: stringwriteOnly: truerequired:
- username
- password
Are readOnly and writeOnly properties taken into account by conform_schema?
The text was updated successfully, but these errors were encountered:
After adding a
writeOnly
orreadOnly
property to my schema, my RSpec test fails with the following error:"The object requires the following keys: username, password. Missing keys: password"
But
password
is marked aswriteOnly
and therefore should be ignored as per the OpenAPI docs:Schema:
Are
readOnly
andwriteOnly
properties taken into account byconform_schema
?The text was updated successfully, but these errors were encountered: