Enhancement/parser resolve responses flag#2127
Merged
Conversation
frantuma
suggested changes
Oct 21, 2024
| if(response != null) { | ||
| //This part allows parser to put response inline without the resolveFully option set to true | ||
| if (response.get$ref() != null) { | ||
| //This part allows parser to put response inline within resolveResponses or ResolveFully |
Contributor
There was a problem hiding this comment.
would replace with // This part allows parser to put response inline when resolveResponses = true
see below
| //This part allows parser to put response inline without the resolveFully option set to true | ||
| if (response.get$ref() != null) { | ||
| //This part allows parser to put response inline within resolveResponses or ResolveFully | ||
| if (response.get$ref() != null && cache != null && cache.getParseOptions() != null && (cache.getParseOptions().isResolveResponses() || cache.getParseOptions().isResolveFully())) { |
Contributor
There was a problem hiding this comment.
this shouldn't be triggered by resolveFully but only by the flag. It's true that we currently don't process components/responses in ResolveFully as we do for requestBodies, but this should be addressed in separate ticket and logic added to ResolveFully and not here
d6bed18 to
6bed0f6
Compare
frantuma
approved these changes
Oct 22, 2024
hertzsprung
pushed a commit
to hertzsprung/openapi-generator
that referenced
this pull request
Jul 15, 2025
needed by swagger-parser>=2.1.23, see swagger-api/swagger-parser#2127
5 tasks
hertzsprung
added a commit
to hertzsprung/openapi-generator
that referenced
this pull request
Jul 16, 2025
needed by swagger-parser>=2.1.23, see swagger-api/swagger-parser#2127
hertzsprung
added a commit
to hertzsprung/openapi-generator
that referenced
this pull request
Jul 16, 2025
needed by swagger-parser>=2.1.23, see swagger-api/swagger-parser#2127
hertzsprung
added a commit
to hertzsprung/openapi-generator
that referenced
this pull request
Jul 16, 2025
needed by swagger-parser>=2.1.23, see swagger-api/swagger-parser#2127
wing328
pushed a commit
to OpenAPITools/openapi-generator
that referenced
this pull request
Jul 19, 2025
…#21568) * set resolveResponses=true needed by swagger-parser>=2.1.23, see swagger-api/swagger-parser#2127 * update samples --------- Co-authored-by: James Shaw <james.shaw@masabi.com>
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Due to unexpected results during parsing OAS with options - resolve and flatten set to true, we decided to create resolveResponses flag, from now responses will not be fully resolved by default with option resolve - true.
If anyone wants to keep previous behaviour needs to use option
setResolveResponses(true)