@@ -221,25 +221,25 @@ private void customizeComponents(OpenAPI openApi, Components componentsPropertie
221
221
else {
222
222
Map <String , Schema > schemaMap = components .getSchemas ();
223
223
schemaMap .forEach ((key , schema ) -> {
224
- Schema schemaProperties = componentsProperties .getSchemas ().get (key );
225
- if (schemaProperties != null ) {
226
- resolveString (schema ::setDescription , schemaProperties ::getDescription );
227
- Map <String , Schema > properties = schema .getProperties ();
228
- if (CollectionUtils .isEmpty (properties )) {
229
- return ;
230
- }
231
- properties .forEach ((propKey , propSchema ) -> {
232
- Schema propSchemaProperties = (Schema ) schemaProperties .getProperties ().get (propKey );
233
- if (propSchemaProperties != null ) {
234
- resolveString (propSchema ::description , propSchemaProperties ::getDescription );
235
- resolveString (propSchema ::title , propSchemaProperties ::getTitle );
236
- resolveString (propSchema ::example , propSchemaProperties ::getExample );
224
+ if (!CollectionUtils .isEmpty (componentsProperties .getSchemas ())) {
225
+ Schema schemaProperties = componentsProperties .getSchemas ().get (key );
226
+ if (schemaProperties != null ) {
227
+ resolveString (schema ::setDescription , schemaProperties ::getDescription );
228
+ Map <String , Schema > properties = schema .getProperties ();
229
+ if (CollectionUtils .isEmpty (properties )) {
230
+ return ;
237
231
}
238
- });
232
+ properties .forEach ((propKey , propSchema ) -> {
233
+ Schema propSchemaProperties = (Schema ) schemaProperties .getProperties ().get (propKey );
234
+ if (propSchemaProperties != null ) {
235
+ resolveString (propSchema ::description , propSchemaProperties ::getDescription );
236
+ resolveString (propSchema ::title , propSchemaProperties ::getTitle );
237
+ resolveString (propSchema ::example , propSchemaProperties ::getExample );
238
+ }
239
+ });
240
+ }
239
241
}
240
242
});
241
-
242
-
243
243
Map <String , SecurityScheme > securitySchemeMap = components .getSecuritySchemes ();
244
244
if (CollectionUtils .isEmpty (securitySchemeMap )) {
245
245
components .setSecuritySchemes (componentsProperties .getSecuritySchemes ());
0 commit comments