why @Schema(anyOf = {xxx.class, xxx.class}) doesn't work but @Schema(allOf = {xxx.class, xxx.class} can?) #265
-
this is SchemaGeneratorConfigBuilder but when i change the @Schema attributes to anyOf the Schema is thanks for you help. Sorry that I am a newbie |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Short answer: Your observation is correct, while I've created PR #266 now, to add that missing support accordingly. Generally, a question like this is much easier to act upon if provided in textual form and not as screenshots. |
Beta Was this translation helpful? Give feedback.
Hi @manchuanxingmengyaxinhe,
Short answer: Your observation is correct, while
allOf
is supported out-of-the-box,anyOf
(oroneOf
for that matter) is not handled by the Swagger 2.0 Module yet.jsonschema-generator/jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java
Lines 434 to 439 in 08c7249
I've created PR #266 now, to add that missing s…