12

I came across a swagger configuration file like this:

{
    "modelPackage": "aa",
    "apiPackage": "aa.model",
    "invokerPackage": "aa.model",
    "bigDecimalAsString": true,
    "hideGenerationTimestamp": true,
    "withXml": false,
    "serializableModel": false,
    "dateLibrary": "java8-localdatetime",
    "java8": true,
    "fullJavaUtil": false,
    "useRuntimeException": false,
    "library": "resttemplate"
}

I wonder if there is any complete list of avaible parameters that could be used to configure swagger. I've been searching for it on swagger official website but couldn't find all of the commands listed above. I'll be very grateful for providing any comprehensive sources or maybe even a mentioned list :)

Pang
  • 9,564
  • 146
  • 81
  • 122
AH1N1
  • 148
  • 1
  • 1
  • 8

1 Answers1

11

You can find them under its git page, under General Configuration parameters.

This is the link: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen-maven-plugin/README.md#general-configuration-parameters

There are more also here: https://github.com/swagger-api/swagger-codegen/issues/7795

Looks like there's also a specific command to generate documentations. Try these:

General:

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate

Language-specific:

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java
Leviand
  • 2,745
  • 4
  • 29
  • 43
  • Thanks for your comment but I'm afraid it's still not a complete list :( p.e there is a 'useRuntimeException' command in my file but it's not listed at page you provided. Thats my problem that in config files I've found in a project there always are some params that are not present at any swagger site/git. – AH1N1 Jul 06 '18 at 09:27
  • Edited, look at my second link and olso the code generator, looks like someone is having your same problem :) – Leviand Jul 06 '18 at 09:31
  • How to call/set multiple configuration options from command line ? – George Pligoropoulos Dec 24 '20 at 11:10
  • also config options are listed here https://openapi-generator.tech/docs/generators/java/ – Sergey Ponomarev Mar 02 '21 at 15:20