Skip to content

Commit ad262c7

Browse files
committed
Advise to use REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT
1 parent ff238c2 commit ad262c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ private void gatherInlineModels(Schema schema, String modelPrefix) {
356356
} else if (schema.getProperties() != null) {
357357
// If non-object type is specified but also properties
358358
LOGGER.error("Illegal schema found with non-object type combined with properties," +
359-
" no properties should be defined:\n " + schema.toString());
359+
" no properties should be defined:" +
360+
" consider using --openapi-normalizer REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT=true\n " +
361+
schema.toString());
360362
return;
361363
} else if (schema.getAdditionalProperties() != null) {
362364
// If non-object type is specified but also additionalProperties

0 commit comments

Comments
 (0)