Skip to content
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

Don't return 400 when read-only property is provided #1655

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

RobbeSneyders
Copy link
Member

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

@RobbeSneyders RobbeSneyders added this to the Connexion 3.0 milestone Mar 1, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4308996494

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 92.347%

Totals Coverage Status
Change from base Build 4270694070: 0.02%
Covered Lines: 3258
Relevant Lines: 3528

💛 - Coveralls

@RobbeSneyders RobbeSneyders merged commit 1cb5f83 into main Mar 2, 2023
@RobbeSneyders RobbeSneyders deleted the feature/readonly-no-400 branch March 2, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

400 error for readOnly=True
2 participants