@@ -468,6 +468,14 @@ public ClientOptInput toClientOptInput() {
468
468
SwaggerParseResult result = new OpenAPIParser ().readContents (inputSpec , authorizationValues , options );
469
469
OpenAPI openAPI = result .getOpenAPI ();
470
470
471
+ if (config .needsUnflattenedSpec ()) {
472
+ ParseOptions optionsUnflattened = new ParseOptions ();
473
+ optionsUnflattened .setResolve (true );
474
+ SwaggerParseResult resultUnflattened = new OpenAPIParser ().readContents (inputSpec , authorizationValues , optionsUnflattened );
475
+ OpenAPI openAPIUnflattened = resultUnflattened .getOpenAPI ();
476
+ config .setUnflattenedOpenAPI (openAPIUnflattened );
477
+ }
478
+
471
479
input .opts (new ClientOpts ())
472
480
.openAPI (openAPI );
473
481
@@ -497,6 +505,15 @@ public ClientOptInput toClientOptInput() {
497
505
LOGGER .debug ("getClientOptInput - parsed inputSpecURL " + inputSpecURL );
498
506
input .opts (new ClientOpts ())
499
507
.openAPI (openAPI );
508
+
509
+ if (config .needsUnflattenedSpec ()) {
510
+ ParseOptions optionsUnflattened = new ParseOptions ();
511
+ optionsUnflattened .setResolve (true );
512
+ SwaggerParseResult resultUnflattened = new OpenAPIParser ().readLocation (inputSpecURL , authorizationValues , optionsUnflattened );
513
+ OpenAPI openAPIUnflattened = resultUnflattened .getOpenAPI ();
514
+ config .setUnflattenedOpenAPI (openAPIUnflattened );
515
+ }
516
+
500
517
}
501
518
502
519
config .setOutputDir (outputDir );
0 commit comments