-
Notifications
You must be signed in to change notification settings - Fork 531
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
Enhancement/parser resolve responses flag #2127
Conversation
@@ -70,8 +70,8 @@ public void processOperation(Operation operation) { | |||
for (String responseCode : responses.keySet()) { | |||
ApiResponse response = responses.get(responseCode); | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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)