Skip to content

Commit 9dcfc07

Browse files
committed
Add SIMPLIFY_ONEOF_ANYOF_ENUM to the documentation
1 parent 0ae2462 commit 9dcfc07

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/customization.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,15 @@ Example:
564564
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyAnyOfStringAndEnumString_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING=true
565565
```
566566
567+
- `SIMPLIFY_ONEOF_ANYOF_ENUM`: when set to true, oneOf/anyOf with only enum sub-schemas all containing enum values will be converted to a single enum
568+
This is enabled by default
569+
570+
Example:
571+
572+
```
573+
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyOneOfWithEnums_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_ONEOF_ANYOF_ENUM=true
574+
```
575+
567576
- `SIMPLIFY_BOOLEAN_ENUM`: when set to `true`, convert boolean enum to just enum.
568577
569578
Example:

0 commit comments

Comments
 (0)