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

Add optional parameter for request body #16972

Conversation

MelleD
Copy link
Contributor

@MelleD MelleD commented Nov 3, 2023

The PR set not required request body as Optionals for Spring.
Spring supports Optional for request body same like in DTOs or in QueryParams.
This is a breaking change that is not backwards compatible.

Fix #16971

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against themaster
  • If your PR is targeting a particular programming language, @mention the [technical committee]
    @cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02) @Zomzog (2022/09)

@wing328
Copy link
Member

wing328 commented Nov 3, 2023

This is a breaking change that is not backwards compatible.

Thanks for the PR. Shall we consider this a bug fix instead?

@wing328
Copy link
Member

wing328 commented Nov 3, 2023

Not related to this PR but can you have a quick look at #16945 when you've time? Thanks.

@MelleD
Copy link
Contributor Author

MelleD commented Nov 3, 2023

Thanks for the PR. Shall we consider this a bug fix instead?

Yes why not I have no strong opinion on that :)

@MelleD
Copy link
Contributor Author

MelleD commented Nov 3, 2023

#16945

I looked into this PR. We currently not using this stubs and interfaces. So not much experience on that.

We use interface only with spring-cloud

@wing328 wing328 merged commit f83cb60 into OpenAPITools:master Nov 4, 2023
47 checks passed
@wing328
Copy link
Member

wing328 commented Nov 4, 2023

We use interface only with spring-cloud

With that PR, my guess is that you don't need the interfaceOnly option any more, right?

@SebastianKuehn SebastianKuehn mentioned this pull request Nov 13, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] [SPRING] Generator do not respect Optional for not required RequestBody
2 participants