forked from loafle/openapi-generator-original
Merge pull request #3 from wing328/add_go_generator_testfix
Add missing generator cliOption
This commit is contained in:
commit
0821cf7fd0
@ -51,6 +51,12 @@ public class GoClientCodegen extends AbstractGoCodegen {
|
|||||||
.defaultValue("1.0.0"));
|
.defaultValue("1.0.0"));
|
||||||
cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)"));
|
cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)"));
|
||||||
|
|
||||||
|
// option to change the order of form/body parameter
|
||||||
|
cliOptions.add(CliOption.newBoolean(
|
||||||
|
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS,
|
||||||
|
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS_DESC)
|
||||||
|
.defaultValue(Boolean.FALSE.toString()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,7 +46,7 @@ public abstract class AbstractOptionsTest {
|
|||||||
final Set<String> undocumented = new HashSet<String>(testOptions);
|
final Set<String> undocumented = new HashSet<String>(testOptions);
|
||||||
undocumented.removeAll(cliOptions);
|
undocumented.removeAll(cliOptions);
|
||||||
if (!undocumented.isEmpty()) {
|
if (!undocumented.isEmpty()) {
|
||||||
Assert.fail(String.format("These options weren't documented: %s.", StringUtils.join(undocumented, ", ")));
|
Assert.fail(String.format("These options weren't documented: %s. Are you expecting base options and calling cliOptions.clear()?", StringUtils.join(undocumented, ", ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user