-
-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't return 400 when read-only property is provided (#1655)
Fixes #942 No longer return 400 if a read-only property is provided, as discussed in the issue. We still raise an error if write-only properties are included in the response and response validation is enabled. I also changed how read-/write-only works in combination with `required`. Previously, `required` would not be overwritten by read-/write-only. Now we just follow the spec to the letter: - required and read-only: must be included but must be ignored by the server - required and write-only: impossible to achieve, but I also don't see how this combination could make sense - read-only: may be included but must be ignored by server - write-only: must not be included by server
- Loading branch information
1 parent
b28cf09
commit 1cb5f83
Showing
3 changed files
with
1 addition
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,6 @@ components: | |
type: object | ||
required: | ||
- name | ||
- user_id | ||
- password | ||
properties: | ||
user_id: | ||
type: integer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters