Skip to content

[Java][Spring] fix unhandledException not working in combination with…#9879

Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom
daberni:bugfix/4393-unhandledException-skipDefaultInterface
Feb 23, 2022
Merged

[Java][Spring] fix unhandledException not working in combination with…#9879
wing328 merged 2 commits intoOpenAPITools:masterfrom
daberni:bugfix/4393-unhandledException-skipDefaultInterface

Conversation

@daberni
Copy link
Copy Markdown
Contributor

@daberni daberni commented Jul 2, 2021

Fixes #4393 JavaSpring template by taking configuration options skipDefaultInterface and unhandledException into account simultaneously properly.

unhandledException is no longer dependent on skipDefaultInterface as it is applicable to all java versions and implementations independent from abstract classes, interfaces or interfaces with default implementations.

Added additional samples to verify this change and existing samples didn't get touched by it:

e.g.

ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true )  @Valid @RequestBody Pet body);

becomes

ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true )  @Valid @RequestBody Pet body) throws Exception;

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/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 the correct branch: master, 5.1.x, 6.0.x
  • If your PR is targeting a particular programming language, @nmuesch the technical committee members, so they are more likely to review the pull request.

@daberni daberni changed the title fix unhandledException not working in combination with… [Java][Spring] fix unhandledException not working in combination with… Jul 2, 2021
@daberni
Copy link
Copy Markdown
Contributor Author

daberni commented Jul 2, 2021

failed circleci build shouldn't be related to the current changes

@daberni daberni force-pushed the bugfix/4393-unhandledException-skipDefaultInterface branch from 322c2a4 to a297e65 Compare July 4, 2021 15:22
@SimonErm
Copy link
Copy Markdown

Can i do anything to help getting this PR merged?

@daberni daberni force-pushed the bugfix/4393-unhandledException-skipDefaultInterface branch from a297e65 to 0c3efaf Compare November 17, 2021 21:11
@daberni daberni force-pushed the bugfix/4393-unhandledException-skipDefaultInterface branch from 0c3efaf to 921fde1 Compare December 26, 2021 15:39
@daberni
Copy link
Copy Markdown
Contributor Author

daberni commented Dec 26, 2021

Updated everything again, maybe someone can have a quick look at this small fix?

@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10)

@daberni daberni force-pushed the bugfix/4393-unhandledException-skipDefaultInterface branch from eb7944e to b743030 Compare February 21, 2022 13:02
@daberni
Copy link
Copy Markdown
Contributor Author

daberni commented Feb 21, 2022

everything green again (cc @wing328)

@borsch
Copy link
Copy Markdown
Member

borsch commented Feb 21, 2022

Hi @daberni
You probably missing some git commits/pushes, because as for now I can see only new sample. No changes to generator itself

@daberni
Copy link
Copy Markdown
Contributor Author

daberni commented Feb 21, 2022

Thanks for the hint @borsch. Did a rebase today and it looks like someone else already made this fix, and I didn't notice this during conflict resolution.

Feel free to keep the sample for verification in the future, or decline if it isn't necessary.

I guess maintainers could close the referenced issue then, but don't know when this was actually fixed.

@wing328 wing328 merged commit 182fe93 into OpenAPITools:master Feb 23, 2022
@wing328
Copy link
Copy Markdown
Member

wing328 commented Feb 23, 2022

@daberni thanks for the PR. We'll include the sample in the Github workflow tests for the Spring generator.

@daberni daberni deleted the bugfix/4393-unhandledException-skipDefaultInterface branch February 23, 2022 09:26
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.

[BUG][SPRING] unhandledException not working in combination with skipDefaultInterface

4 participants