File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
swagger-parser-core/src/main/java/io/swagger/v3/parser/core/models
swagger-parser-v3/src/main/java/io/swagger/v3/parser/processors Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public class ParseOptions {
1515 private boolean validateInternalRefs = true ;
1616 private boolean legacyYamlDeserialization = false ;
1717 private boolean resolveRequestBody = false ;
18-
18+ private boolean resolveResponses = false ;
1919 private boolean oaiAuthor ;
2020 private boolean inferSchemaType = true ;
2121 private boolean safelyResolveURL ;
@@ -161,4 +161,12 @@ public List<String> getRemoteRefBlockList() {
161161 public void setRemoteRefBlockList (List <String > remoteRefBlockList ) {
162162 this .remoteRefBlockList = remoteRefBlockList ;
163163 }
164+
165+ public boolean isResolveResponses () {
166+ return resolveResponses ;
167+ }
168+
169+ public void setResolveResponses (boolean resolveResponses ) {
170+ this .resolveResponses = resolveResponses ;
171+ }
164172}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public void processOperation(Operation operation) {
7171 ApiResponse response = responses .get (responseCode );
7272 if (response != null ) {
7373 //This part allows parser to put response inline without the resolveFully option set to true
74- if (response .get$ref () != null ) {
74+ if (response .get$ref () != null && cache != null && cache . getParseOptions () != null && cache . getParseOptions (). isResolveResponses () ) {
7575
7676 responseProcessor .processResponse (response );
7777
You can’t perform that action at this time.
0 commit comments