@@ -184,10 +184,8 @@ public static Optional<Content> getContent(io.swagger.v3.oas.annotations.media.C
184
184
if (StringUtils .isNotBlank (annotationContent .mediaType ())) {
185
185
content .addMediaType (annotationContent .mediaType (), mediaType );
186
186
}
187
- else {
188
- if (mediaType .getSchema () != null || mediaType .getEncoding () != null || mediaType .getExample () != null || mediaType .getExamples () != null || mediaType .getExtensions () != null )
189
- applyTypes (classTypes , methodTypes , content , mediaType );
190
- }
187
+ else if (mediaType .getSchema () != null || mediaType .getEncoding () != null || mediaType .getExample () != null || mediaType .getExamples () != null || mediaType .getExtensions () != null )
188
+ applyTypes (classTypes , methodTypes , content , mediaType );
191
189
}
192
190
193
191
if (content .size () == 0 && annotationContents .length != 1 ) {
@@ -353,7 +351,7 @@ private static MediaType getMediaType(Schema schema, Components components, Json
353
351
mediaType .schema (new Schema <Object >().type ("object" ));
354
352
}
355
353
Schema oSchema = mediaType .getSchema ();
356
- for (SchemaProperty sp : annotationContent .schemaProperties ()) {
354
+ for (SchemaProperty sp : annotationContent .schemaProperties ()) {
357
355
Class <?> schemaImplementation = sp .schema ().implementation ();
358
356
boolean isArray = false ;
359
357
if (schemaImplementation == Void .class ) {
@@ -366,7 +364,8 @@ private static MediaType getMediaType(Schema schema, Components components, Json
366
364
.ifPresent (s -> {
367
365
if ("array" .equals (oSchema .getType ())) {
368
366
oSchema .getItems ().addProperty (sp .name (), s );
369
- } else {
367
+ }
368
+ else {
370
369
oSchema .addProperty (sp .name (), s );
371
370
}
372
371
});
@@ -382,7 +381,8 @@ private static MediaType getMediaType(Schema schema, Components components, Json
382
381
.ifPresent (s -> {
383
382
if ("array" .equals (mediaType .getSchema ().getType ())) {
384
383
mediaType .getSchema ().getItems ().additionalProperties (s );
385
- } else {
384
+ }
385
+ else {
386
386
mediaType .getSchema ().additionalProperties (s );
387
387
}
388
388
}
0 commit comments