forked from loafle/openapi-generator-original
Add withXml option for Go language (#7566)
* Added support for application/xml content-type for GO language Issue #7463 * Added test scripts for Go lang "withXml" feature * Added samples for Go land "withXml" feature. * "withXml" feature for Go language is only available for client.
This commit is contained in:
committed by
William Cheng
parent
8668175879
commit
ee561fcd63
@@ -30,6 +30,8 @@ public class GoClientOptionsTest extends AbstractOptionsTest {
|
||||
times = 1;
|
||||
clientCodegen.setPackageName(GoClientOptionsProvider.PACKAGE_NAME_VALUE);
|
||||
times = 1;
|
||||
clientCodegen.setWithXml(GoClientOptionsProvider.WITH_XML_VALUE);
|
||||
times = 1;
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ public class GoClientOptionsProvider implements OptionsProvider {
|
||||
|
||||
public static final String PACKAGE_VERSION_VALUE = "1.0.0";
|
||||
public static final String PACKAGE_NAME_VALUE = "Go";
|
||||
public static final boolean WITH_XML_VALUE = true;
|
||||
|
||||
@Override
|
||||
public String getLanguage() {
|
||||
@@ -24,6 +25,7 @@ public class GoClientOptionsProvider implements OptionsProvider {
|
||||
.put(CodegenConstants.PACKAGE_VERSION, PACKAGE_VERSION_VALUE)
|
||||
.put(CodegenConstants.PACKAGE_NAME, PACKAGE_NAME_VALUE)
|
||||
.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true")
|
||||
.put(CodegenConstants.WITH_XML, "true")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user