Skip to content

readme.md doesn't agree with usage: -D either is or is not an allowed option #1828

Closed
@leemeador

Description

@leemeador

Github is showing README.md on its main page. On that page in the SYNOPSIS section and OPTIONS below, it says I can use -D as an option. Further down the page it indicates properties (like the Java "models" option) can be set with -D.

I try it by using the following gradle task:

task genSwagger(type: JavaExec) {
    description "generate swagger doc or clients via codgen package and gradle"
    // has buildscript dependency  classpath "io:swagger-codegen:2.1.5"
    classpath = buildscript.configurations.classpath
    args  = ["generate",
             "-i", "http://localhost:25630/v1/mystuff/api-docs",
             "-o", "${buildDir}/docs/rest-api",
             "-l", "jaxrs",
            "-D", "models"
            ]
    main      = "io.swagger.codegen.Codegen"
}

and I get "usage" that does not show -D as an option. It does not say that -D is the offense causing usage to be shown but removing the -D actually generates .java files.

usage: Codegen
 -a,--auth <arg>           adds authorization headers when fetching the
                           swagger definitions remotely. Pass in a
                           URL-encoded string of name:header with a comma
                           separating multiple values
 -c,--config <arg>         location of the configuration file
 -d,--debug-info           prints additional info for debugging
 -h,--help                 shows this message
 -i,--input-spec <arg>     location of the swagger spec, as URL or file
 -l,--lang <arg>           client language to generate.
                           Available languages include:
                           [android, async-scala, csharp, dart, flash,
                           python-flask, java, javascript, jaxrs,
                           inflector, jmeter, nodejs, objc, perl, php,
                           python, qt5cpp, ruby, scala, scalatra,
                           silex-PHP, sinatra, slim, spring-mvc,
                           dynamic-html, html, swagger, swagger-yaml,
                           swift, tizen, typescript-angular,
                           typescript-node, akka-scala, CsharpDotNet2,
                           clojure]
 -o,--output <arg>         where to write the generated files
 -t,--template-dir <arg>   folder containing the template files

Version 2.1.5, 2.1.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions