-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
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
Broken readOnly + required combination #389
Comments
@karlismelderis I created two tests using the schema provided above. both work correctly. It will be great if you can take at the two tests and modify them to reproduce the result you are seeing. Alternatively, if it's easier for you, please create simple canonical example demonstrating the issue, and post it to a github. i'll definitely have a look. thanks! |
ah missed comment. I will definitely try to create some code example for the case... or will find a bug in our schemas 🤔 |
Perhaps what u experienced is similar to #400. If so, I am working on a fix |
@karlismelderis a number of improvements were made for readonly/required support via pr #414. they are available in |
👍 that's exactly my case. "ItemDetails": {
"allOf": [
{
"type": "object",
"properties": {
"createdBy": {
"type": "object",
"readOnly": true,
"allOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "Unique user identifier, normally username"
},
"firstName": {
"type": "string",
"description": "Given Name"
},
"lastName": {
"type": "string",
"description": "Last (Family) Name"
}
}
}
]
}
},
"required": [
"createdBy"
]
},
{
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
]
} |
@karlismelderis thanks for the example. {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
} |
👍 true. we missed some and issue is gone with latest version. |
Describe the bug
if prop is set to readOnly and required POST/PUT body validation is failing with "required item is missing"
(I'm at version 4.1.0)
To Reproduce
example schemas:
Actual behavior
Error is thrown:
Expected behavior
if prop is set to readOnly it's not checked in POST/PUT body
The text was updated successfully, but these errors were encountered: