1

I read already this thread: How to use OpenAPI "oneOf" property with openapi-generator-maven-plugin when generating Spring code

But I still cant find a good working solution to generate Spring capable models from Swagger file with "oneof" properties.

I tried:

java -jar .\openapi-generator-cli.jar generate -i ./swagger.json -o ./spring-gen -g spring -c .\spring-config.json

with spring-config.json:

{
"legacyDiscriminatorBehavior":false
}

Did I miss something to get it working? Is there a better/easy solution to get the models?

Open for any hints and thanks in advance!

Kind regards Gregor

Gregor Sklorz
  • 170
  • 1
  • 3
  • 13

0 Answers0