File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
java/io/swagger/codegen/v3/generators Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3752,8 +3752,9 @@ protected Schema getSchemaFromResponse(ApiResponse response) {
3752
3752
return null ;
3753
3753
}
3754
3754
Schema schema = null ;
3755
- for (MediaType mediaType : response .getContent ().values ()) {
3756
- schema = mediaType .getSchema ();
3755
+ for (String contentType : response .getContent ().keySet ()) {
3756
+ schema = response .getContent ().get (contentType ).getSchema ();
3757
+ schema .addExtension ("x-content-type" , contentType );
3757
3758
break ;
3758
3759
}
3759
3760
return schema ;
Original file line number Diff line number Diff line change 344
344
<script >
345
345
$ (document ).ready (function () {
346
346
var schemaWrapper = { { { jsonSchema} } } ;
347
- var schema = schemaWrapper.content[{ { contentType } } ].schema;
347
+ var schema = schemaWrapper.content[" { { extensions.x-content-type } } " ].schema;
348
348
if (schema.$ref != null) {
349
349
schema = defsParser.$refs .get(schema.$ref );
350
350
} else {
Original file line number Diff line number Diff line change 5
5
<script >
6
6
$ (document ).ready (function () {
7
7
var schemaWrapper = { { { jsonSchema} } } ;
8
- var schema = schemaWrapper.content[{ { contentType} } ].schema;
8
+ var schema = schemaWrapper.content[" { { contentType} } " ].schema;
9
9
if (schema.$ref != null) {
10
10
schema = defsParser.$refs .get(schema.$ref );
11
11
} else {
Original file line number Diff line number Diff line change 344
344
<script >
345
345
$ (document ).ready (function () {
346
346
var schemaWrapper = { { { jsonSchema} } } ;
347
- var schema = schemaWrapper.content[{ { contentType } } ].schema;
347
+ var schema = schemaWrapper.content[" { { extensions.x-content-type } } " ].schema;
348
348
var schema = schemaWrapper.schema;
349
349
if (schema.$ref != null) {
350
350
schema = defsParser.$refs .get(schema.$ref );
You can’t perform that action at this time.
0 commit comments