diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
index 094ff38e8fd..1391ed6526b 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
@@ -28,6 +28,33 @@ public class CodegenConstants {
public static final String ARTIFACT_VERSION = "artifactVersion";
public static final String ARTIFACT_VERSION_DESC = "artifact version in generated pom.xml";
+ public static final String ARTIFACT_URL = "artifactUrl";
+ public static final String ARTIFACT_URL_DESC = "artifact URL in generated pom.xml";
+
+ public static final String ARTIFACT_DESCRIPTION = "artifactDescription";
+ public static final String ARTIFACT_DESCRIPTION_DESC = "artifact description in generated pom.xml";
+
+ public static final String SCM_CONNECTION = "scmConnection";
+ public static final String SCM_CONNECTION_DESC = "SCM connection in generated pom.xml";
+
+ public static final String SCM_DEVELOPER_CONNECTION = "scmDeveloperConnection";
+ public static final String SCM_DEVELOPER_CONNECTION_DESC = "SCM developer connection in generated pom.xml";
+
+ public static final String SCM_URL = "scmUrl";
+ public static final String SCM_URL_DESC = "SCM URL in generated pom.xml";
+
+ public static final String DEVELOPER_NAME = "developerName";
+ public static final String DEVELOPER_NAME_DESC = "developer name in generated pom.xml";
+
+ public static final String DEVELOPER_EMAIL = "developerEmail";
+ public static final String DEVELOPER_EMAIL_DESC = "developer email in generated pom.xml";
+
+ public static final String DEVELOPER_ORGANIZATION = "developerOrganization";
+ public static final String DEVELOPER_ORGANIZATION_DESC = "developer organization in generated pom.xml";
+
+ public static final String DEVELOPER_ORGANIZATION_URL = "developerOrganizationUrl";
+ public static final String DEVELOPER_ORGANIZATION_URL_DESC = "developer organization URL in generated pom.xml";
+
public static final String LICENSE_NAME = "licenseName";
public static final String LICENSE_NAME_DESC = "The name of the license";
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
index 01193f8a0aa..0934b06455f 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
@@ -52,6 +52,15 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
protected String groupId = "io.swagger";
protected String artifactId = "swagger-java";
protected String artifactVersion = "1.0.0";
+ protected String artifactUrl = "https://github.com/swagger-api/swagger-codegen";
+ protected String artifactDescription = "Swagger Java";
+ protected String developerName = "Swagger";
+ protected String developerEmail = "apiteam@swagger.io";
+ protected String developerOrganization = "Swagger";
+ protected String developerOrganizationUrl = "http://swagger.io";
+ protected String scmConnection = "scm:git:git@github.com:swagger-api/swagger-codegen.git";
+ protected String scmDeveloperConnection = "scm:git:git@github.com:swagger-api/swagger-codegen.git";
+ protected String scmUrl = "https://github.com/swagger-api/swagger-codegen";
protected String licenseName = "Unlicense";
protected String licenseUrl = "http://unlicense.org";
protected String projectFolder = "src" + File.separator + "main";
@@ -119,6 +128,15 @@ public AbstractJavaCodegen() {
cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_URL, CodegenConstants.ARTIFACT_URL_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_DESCRIPTION, CodegenConstants.ARTIFACT_DESCRIPTION_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.SCM_CONNECTION, CodegenConstants.SCM_CONNECTION_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.SCM_DEVELOPER_CONNECTION, CodegenConstants.SCM_DEVELOPER_CONNECTION_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.SCM_URL, CodegenConstants.SCM_URL_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_NAME, CodegenConstants.DEVELOPER_NAME_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_EMAIL, CodegenConstants.DEVELOPER_EMAIL_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION, CodegenConstants.DEVELOPER_ORGANIZATION_DESC));
+ cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION_URL, CodegenConstants.DEVELOPER_ORGANIZATION_URL_DESC));
cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC));
cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC));
cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC));
@@ -191,6 +209,60 @@ public void processOpts() {
additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion);
}
+ if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_URL)) {
+ this.setArtifactUrl((String) additionalProperties.get(CodegenConstants.ARTIFACT_URL));
+ } else {
+ additionalProperties.put(CodegenConstants.ARTIFACT_URL, artifactUrl);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_DESCRIPTION)) {
+ this.setArtifactDescription((String) additionalProperties.get(CodegenConstants.ARTIFACT_DESCRIPTION));
+ } else {
+ additionalProperties.put(CodegenConstants.ARTIFACT_DESCRIPTION, artifactDescription);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.SCM_CONNECTION)) {
+ this.setScmConnection((String) additionalProperties.get(CodegenConstants.SCM_CONNECTION));
+ } else {
+ additionalProperties.put(CodegenConstants.SCM_CONNECTION, scmConnection);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.SCM_DEVELOPER_CONNECTION)) {
+ this.setScmDeveloperConnection((String) additionalProperties.get(CodegenConstants.SCM_DEVELOPER_CONNECTION));
+ } else {
+ additionalProperties.put(CodegenConstants.SCM_DEVELOPER_CONNECTION, scmDeveloperConnection);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.SCM_URL)) {
+ this.setScmUrl((String) additionalProperties.get(CodegenConstants.SCM_URL));
+ } else {
+ additionalProperties.put(CodegenConstants.SCM_URL, scmUrl);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.DEVELOPER_NAME)) {
+ this.setDeveloperName((String) additionalProperties.get(CodegenConstants.DEVELOPER_NAME));
+ } else {
+ additionalProperties.put(CodegenConstants.DEVELOPER_NAME, developerName);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.DEVELOPER_EMAIL)) {
+ this.setDeveloperEmail((String) additionalProperties.get(CodegenConstants.DEVELOPER_EMAIL));
+ } else {
+ additionalProperties.put(CodegenConstants.DEVELOPER_EMAIL, developerEmail);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.DEVELOPER_ORGANIZATION)) {
+ this.setDeveloperOrganization((String) additionalProperties.get(CodegenConstants.DEVELOPER_ORGANIZATION));
+ } else {
+ additionalProperties.put(CodegenConstants.DEVELOPER_ORGANIZATION, developerOrganization);
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.DEVELOPER_ORGANIZATION_URL)) {
+ this.setDeveloperOrganizationUrl((String) additionalProperties.get(CodegenConstants.DEVELOPER_ORGANIZATION_URL));
+ } else {
+ additionalProperties.put(CodegenConstants.DEVELOPER_ORGANIZATION_URL, developerOrganizationUrl);
+ }
+
if (additionalProperties.containsKey(CodegenConstants.LICENSE_NAME)) {
this.setLicenseName((String) additionalProperties.get(CodegenConstants.LICENSE_NAME));
} else {
@@ -926,6 +998,42 @@ public void setArtifactVersion(String artifactVersion) {
this.artifactVersion = artifactVersion;
}
+ public void setArtifactUrl(String artifactUrl) {
+ this.artifactUrl = artifactUrl;
+ }
+
+ public void setArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ }
+
+ public void setScmConnection(String scmConnection) {
+ this.scmConnection = scmConnection;
+ }
+
+ public void setScmDeveloperConnection(String scmDeveloperConnection) {
+ this.scmDeveloperConnection = scmDeveloperConnection;
+ }
+
+ public void setScmUrl(String scmUrl) {
+ this.scmUrl = scmUrl;
+ }
+
+ public void setDeveloperName(String developerName) {
+ this.developerName = developerName;
+ }
+
+ public void setDeveloperEmail(String developerEmail) {
+ this.developerEmail = developerEmail;
+ }
+
+ public void setDeveloperOrganization(String developerOrganization) {
+ this.developerOrganization = developerOrganization;
+ }
+
+ public void setDeveloperOrganizationUrl(String developerOrganizationUrl) {
+ this.developerOrganizationUrl = developerOrganizationUrl;
+ }
+
public void setLicenseName(String licenseName) {
this.licenseName = licenseName;
}
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
index 134e1443da1..bd0a392256f 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
@@ -6,10 +6,12 @@
jar{{artifactId}}{{artifactVersion}}
+ {{artifactUrl}}
+ {{artifactDescription}}
- scm:git:git@github.com:swagger-api/swagger-mustache.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}2.2.0
@@ -23,6 +25,15 @@
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
@@ -107,9 +118,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache
index 5c51b9cd677..17d8943c822 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache
@@ -6,10 +6,12 @@
jar{{artifactId}}{{artifactVersion}}
+ {{artifactUrl}}
+ {{artifactDescription}}
- scm:git:git@github.com:swagger-api/swagger-mustache.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}2.2.0
@@ -22,7 +24,16 @@
repo
-
+
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
@@ -122,9 +133,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
index b34c3856f4d..40cbe01c0bc 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
@@ -6,10 +6,12 @@
jar{{artifactId}}{{artifactVersion}}
+ {{artifactUrl}}
+ {{artifactDescription}}
- scm:git:git@github.com:swagger-api/swagger-mustache.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}2.2.0
@@ -22,7 +24,16 @@
repo
-
+
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
@@ -108,9 +119,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
@@ -159,7 +216,7 @@
javax.elel-api2.2
-
+
{{/performBeanValidation}}
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache
index e38068e27b2..427cc514416 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache
@@ -6,10 +6,12 @@
jar{{artifactId}}{{artifactVersion}}
+ {{artifactUrl}}
+ {{artifactDescription}}
- scm:git:git@github.com:swagger-api/swagger-mustache.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}2.2.0
@@ -22,7 +24,16 @@
repo
-
+
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
@@ -116,9 +127,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/pom.mustache
index 5f2d74d3c53..2434c0da20d 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/pom.mustache
@@ -6,10 +6,12 @@
jar{{artifactId}}{{artifactVersion}}
+ {{artifactUrl}}
+ {{artifactDescription}}
- scm:git:git@github.com:swagger-api/swagger-mustache.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}2.2.0
@@ -22,7 +24,16 @@
repo
-
+
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
@@ -108,9 +119,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
@@ -156,7 +213,7 @@
${retrofit-version}
{{/useRxJava}}
-
+
{{#usePlay24WS}}
@@ -178,7 +235,7 @@
com.fasterxml.jackson.corejackson-databind${jackson-version}
-
+ com.fasterxml.jackson.datatypejackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}
diff --git a/modules/swagger-codegen/src/main/resources/Java/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/pom.mustache
index 30d9b7bb839..43e45ee68fa 100644
--- a/modules/swagger-codegen/src/main/resources/Java/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/pom.mustache
@@ -6,7 +6,13 @@
jar{{artifactId}}{{artifactVersion}}
-
+ {{artifactUrl}}
+ {{artifactDescription}}
+
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}
+ 2.2.0
@@ -19,6 +25,15 @@
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
@@ -119,9 +134,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaClientOptionsTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaClientOptionsTest.java
index ec1bc951f38..a4a13ecbcbc 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaClientOptionsTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaClientOptionsTest.java
@@ -46,6 +46,24 @@ protected void setExpectations() {
times = 1;
clientCodegen.setArtifactVersion(JavaClientOptionsProvider.ARTIFACT_VERSION_VALUE);
times = 1;
+ clientCodegen.setArtifactUrl(JavaClientOptionsProvider.ARTIFACT_URL_VALUE);
+ times = 1;
+ clientCodegen.setArtifactDescription(JavaClientOptionsProvider.ARTIFACT_DESCRIPTION_VALUE);
+ times = 1;
+ clientCodegen.setScmConnection(JavaClientOptionsProvider.SCM_CONNECTION_VALUE);
+ times = 1;
+ clientCodegen.setScmDeveloperConnection(JavaClientOptionsProvider.SCM_DEVELOPER_CONNECTION_VALUE);
+ times = 1;
+ clientCodegen.setScmUrl(JavaClientOptionsProvider.SCM_URL_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperName(JavaClientOptionsProvider.DEVELOPER_NAME_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperEmail(JavaClientOptionsProvider.DEVELOPER_EMAIL_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperOrganization(JavaClientOptionsProvider.DEVELOPER_ORGANIZATION_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperOrganizationUrl(JavaClientOptionsProvider.DEVELOPER_ORGANIZATION_URL_VALUE);
+ times = 1;
clientCodegen.setLicenseName(JavaClientOptionsProvider.LICENSE_NAME_VALUE);
times = 1;
clientCodegen.setLicenseUrl(JavaClientOptionsProvider.LICENSE_URL_VALUE);
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/jaxrs/JaxRSServerOptionsTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/jaxrs/JaxRSServerOptionsTest.java
index 8c6c7149f9b..246be5730f7 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/jaxrs/JaxRSServerOptionsTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/jaxrs/JaxRSServerOptionsTest.java
@@ -41,6 +41,24 @@ protected void setExpectations() {
times = 1;
clientCodegen.setArtifactVersion(JaxRSServerOptionsProvider.ARTIFACT_VERSION_VALUE);
times = 1;
+ clientCodegen.setArtifactUrl(JaxRSServerOptionsProvider.ARTIFACT_URL_VALUE);
+ times = 1;
+ clientCodegen.setArtifactDescription(JaxRSServerOptionsProvider.ARTIFACT_DESCRIPTION_VALUE);
+ times = 1;
+ clientCodegen.setScmConnection(JaxRSServerOptionsProvider.SCM_CONNECTION_VALUE);
+ times = 1;
+ clientCodegen.setScmDeveloperConnection(JaxRSServerOptionsProvider.SCM_DEVELOPER_CONNECTION_VALUE);
+ times = 1;
+ clientCodegen.setScmUrl(JaxRSServerOptionsProvider.SCM_URL_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperName(JaxRSServerOptionsProvider.DEVELOPER_NAME_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperEmail(JaxRSServerOptionsProvider.DEVELOPER_EMAIL_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperOrganization(JaxRSServerOptionsProvider.DEVELOPER_ORGANIZATION_VALUE);
+ times = 1;
+ clientCodegen.setDeveloperOrganizationUrl(JaxRSServerOptionsProvider.DEVELOPER_ORGANIZATION_URL_VALUE);
+ times = 1;
clientCodegen.setSourceFolder(JaxRSServerOptionsProvider.SOURCE_FOLDER_VALUE);
times = 1;
clientCodegen.setLocalVariablePrefix(JaxRSServerOptionsProvider.LOCAL_PREFIX_VALUE);
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java
index 9fe39cc95d3..ed95ad2a40e 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java
@@ -13,9 +13,18 @@ public class JavaOptionsProvider implements OptionsProvider {
public static final String INVOKER_PACKAGE_VALUE = "io.swagger.client.test";
public static final String LICENSE_NAME_VALUE = "Apache License, Version 2.0";
public static final String LICENSE_URL_VALUE = "http://www.apache.org/licenses/LICENSE-2.0";
+ public static final String DEVELOPER_NAME_VALUE = "Swagger";
+ public static final String DEVELOPER_EMAIL_VALUE = "apiteam@swagger.io";
+ public static final String DEVELOPER_ORGANIZATION_VALUE = "Swagger";
+ public static final String DEVELOPER_ORGANIZATION_URL_VALUE = "http://swagger.io";
+ public static final String SCM_CONNECTION_VALUE = "scm:git:git@github.com:swagger-api/swagger-codegen.git";
+ public static final String SCM_DEVELOPER_CONNECTION_VALUE = "scm:git:git@github.com:swagger-api/swagger-codegen.git";
+ public static final String SCM_URL_VALUE = "https://github.com/swagger-api/swagger-codegen";
public static final String SORT_PARAMS_VALUE = "false";
public static final String GROUP_ID_VALUE = "io.swagger.test";
public static final String ARTIFACT_VERSION_VALUE = "1.0.0-SNAPSHOT";
+ public static final String ARTIFACT_URL_VALUE = "https://github.com/swagger-api/swagger-codegen";
+ public static final String ARTIFACT_DESCRIPTION_VALUE = "Swagger Java Client Test";
public static final String SOURCE_FOLDER_VALUE = "src/main/java/test";
public static final String LOCAL_PREFIX_VALUE = "tst";
public static final String SERIALIZABLE_MODEL_VALUE = "false";
@@ -39,6 +48,15 @@ public JavaOptionsProvider() {
.put(CodegenConstants.GROUP_ID, GROUP_ID_VALUE)
.put(CodegenConstants.ARTIFACT_ID, ARTIFACT_ID_VALUE)
.put(CodegenConstants.ARTIFACT_VERSION, ARTIFACT_VERSION_VALUE)
+ .put(CodegenConstants.ARTIFACT_URL, ARTIFACT_URL_VALUE)
+ .put(CodegenConstants.ARTIFACT_DESCRIPTION, ARTIFACT_DESCRIPTION_VALUE)
+ .put(CodegenConstants.SCM_CONNECTION, SCM_CONNECTION_VALUE)
+ .put(CodegenConstants.SCM_DEVELOPER_CONNECTION, SCM_DEVELOPER_CONNECTION_VALUE)
+ .put(CodegenConstants.SCM_URL, SCM_URL_VALUE)
+ .put(CodegenConstants.DEVELOPER_NAME, DEVELOPER_NAME_VALUE)
+ .put(CodegenConstants.DEVELOPER_EMAIL, DEVELOPER_EMAIL_VALUE)
+ .put(CodegenConstants.DEVELOPER_ORGANIZATION, DEVELOPER_ORGANIZATION_VALUE)
+ .put(CodegenConstants.DEVELOPER_ORGANIZATION_URL, DEVELOPER_ORGANIZATION_URL_VALUE)
.put(CodegenConstants.LICENSE_NAME, LICENSE_NAME_VALUE)
.put(CodegenConstants.LICENSE_URL, LICENSE_URL_VALUE)
.put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE)
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JaxRSServerOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JaxRSServerOptionsProvider.java
index 57896db9ca6..efaa7453615 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JaxRSServerOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JaxRSServerOptionsProvider.java
@@ -14,6 +14,15 @@ public class JaxRSServerOptionsProvider implements OptionsProvider {
public static final String SORT_PARAMS_VALUE = "false";
public static final String GROUP_ID_VALUE = "io.swagger.test";
public static final String ARTIFACT_VERSION_VALUE = "1.0.0-SNAPSHOT";
+ public static final String ARTIFACT_URL_VALUE = "https://github.com/swagger-api/swagger-codegen";
+ public static final String ARTIFACT_DESCRIPTION_VALUE = "Swagger Java Client Test";
+ public static final String DEVELOPER_NAME_VALUE = "Swagger";
+ public static final String DEVELOPER_EMAIL_VALUE = "apiteam@swagger.io";
+ public static final String DEVELOPER_ORGANIZATION_VALUE = "Swagger";
+ public static final String DEVELOPER_ORGANIZATION_URL_VALUE = "http://swagger.io";
+ public static final String SCM_CONNECTION_VALUE = "scm:git:git@github.com:swagger-api/swagger-codegen.git";
+ public static final String SCM_DEVELOPER_CONNECTION_VALUE = "scm:git:git@github.com:swagger-api/swagger-codegen.git";
+ public static final String SCM_URL_VALUE = "https://github.com/swagger-api/swagger-codegen";
public static final String LICENSE_NAME_VALUE = "Apache License, Version 2.0";
public static final String LICENSE_URL_VALUE = "http://www.apache.org/licenses/LICENSE-2.0";
public static final String SOURCE_FOLDER_VALUE = "src/main/java/test";
@@ -51,6 +60,15 @@ public Map createOptions() {
.put(CodegenConstants.GROUP_ID, GROUP_ID_VALUE)
.put(CodegenConstants.ARTIFACT_ID, ARTIFACT_ID_VALUE)
.put(CodegenConstants.ARTIFACT_VERSION, ARTIFACT_VERSION_VALUE)
+ .put(CodegenConstants.ARTIFACT_URL, ARTIFACT_URL_VALUE)
+ .put(CodegenConstants.ARTIFACT_DESCRIPTION, ARTIFACT_DESCRIPTION_VALUE)
+ .put(CodegenConstants.SCM_CONNECTION, SCM_CONNECTION_VALUE)
+ .put(CodegenConstants.SCM_DEVELOPER_CONNECTION, SCM_DEVELOPER_CONNECTION_VALUE)
+ .put(CodegenConstants.SCM_URL, SCM_URL_VALUE)
+ .put(CodegenConstants.DEVELOPER_NAME, DEVELOPER_NAME_VALUE)
+ .put(CodegenConstants.DEVELOPER_EMAIL, DEVELOPER_EMAIL_VALUE)
+ .put(CodegenConstants.DEVELOPER_ORGANIZATION, DEVELOPER_ORGANIZATION_VALUE)
+ .put(CodegenConstants.DEVELOPER_ORGANIZATION_URL, DEVELOPER_ORGANIZATION_URL_VALUE)
.put(CodegenConstants.LICENSE_NAME, LICENSE_NAME_VALUE)
.put(CodegenConstants.LICENSE_URL, LICENSE_URL_VALUE)
.put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE)
diff --git a/samples/client/petstore/akka-scala/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/client/petstore/akka-scala/src/main/scala/io/swagger/client/api/PetApi.scala
index b59e7f912b4..50950fa51c2 100644
--- a/samples/client/petstore/akka-scala/src/main/scala/io/swagger/client/api/PetApi.scala
+++ b/samples/client/petstore/akka-scala/src/main/scala/io/swagger/client/api/PetApi.scala
@@ -5,9 +5,9 @@
*/
package io.swagger.client.api
-import io.swagger.client.model.Pet
import io.swagger.client.model.ApiResponse
import java.io.File
+import io.swagger.client.model.Pet
import io.swagger.client.core._
import io.swagger.client.core.CollectionFormats._
import io.swagger.client.core.ApiKeyLocations._
diff --git a/samples/client/petstore/android/httpclient/docs/PetApi.md b/samples/client/petstore/android/httpclient/docs/PetApi.md
index e7b393c8ea7..ff596b3d918 100644
--- a/samples/client/petstore/android/httpclient/docs/PetApi.md
+++ b/samples/client/petstore/android/httpclient/docs/PetApi.md
@@ -222,7 +222,7 @@ Name | Type | Description | Notes
### Authorization
-[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
+[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
### HTTP request headers
diff --git a/samples/client/petstore/android/volley/README.md b/samples/client/petstore/android/volley/README.md
index c92f468b12b..3c9dcf27af0 100644
--- a/samples/client/petstore/android/volley/README.md
+++ b/samples/client/petstore/android/volley/README.md
@@ -1,4 +1,4 @@
-# swagger-petstore-android-volley
+# swagger-android-client
## Requirements
@@ -27,7 +27,7 @@ Add this dependency to your project's POM:
```xml
io.swagger
- swagger-petstore-android-volley
+ swagger-android-client1.0.0compile
@@ -38,7 +38,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "io.swagger:swagger-petstore-android-volley:1.0.0"
+compile "io.swagger:swagger-android-client:1.0.0"
```
### Others
@@ -49,7 +49,7 @@ At first generate the JAR by executing:
Then manually install the following JARs:
-* target/swagger-petstore-android-volley-1.0.0.jar
+* target/swagger-android-client-1.0.0.jar
* target/lib/*.jar
## Getting Started
diff --git a/samples/client/petstore/android/volley/docs/PetApi.md b/samples/client/petstore/android/volley/docs/PetApi.md
index e7b393c8ea7..ff596b3d918 100644
--- a/samples/client/petstore/android/volley/docs/PetApi.md
+++ b/samples/client/petstore/android/volley/docs/PetApi.md
@@ -222,7 +222,7 @@ Name | Type | Description | Notes
### Authorization
-[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
+[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
### HTTP request headers
diff --git a/samples/client/petstore/android/volley/pom.xml b/samples/client/petstore/android/volley/pom.xml
index eed477b639e..a774283da2e 100644
--- a/samples/client/petstore/android/volley/pom.xml
+++ b/samples/client/petstore/android/volley/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4.0.0io.swagger
- swagger-petstore-android-volley
+ swagger-android-client1.0.0
diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java
index 644a15c5da3..9772342710a 100644
--- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java
@@ -576,7 +576,7 @@ public Pet getPetById (Long petId) throws TimeoutException, ExecutionException,
// normal form params
}
- String[] authNames = new String[] { "api_key", "petstore_auth" };
+ String[] authNames = new String[] { "petstore_auth", "api_key" };
try {
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
@@ -646,7 +646,7 @@ public void getPetById (Long petId, final Response.Listener responseListene
// normal form params
}
- String[] authNames = new String[] { "api_key", "petstore_auth" };
+ String[] authNames = new String[] { "petstore_auth", "api_key" };
try {
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala
index 97f1bb2ba62..f11d2aaa1b5 100644
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala
+++ b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala
@@ -1,8 +1,8 @@
package io.swagger.client.api
-import io.swagger.client.model.Pet
-import java.io.File
import io.swagger.client.model.ApiResponse
+import java.io.File
+import io.swagger.client.model.Pet
import com.wordnik.swagger.client._
import scala.concurrent.Future
import collection.mutable
diff --git a/samples/client/petstore/clojure/.swagger-codegen-ignore b/samples/client/petstore/clojure/.swagger-codegen-ignore
new file mode 100644
index 00000000000..c5fa491b4c5
--- /dev/null
+++ b/samples/client/petstore/clojure/.swagger-codegen-ignore
@@ -0,0 +1,23 @@
+# Swagger Codegen Ignore
+# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj b/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj
index 96c1cf85fc2..845aa55b526 100644
--- a/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj
+++ b/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj
@@ -24,28 +24,6 @@
([optional-params]
(:data (add-pet-with-http-info optional-params))))
-(defn add-pet-using-byte-array-with-http-info
- "Fake endpoint to test byte array in body parameter for adding a new pet to the store
- "
- ([] (add-pet-using-byte-array-with-http-info nil))
- ([{:keys [body ]}]
- (call-api "/pet?testing_byte_array=true" :post
- {:path-params {}
- :header-params {}
- :query-params {}
- :form-params {}
- :body-param body
- :content-types ["application/json" "application/xml"]
- :accepts ["application/json" "application/xml"]
- :auth-names ["petstore_auth"]})))
-
-(defn add-pet-using-byte-array
- "Fake endpoint to test byte array in body parameter for adding a new pet to the store
- "
- ([] (add-pet-using-byte-array nil))
- ([optional-params]
- (:data (add-pet-using-byte-array-with-http-info optional-params))))
-
(defn delete-pet-with-http-info
"Deletes a pet
"
@@ -120,7 +98,7 @@
:form-params {}
:content-types []
:accepts ["application/json" "application/xml"]
- :auth-names ["api_key" "petstore_auth"]}))
+ :auth-names ["petstore_auth" "api_key"]}))
(defn get-pet-by-id
"Find pet by ID
@@ -128,44 +106,6 @@
[pet-id ]
(:data (get-pet-by-id-with-http-info pet-id)))
-(defn get-pet-by-id-in-object-with-http-info
- "Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
- [pet-id ]
- (call-api "/pet/{petId}?response=inline_arbitrary_object" :get
- {:path-params {"petId" pet-id }
- :header-params {}
- :query-params {}
- :form-params {}
- :content-types []
- :accepts ["application/json" "application/xml"]
- :auth-names ["api_key" "petstore_auth"]}))
-
-(defn get-pet-by-id-in-object
- "Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
- [pet-id ]
- (:data (get-pet-by-id-in-object-with-http-info pet-id)))
-
-(defn pet-pet-idtesting-byte-arraytrue-get-with-http-info
- "Fake endpoint to test byte array return by 'Find pet by ID'
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
- [pet-id ]
- (call-api "/pet/{petId}?testing_byte_array=true" :get
- {:path-params {"petId" pet-id }
- :header-params {}
- :query-params {}
- :form-params {}
- :content-types []
- :accepts ["application/json" "application/xml"]
- :auth-names ["api_key" "petstore_auth"]}))
-
-(defn pet-pet-idtesting-byte-arraytrue-get
- "Fake endpoint to test byte array return by 'Find pet by ID'
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
- [pet-id ]
- (:data (pet-pet-idtesting-byte-arraytrue-get-with-http-info pet-id)))
-
(defn update-pet-with-http-info
"Update an existing pet
"
@@ -229,3 +169,4 @@
([pet-id ] (upload-file pet-id nil))
([pet-id optional-params]
(:data (upload-file-with-http-info pet-id optional-params))))
+
diff --git a/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj b/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj
index 1e3cc25e4a6..04d185a8086 100644
--- a/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj
+++ b/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj
@@ -21,27 +21,6 @@
[order-id ]
(:data (delete-order-with-http-info order-id)))
-(defn find-orders-by-status-with-http-info
- "Finds orders by status
- A single status value can be provided as a string"
- ([] (find-orders-by-status-with-http-info nil))
- ([{:keys [status ]}]
- (call-api "/store/findByStatus" :get
- {:path-params {}
- :header-params {}
- :query-params {"status" status }
- :form-params {}
- :content-types []
- :accepts ["application/json" "application/xml"]
- :auth-names ["test_api_client_id" "test_api_client_secret"]})))
-
-(defn find-orders-by-status
- "Finds orders by status
- A single status value can be provided as a string"
- ([] (find-orders-by-status nil))
- ([optional-params]
- (:data (find-orders-by-status-with-http-info optional-params))))
-
(defn get-inventory-with-http-info
"Returns pet inventories by status
Returns a map of status codes to quantities"
@@ -61,25 +40,6 @@
[]
(:data (get-inventory-with-http-info)))
-(defn get-inventory-in-object-with-http-info
- "Fake endpoint to test arbitrary object return by 'Get inventory'
- Returns an arbitrary object which is actually a map of status codes to quantities"
- []
- (call-api "/store/inventory?response=arbitrary_object" :get
- {:path-params {}
- :header-params {}
- :query-params {}
- :form-params {}
- :content-types []
- :accepts ["application/json" "application/xml"]
- :auth-names ["api_key"]}))
-
-(defn get-inventory-in-object
- "Fake endpoint to test arbitrary object return by 'Get inventory'
- Returns an arbitrary object which is actually a map of status codes to quantities"
- []
- (:data (get-inventory-in-object-with-http-info)))
-
(defn get-order-by-id-with-http-info
"Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions"
@@ -91,7 +51,7 @@
:form-params {}
:content-types []
:accepts ["application/json" "application/xml"]
- :auth-names ["test_api_key_header" "test_api_key_query"]}))
+ :auth-names []}))
(defn get-order-by-id
"Find purchase order by ID
@@ -112,7 +72,7 @@
:body-param body
:content-types []
:accepts ["application/json" "application/xml"]
- :auth-names ["test_api_client_id" "test_api_client_secret"]})))
+ :auth-names []})))
(defn place-order
"Place an order for a pet
@@ -120,3 +80,4 @@
([] (place-order nil))
([optional-params]
(:data (place-order-with-http-info optional-params))))
+
diff --git a/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj b/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj
index 07b016d641a..26e3dffc624 100644
--- a/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj
+++ b/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj
@@ -167,3 +167,4 @@
([username ] (update-user username nil))
([username optional-params]
(:data (update-user-with-http-info username optional-params))))
+
diff --git a/samples/client/petstore/clojure/src/swagger_petstore/core.clj b/samples/client/petstore/clojure/src/swagger_petstore/core.clj
index f01f3061e0d..dc66c644aea 100644
--- a/samples/client/petstore/clojure/src/swagger_petstore/core.clj
+++ b/samples/client/petstore/clojure/src/swagger_petstore/core.clj
@@ -8,12 +8,8 @@
(java.text SimpleDateFormat)))
(def auth-definitions
- {"test_api_key_header" {:type :api-key :in :header :param-name "test_api_key_header"}
- "api_key" {:type :api-key :in :header :param-name "api_key"}
- "test_api_client_secret" {:type :api-key :in :header :param-name "x-test_api_client_secret"}
- "test_api_client_id" {:type :api-key :in :header :param-name "x-test_api_client_id"}
- "test_api_key_query" {:type :api-key :in :query :param-name "test_api_key_query"}
- "petstore_auth" {:type :oauth2}})
+ {"api_key" {:type :api-key :in :header :param-name "api_key"}"petstore_auth" {:type :oauth2}
+ })
(def default-api-context
"Default API context."
@@ -21,12 +17,8 @@
:date-format "yyyy-MM-dd"
:datetime-format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
:debug false
- :auths {"test_api_key_header" nil
- "api_key" nil
- "test_api_client_secret" nil
- "test_api_client_id" nil
- "test_api_key_query" nil
- "petstore_auth" nil}})
+ :auths {"api_key" nil"petstore_auth" nil
+ }})
(def ^:dynamic *api-context*
"Dynamic API context to be applied in API calls."
diff --git a/samples/client/petstore/cpprest/model/Pet.h b/samples/client/petstore/cpprest/model/Pet.h
index 91704dc9ed7..065c46bdb93 100644
--- a/samples/client/petstore/cpprest/model/Pet.h
+++ b/samples/client/petstore/cpprest/model/Pet.h
@@ -22,10 +22,10 @@
#include "ModelBase.h"
-#include "Category.h"
+#include "Tag.h"
#include
+#include "Category.h"
#include
-#include "Tag.h"
namespace io {
namespace swagger {
diff --git a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md
index 6cd17fe5c76..f6088a15e7c 100644
--- a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md
+++ b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md
@@ -6,8 +6,8 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0
- SDK version: 1.0.0
-- Build date: 2016-12-09T16:46:08.135+08:00
-- Build package: class io.swagger.codegen.languages.CsharpDotNet2ClientCodegen
+- Build date: 2017-01-05T14:31:44.681+11:00
+- Build package: io.swagger.codegen.languages.CsharpDotNet2ClientCodegen
## Frameworks supported
diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
index b7c1013e434..8b9caa84cab 100644
--- a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
+++ b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{959A8039-E3B9-4660-A666-840955E4520C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{BF3FE4BA-0CAB-4E4F-8D56-F5CBB64BD7A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
@@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
-{959A8039-E3B9-4660-A666-840955E4520C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{959A8039-E3B9-4660-A666-840955E4520C}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{959A8039-E3B9-4660-A666-840955E4520C}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{959A8039-E3B9-4660-A666-840955E4520C}.Release|Any CPU.Build.0 = Release|Any CPU
+{BF3FE4BA-0CAB-4E4F-8D56-F5CBB64BD7A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{BF3FE4BA-0CAB-4E4F-8D56-F5CBB64BD7A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{BF3FE4BA-0CAB-4E4F-8D56-F5CBB64BD7A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{BF3FE4BA-0CAB-4E4F-8D56-F5CBB64BD7A2}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md
index 67a001aa0cf..97daf7c1a4d 100644
--- a/samples/client/petstore/csharp/SwaggerClient/README.md
+++ b/samples/client/petstore/csharp/SwaggerClient/README.md
@@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0
- SDK version: 1.0.0
-- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
+- Build package: io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
index de9d842ee06..44699db1dc2 100644
--- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
+++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
@@ -15,6 +15,8 @@ Method | HTTP request | Description
To test \"client\" model
+To test \"client\" model
+
### Example
```csharp
using System;
@@ -166,6 +168,8 @@ void (empty response body)
To test enum parameters
+To test enum parameters
+
### Example
```csharp
using System;
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs
index 52a26a00dbf..502deb884fd 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs
@@ -28,7 +28,7 @@ public interface IFakeApi : IApiAccessor
/// To test \"client\" model
///
///
- ///
+ /// To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -39,7 +39,7 @@ public interface IFakeApi : IApiAccessor
/// To test \"client\" model
///
///
- ///
+ /// To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
///
///
- ///
+ /// To test enum parameters
///
/// Thrown when fails to make API call
/// Form parameter enum test (string array) (optional)
@@ -114,7 +114,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
///
///
- ///
+ /// To test enum parameters
///
/// Thrown when fails to make API call
/// Form parameter enum test (string array) (optional)
@@ -133,7 +133,7 @@ public interface IFakeApi : IApiAccessor
/// To test \"client\" model
///
///
- ///
+ /// To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -144,7 +144,7 @@ public interface IFakeApi : IApiAccessor
/// To test \"client\" model
///
///
- ///
+ /// To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -201,7 +201,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
///
///
- ///
+ /// To test enum parameters
///
/// Thrown when fails to make API call
/// Form parameter enum test (string array) (optional)
@@ -219,7 +219,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
///
///
- ///
+ /// To test enum parameters
///
/// Thrown when fails to make API call
/// Form parameter enum test (string array) (optional)
@@ -345,7 +345,7 @@ public void AddDefaultHeader(string key, string value)
}
///
- /// To test \"client\" model
+ /// To test \"client\" model To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -357,7 +357,7 @@ public ModelClient TestClientModel (ModelClient body)
}
///
- /// To test \"client\" model
+ /// To test \"client\" model To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -423,7 +423,7 @@ public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body)
}
///
- /// To test \"client\" model
+ /// To test \"client\" model To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -436,7 +436,7 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode
}
///
- /// To test \"client\" model
+ /// To test \"client\" model To test \"client\" model
///
/// Thrown when fails to make API call
/// client model
@@ -756,7 +756,7 @@ public async System.Threading.Tasks.Task> TestEndpointParame
}
///
- /// To test enum parameters
+ /// To test enum parameters To test enum parameters
///
/// Thrown when fails to make API call
/// Form parameter enum test (string array) (optional)
@@ -774,7 +774,7 @@ public void TestEnumParameters (List enumFormStringArray = null, string
}
///
- /// To test enum parameters
+ /// To test enum parameters To test enum parameters
///
/// Thrown when fails to make API call
/// Form parameter enum test (string array) (optional)
@@ -844,7 +844,7 @@ public ApiResponse
+
+
+ Unlicense
+ http://www.apache.org/licenses/LICENSE-2.0.html
+ repo
+
+
+
+
+
+ Swagger
+ apiteam@swagger.io
+ Swagger
+ http://swagger.io
+
+
+
@@ -108,9 +127,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java
index d37be0a0de2..eb34e017439 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java
@@ -324,7 +324,7 @@ public String parameterToString(Object param) {
StringBuilder b = new StringBuilder();
for(Object o : (Collection)param) {
if(b.length() > 0) {
- b.append(",");
+ b.append(',');
}
b.append(String.valueOf(o));
}
@@ -343,7 +343,7 @@ public List parameterToPairs(String collectionFormat, String name, Object
// preconditions
if (name == null || name.isEmpty() || value == null) return params;
- Collection valueCollection = null;
+ Collection valueCollection;
if (value instanceof Collection) {
valueCollection = (Collection) value;
} else {
@@ -356,10 +356,10 @@ public List parameterToPairs(String collectionFormat, String name, Object
}
// get the collection format
- collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv
+ String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv
// create the params based on the collection format
- if (collectionFormat.equals("multi")) {
+ if ("multi".equals(format)) {
for (Object item : valueCollection) {
params.add(new Pair(name, parameterToString(item)));
}
@@ -369,13 +369,13 @@ public List parameterToPairs(String collectionFormat, String name, Object
String delimiter = ",";
- if (collectionFormat.equals("csv")) {
+ if ("csv".equals(format)) {
delimiter = ",";
- } else if (collectionFormat.equals("ssv")) {
+ } else if ("ssv".equals(format)) {
delimiter = " ";
- } else if (collectionFormat.equals("tsv")) {
+ } else if ("tsv".equals(format)) {
delimiter = "\t";
- } else if (collectionFormat.equals("pipes")) {
+ } else if ("pipes".equals(format)) {
delimiter = "|";
}
@@ -459,7 +459,7 @@ public String escapeString(String str) {
* Content-Type (only JSON is supported for now).
*/
public Entity> serialize(Object obj, Map formParams, String contentType) throws ApiException {
- Entity> entity = null;
+ Entity> entity;
if (contentType.startsWith("multipart/form-data")) {
MultiPart multiPart = new MultiPart();
for (Entry param: formParams.entrySet()) {
@@ -490,6 +490,7 @@ public Entity> serialize(Object obj, Map formParams, String co
/**
* Deserialize response body to Java object according to the Content-Type.
*/
+ @SuppressWarnings("unchecked")
public T deserialize(Response response, GenericType returnType) throws ApiException {
if (response == null || returnType == null) {
return null;
@@ -498,9 +499,8 @@ public T deserialize(Response response, GenericType returnType) throws Ap
if ("byte[]".equals(returnType.toString())) {
// Handle binary response (byte array).
return (T) response.readEntity(byte[].class);
- } else if (returnType.equals(File.class)) {
+ } else if (returnType.getRawType() == File.class) {
// Handle file downloading.
- @SuppressWarnings("unchecked")
T file = (T) downloadFileFromResponse(response);
return file;
}
@@ -541,13 +541,13 @@ public File prepareDownloadFile(Response response) throws IOException {
filename = matcher.group(1);
}
- String prefix = null;
+ String prefix;
String suffix = null;
if (filename == null) {
prefix = "download-";
suffix = "";
} else {
- int pos = filename.lastIndexOf(".");
+ int pos = filename.lastIndexOf('.');
if (pos == -1) {
prefix = filename + "-";
} else {
@@ -597,16 +597,17 @@ public T invokeAPI(String path, String method, List queryParams, Objec
Invocation.Builder invocationBuilder = target.request().accept(accept);
- for (String key : headerParams.keySet()) {
- String value = headerParams.get(key);
+ for (Entry entry : headerParams.entrySet()) {
+ String value = entry.getValue();
if (value != null) {
- invocationBuilder = invocationBuilder.header(key, value);
+ invocationBuilder = invocationBuilder.header(entry.getKey(), value);
}
}
- for (String key : defaultHeaderMap.keySet()) {
+ for (Entry entry : defaultHeaderMap.entrySet()) {
+ String key = entry.getKey();
if (!headerParams.containsKey(key)) {
- String value = defaultHeaderMap.get(key);
+ String value = entry.getValue();
if (value != null) {
invocationBuilder = invocationBuilder.header(key, value);
}
@@ -615,7 +616,7 @@ public T invokeAPI(String path, String method, List queryParams, Objec
Entity> entity = serialize(body, formParams, contentType);
- Response response = null;
+ Response response;
if ("GET".equals(method)) {
response = invocationBuilder.get();
@@ -625,6 +626,8 @@ public T invokeAPI(String path, String method, List queryParams, Objec
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.delete();
+ } else if ("PATCH".equals(method)) {
+ response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity);
} else {
throw new ApiException(500, "unknown method type " + method);
}
@@ -634,7 +637,7 @@ public T invokeAPI(String path, String method, List queryParams, Objec
if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) {
return null;
- } else if (response.getStatusInfo().getFamily().equals(Status.Family.SUCCESSFUL)) {
+ } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
if (returnType == null)
return null;
else
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiException.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiException.java
index 02a967d8373..d0b5cfc1e57 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiException.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiException.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Configuration.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Configuration.java
index 57e53b2d598..cbf868efb85 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Configuration.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Configuration.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Pair.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Pair.java
index 9ad2d246519..b75cd316ac1 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Pair.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/Pair.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/RFC3339DateFormat.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/RFC3339DateFormat.java
index d662f9457d7..e8df24310aa 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/RFC3339DateFormat.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/RFC3339DateFormat.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package io.swagger.client;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/StringUtil.java
index 31140c76df4..339a3fb36d5 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/StringUtil.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java
index 299cc5765af..1bc9d46a7b6 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java
@@ -7,10 +7,10 @@
import javax.ws.rs.core.GenericType;
+import java.math.BigDecimal;
import io.swagger.client.model.Client;
-import org.joda.time.LocalDate;
import org.joda.time.DateTime;
-import java.math.BigDecimal;
+import org.joda.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
@@ -39,7 +39,7 @@ public void setApiClient(ApiClient apiClient) {
/**
* To test \"client\" model
- *
+ * To test \"client\" model
* @param body client model (required)
* @return Client
* @throws ApiException if fails to make API call
@@ -176,7 +176,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat
}
/**
* To test enum parameters
- *
+ * To test enum parameters
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
@@ -187,7 +187,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @throws ApiException if fails to make API call
*/
- public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, BigDecimal enumQueryInteger, Double enumQueryDouble) throws ApiException {
+ public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
@@ -215,12 +215,12 @@ public void testEnumParameters(List enumFormStringArray, String enumForm
localVarFormParams.put("enum_query_double", enumQueryDouble);
final String[] localVarAccepts = {
- "application/json"
+ "*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
- "application/json"
+ "*/*"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java
index ab85c4ac394..131088873d1 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java
@@ -7,9 +7,9 @@
import javax.ws.rs.core.GenericType;
-import io.swagger.client.model.Pet;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
+import io.swagger.client.model.Pet;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
index 0e0fdb63fb3..5c6925473e5 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/Authentication.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/Authentication.java
index 0ff06e3b86f..e40d7ff7002 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/Authentication.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/Authentication.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/HttpBasicAuth.java
index 420178c112d..788b63a9918 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/HttpBasicAuth.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/HttpBasicAuth.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuth.java
index c1b64913ab8..2d9dc9da8b5 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuth.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuth.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuthFlow.java
index 18c25738e0f..b3718a0643c 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuthFlow.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/auth/OAuthFlow.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java
index 9c7eefd8142..d25a531da70 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java
index 37322036a3b..b1c6d8175fd 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
@@ -28,13 +16,18 @@
import org.apache.commons.lang3.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
-
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className" )
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = Dog.class, name = "Dog"),@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
+})
public class Animal {
@JsonProperty("className")
private String className = null;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java
index e8d42abef86..ac4c22a76d7 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java
index 865301853a5..6442d6cb9e3 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java
index 13b18d821a8..8b804b0b802 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java
index 8d76222e80e..0a1faf8633d 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java
index 67da93eaf5a..03d398d9506 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java
index 65e7653b4e2..49e34cf1a6e 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java
new file mode 100644
index 00000000000..f682855449e
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java
@@ -0,0 +1,90 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import org.apache.commons.lang3.ObjectUtils;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Model for testing model with \"_class\" property
+ */
+@ApiModel(description = "Model for testing model with \"_class\" property")
+
+public class ClassModel {
+ @JsonProperty("_class")
+ private String propertyClass = null;
+
+ public ClassModel propertyClass(String propertyClass) {
+ this.propertyClass = propertyClass;
+ return this;
+ }
+
+ /**
+ * Get propertyClass
+ * @return propertyClass
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getPropertyClass() {
+ return propertyClass;
+ }
+
+ public void setPropertyClass(String propertyClass) {
+ this.propertyClass = propertyClass;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ClassModel classModel = (ClassModel) o;
+ return ObjectUtils.equals(this.propertyClass, classModel.propertyClass);
+ }
+
+ @Override
+ public int hashCode() {
+ return ObjectUtils.hashCodeMulti(propertyClass);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ClassModel {\n");
+
+ sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java
index 7236cb848d9..49799a3ca84 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java
index 83cf2efd730..e8a8a629ed8 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java
index b91b2f9e8b0..d15264a0372 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumClass.java
index 39a75ac97f4..1732c2f241d 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumClass.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumClass.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java
index efa77302887..b09055b9942 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
@@ -30,6 +18,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.OuterEnum;
/**
* EnumTest
@@ -137,6 +126,9 @@ public static EnumNumberEnum fromValue(String text) {
@JsonProperty("enum_number")
private EnumNumberEnum enumNumber = null;
+ @JsonProperty("outerEnum")
+ private OuterEnum outerEnum = null;
+
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
@@ -191,6 +183,24 @@ public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
+ public EnumTest outerEnum(OuterEnum outerEnum) {
+ this.outerEnum = outerEnum;
+ return this;
+ }
+
+ /**
+ * Get outerEnum
+ * @return outerEnum
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public OuterEnum getOuterEnum() {
+ return outerEnum;
+ }
+
+ public void setOuterEnum(OuterEnum outerEnum) {
+ this.outerEnum = outerEnum;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
@@ -203,12 +213,13 @@ public boolean equals(java.lang.Object o) {
EnumTest enumTest = (EnumTest) o;
return ObjectUtils.equals(this.enumString, enumTest.enumString) &&
ObjectUtils.equals(this.enumInteger, enumTest.enumInteger) &&
- ObjectUtils.equals(this.enumNumber, enumTest.enumNumber);
+ ObjectUtils.equals(this.enumNumber, enumTest.enumNumber) &&
+ ObjectUtils.equals(this.outerEnum, enumTest.outerEnum);
}
@Override
public int hashCode() {
- return ObjectUtils.hashCodeMulti(enumString, enumInteger, enumNumber);
+ return ObjectUtils.hashCodeMulti(enumString, enumInteger, enumNumber, outerEnum);
}
@@ -220,6 +231,7 @@ public String toString() {
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
+ sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java
index 871c46a1d4d..af25c22a056 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
@@ -85,8 +73,8 @@ public FormatTest integer(Integer integer) {
/**
* Get integer
- * minimum: 10.0
- * maximum: 100.0
+ * minimum: 10
+ * maximum: 100
* @return integer
**/
@ApiModelProperty(example = "null", value = "")
@@ -105,8 +93,8 @@ public FormatTest int32(Integer int32) {
/**
* Get int32
- * minimum: 20.0
- * maximum: 200.0
+ * minimum: 20
+ * maximum: 200
* @return int32
**/
@ApiModelProperty(example = "null", value = "")
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java
index 61a27927a45..2c7bd1eed1e 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java
index 94c5805a235..770b018c3e4 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index bf3fbe4876c..8f29606eec5 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java
index ee1c0b84b3e..23dba81e4bf 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java
index f297c62d02a..6eddaf96ac6 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java
index 6b1651ea352..26925e54c65 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java
index 72338ad60ea..a4ddcaef6b3 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java
index 2a96764e4c6..07eb245e799 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java
index 1a72afa5da3..fa5b42cefcd 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterEnum.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterEnum.java
new file mode 100644
index 00000000000..75577d61434
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterEnum.java
@@ -0,0 +1,52 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import org.apache.commons.lang3.ObjectUtils;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+/**
+ * Gets or Sets OuterEnum
+ */
+public enum OuterEnum {
+
+ PLACED("placed"),
+
+ APPROVED("approved"),
+
+ DELIVERED("delivered");
+
+ private String value;
+
+ OuterEnum(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static OuterEnum fromValue(String text) {
+ for (OuterEnum b : OuterEnum.values()) {
+ if (String.valueOf(b.value).equals(text)) {
+ return b;
+ }
+ }
+ return null;
+ }
+}
+
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java
index 5afa9425acf..98d279c74ea 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java
index 7e50551c137..17704aaa98b 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java
index 3fad665435c..29e3c93931d 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java
index 4109837bb89..8ad6341b843 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java
index 9333959c881..98ac173d267 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml
index 7e8523783d2..be696a53993 100644
--- a/samples/client/petstore/java/jersey2-java8/pom.xml
+++ b/samples/client/petstore/java/jersey2-java8/pom.xml
@@ -6,8 +6,10 @@
jarswagger-petstore-jersey21.0.0
+ https://github.com/swagger-api/swagger-codegen
+ Swagger Java
- scm:git:git@github.com:swagger-api/swagger-mustache.git
+ scm:git:git@github.com:swagger-api/swagger-codegen.gitscm:git:git@github.com:swagger-api/swagger-codegen.githttps://github.com/swagger-api/swagger-codegen
@@ -22,7 +24,16 @@
repo
-
+
+
+
+ Swagger
+ apiteam@swagger.io
+ Swagger
+ http://swagger.io
+
+
+
@@ -116,9 +127,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml
index 5e8b8375da0..1ead3565719 100644
--- a/samples/client/petstore/java/jersey2/pom.xml
+++ b/samples/client/petstore/java/jersey2/pom.xml
@@ -6,8 +6,10 @@
jarswagger-petstore-jersey21.0.0
+ https://github.com/swagger-api/swagger-codegen
+ Swagger Java
- scm:git:git@github.com:swagger-api/swagger-mustache.git
+ scm:git:git@github.com:swagger-api/swagger-codegen.gitscm:git:git@github.com:swagger-api/swagger-codegen.githttps://github.com/swagger-api/swagger-codegen
@@ -22,7 +24,16 @@
repo
-
+
+
+
+ Swagger
+ apiteam@swagger.io
+ Swagger
+ http://swagger.io
+
+
+
@@ -116,9 +127,55 @@
org.apache.maven.pluginsmaven-javadoc-plugin2.10.4
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
io.swagger
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.travis.yml b/samples/client/petstore/java/okhttp-gson-parcelableModel/.travis.yml
index 33e79472abd..70cb81a67c2 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.travis.yml
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.travis.yml
@@ -1,18 +1,6 @@
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
language: java
jdk:
- oraclejdk8
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md
index be6e56fa8ce..6e9f71ce7dd 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md
@@ -4,8 +4,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**className** | **String** | |
-**color** | **String** | | [optional]
**declawed** | **Boolean** | | [optional]
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md
new file mode 100644
index 00000000000..64f880c8786
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md
@@ -0,0 +1,10 @@
+
+# ClassModel
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**propertyClass** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md
new file mode 100644
index 00000000000..5c490ea166c
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md
@@ -0,0 +1,10 @@
+
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md
index 71a7dbe809e..ac7cea323ff 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md
@@ -4,8 +4,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**className** | **String** | |
-**color** | **String** | | [optional]
**breed** | **String** | | [optional]
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md
new file mode 100644
index 00000000000..4dddc0bfd27
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md
@@ -0,0 +1,27 @@
+
+# EnumArrays
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional]
+**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional]
+
+
+
+## Enum: JustSymbolEnum
+Name | Value
+---- | -----
+GREATER_THAN_OR_EQUAL_TO | ">="
+DOLLAR | "$"
+
+
+
+## Enum: List<ArrayEnumEnum>
+Name | Value
+---- | -----
+FISH | "fish"
+CRAB | "crab"
+
+
+
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md
index 29b6d288c8f..08fee344882 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
+**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md
index 21a4db7c377..284ae074be9 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md
@@ -4,13 +4,59 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
+[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
+[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
-> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
+> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -19,25 +65,36 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
```java
// Import classes:
+//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
+//import io.swagger.client.Configuration;
+//import io.swagger.client.auth.*;
//import io.swagger.client.api.FakeApi;
+ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+// Configure HTTP basic authorization: http_basic_test
+HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
+http_basic_test.setUsername("YOUR USERNAME");
+http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None
Double _double = 3.4D; // Double | None
-String string = "string_example"; // String | None
+String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = B; // byte[] | None
Integer integer = 56; // Integer | None
Integer int32 = 56; // Integer | None
Long int64 = 789L; // Long | None
Float _float = 3.4F; // Float | None
+String string = "string_example"; // String | None
byte[] binary = B; // byte[] | None
LocalDate date = new LocalDate(); // LocalDate | None
DateTime dateTime = new DateTime(); // DateTime | None
String password = "password_example"; // String | None
+String paramCallback = "paramCallback_example"; // String | None
try {
- apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
+ apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEndpointParameters");
e.printStackTrace();
@@ -50,16 +107,18 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **BigDecimal**| None |
**_double** | **Double**| None |
- **string** | **String**| None |
+ **patternWithoutDelimiter** | **String**| None |
**_byte** | **byte[]**| None |
**integer** | **Integer**| None | [optional]
**int32** | **Integer**| None | [optional]
**int64** | **Long**| None | [optional]
**_float** | **Float**| None | [optional]
+ **string** | **String**| None | [optional]
**binary** | **byte[]**| None | [optional]
**date** | **LocalDate**| None | [optional]
**dateTime** | **DateTime**| None | [optional]
**password** | **String**| None | [optional]
+ **paramCallback** | **String**| None | [optional]
### Return type
@@ -67,18 +126,20 @@ null (empty response body)
### Authorization
-No authorization required
+[http_basic_test](../README.md#http_basic_test)
### HTTP request headers
- **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
-
-# **testEnumQueryParameters**
-> testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble)
+
+# **testEnumParameters**
+> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble)
+
+To test enum parameters
-To test enum query parameters
+To test enum parameters
### Example
```java
@@ -88,13 +149,18 @@ To test enum query parameters
FakeApi apiInstance = new FakeApi();
+List enumFormStringArray = Arrays.asList("enumFormStringArray_example"); // List | Form parameter enum test (string array)
+String enumFormString = "-efg"; // String | Form parameter enum test (string)
+List enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_example"); // List | Header parameter enum test (string array)
+String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
+List enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List | Query parameter enum test (string array)
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
-BigDecimal enumQueryInteger = new BigDecimal(); // BigDecimal | Query parameter enum test (double)
+Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
try {
- apiInstance.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
+ apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEnumQueryParameters");
+ System.err.println("Exception when calling FakeApi#testEnumParameters");
e.printStackTrace();
}
```
@@ -103,8 +169,13 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+ **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
+ **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
+ **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
+ **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
+ **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
- **enumQueryInteger** | **BigDecimal**| Query parameter enum test (double) | [optional]
+ **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional]
### Return type
@@ -117,6 +188,6 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: application/json
+ - **Content-Type**: */*
+ - **Accept**: */*
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md
index c671e97ffbc..714a97a40d9 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md
@@ -12,6 +12,8 @@ Name | Type | Description | Notes
## Enum: Map<String, InnerEnum>
Name | Value
---- | -----
+UPPER | "UPPER"
+LOWER | "lower"
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md
index b47618b28cc..5b3a9a0e46d 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
-**PropertyClass** | **String** | | [optional]
+**propertyClass** | **String** | | [optional]
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterEnum.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterEnum.md
new file mode 100644
index 00000000000..ed2cb206789
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterEnum.md
@@ -0,0 +1,14 @@
+
+# OuterEnum
+
+## Enum
+
+
+* `PLACED` (value: `"placed"`)
+
+* `APPROVED` (value: `"approved"`)
+
+* `DELIVERED` (value: `"delivered"`)
+
+
+
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
index e0314e20e51..3b5f84043e3 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
@@ -158,7 +158,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | [**List<String>**](String.md)| Status values that need to be considered for filter |
+ **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
### Return type
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiCallback.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiCallback.java
index a2460c37ee3..be36cd4675d 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiCallback.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiCallback.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java
index c4137dcb816..d014d7d4035 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiException.java
index 02a967d8373..d0b5cfc1e57 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiException.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiException.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiResponse.java
index b87ea49a02e..6baa9120c69 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiResponse.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiResponse.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Configuration.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Configuration.java
index 57e53b2d598..cbf868efb85 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Configuration.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Configuration.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java
index a734bec47f1..5692584772f 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Pair.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Pair.java
index 9ad2d246519..b75cd316ac1 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Pair.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/Pair.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressRequestBody.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressRequestBody.java
index fee9da83ddd..a06ea04a4d0 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressRequestBody.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressRequestBody.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressResponseBody.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressResponseBody.java
index 761a23a2869..48c4bfa92d5 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressResponseBody.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ProgressResponseBody.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/StringUtil.java
index 31140c76df4..339a3fb36d5 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/StringUtil.java
@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java
index 975bd34004c..bb897d07d80 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java
@@ -8,488 +8,513 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
-
-
-package io.swagger.client.api;
-
-import io.swagger.client.ApiCallback;
-import io.swagger.client.ApiClient;
-import io.swagger.client.ApiException;
-import io.swagger.client.ApiResponse;
-import io.swagger.client.Configuration;
-import io.swagger.client.Pair;
-import io.swagger.client.ProgressRequestBody;
-import io.swagger.client.ProgressResponseBody;
-
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-import io.swagger.client.model.Client;
-import org.joda.time.LocalDate;
-import org.joda.time.DateTime;
-import java.math.BigDecimal;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class FakeApi {
- private ApiClient apiClient;
-
- public FakeApi() {
- this(Configuration.getDefaultApiClient());
- }
-
- public FakeApi(ApiClient apiClient) {
- this.apiClient = apiClient;
- }
-
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
- }
-
- /* Build call for testClientModel */
- private com.squareup.okhttp.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = body;
-
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException("Missing the required parameter 'body' when calling testClientModel(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/fake".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/json"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * To test \"client\" model
- *
- * @param body client model (required)
- * @return Client
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public Client testClientModel(Client body) throws ApiException {
- ApiResponse resp = testClientModelWithHttpInfo(body);
- return resp.getData();
- }
-
- /**
- * To test \"client\" model
- *
- * @param body client model (required)
- * @return ApiResponse<Client>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException {
- com.squareup.okhttp.Call call = testClientModelCall(body, null, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * To test \"client\" model (asynchronously)
- *
- * @param body client model (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call testClientModelAsync(Client body, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = testClientModelCall(body, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
- /* Build call for testEndpointParameters */
- private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'number' is set
- if (number == null) {
- throw new ApiException("Missing the required parameter 'number' when calling testEndpointParameters(Async)");
- }
-
- // verify the required parameter '_double' is set
- if (_double == null) {
- throw new ApiException("Missing the required parameter '_double' when calling testEndpointParameters(Async)");
- }
-
- // verify the required parameter 'patternWithoutDelimiter' is set
- if (patternWithoutDelimiter == null) {
- throw new ApiException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters(Async)");
- }
-
- // verify the required parameter '_byte' is set
- if (_byte == null) {
- throw new ApiException("Missing the required parameter '_byte' when calling testEndpointParameters(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/fake".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
- if (integer != null)
- localVarFormParams.put("integer", integer);
- if (int32 != null)
- localVarFormParams.put("int32", int32);
- if (int64 != null)
- localVarFormParams.put("int64", int64);
- if (number != null)
- localVarFormParams.put("number", number);
- if (_float != null)
- localVarFormParams.put("float", _float);
- if (_double != null)
- localVarFormParams.put("double", _double);
- if (string != null)
- localVarFormParams.put("string", string);
- if (patternWithoutDelimiter != null)
- localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
- if (_byte != null)
- localVarFormParams.put("byte", _byte);
- if (binary != null)
- localVarFormParams.put("binary", binary);
- if (date != null)
- localVarFormParams.put("date", date);
- if (dateTime != null)
- localVarFormParams.put("dateTime", dateTime);
- if (password != null)
- localVarFormParams.put("password", password);
- if (paramCallback != null)
- localVarFormParams.put("callback", paramCallback);
-
- final String[] localVarAccepts = {
- "application/xml; charset=utf-8", "application/json; charset=utf-8"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/xml; charset=utf-8", "application/json; charset=utf-8"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "http_basic_test" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * @param number None (required)
- * @param _double None (required)
- * @param patternWithoutDelimiter None (required)
- * @param _byte None (required)
- * @param integer None (optional)
- * @param int32 None (optional)
- * @param int64 None (optional)
- * @param _float None (optional)
- * @param string None (optional)
- * @param binary None (optional)
- * @param date None (optional)
- * @param dateTime None (optional)
- * @param password None (optional)
- * @param paramCallback None (optional)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
- testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
- }
-
- /**
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * @param number None (required)
- * @param _double None (required)
- * @param patternWithoutDelimiter None (required)
- * @param _byte None (required)
- * @param integer None (optional)
- * @param int32 None (optional)
- * @param int64 None (optional)
- * @param _float None (optional)
- * @param string None (optional)
- * @param binary None (optional)
- * @param date None (optional)
- * @param dateTime None (optional)
- * @param password None (optional)
- * @param paramCallback None (optional)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
- com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null);
- return apiClient.execute(call);
- }
-
- /**
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 (asynchronously)
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * @param number None (required)
- * @param _double None (required)
- * @param patternWithoutDelimiter None (required)
- * @param _byte None (required)
- * @param integer None (optional)
- * @param int32 None (optional)
- * @param int64 None (optional)
- * @param _float None (optional)
- * @param string None (optional)
- * @param binary None (optional)
- * @param date None (optional)
- * @param dateTime None (optional)
- * @param password None (optional)
- * @param paramCallback None (optional)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
- /* Build call for testEnumParameters */
- private com.squareup.okhttp.Call testEnumParametersCall(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, BigDecimal enumQueryInteger, Double enumQueryDouble, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
-
- // create path and map variables
- String localVarPath = "/fake".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
- if (enumQueryStringArray != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
- if (enumQueryString != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
- if (enumQueryInteger != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
-
- Map localVarHeaderParams = new HashMap();
- if (enumHeaderStringArray != null)
- localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
- if (enumHeaderString != null)
- localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
-
- Map localVarFormParams = new HashMap();
- if (enumFormStringArray != null)
- localVarFormParams.put("enum_form_string_array", enumFormStringArray);
- if (enumFormString != null)
- localVarFormParams.put("enum_form_string", enumFormString);
- if (enumQueryDouble != null)
- localVarFormParams.put("enum_query_double", enumQueryDouble);
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/json"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * To test enum parameters
- *
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
- * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
- * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
- * @param enumQueryStringArray Query parameter enum test (string array) (optional)
- * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
- * @param enumQueryInteger Query parameter enum test (double) (optional)
- * @param enumQueryDouble Query parameter enum test (double) (optional)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, BigDecimal enumQueryInteger, Double enumQueryDouble) throws ApiException {
- testEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
- }
-
- /**
- * To test enum parameters
- *
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
- * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
- * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
- * @param enumQueryStringArray Query parameter enum test (string array) (optional)
- * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
- * @param enumQueryInteger Query parameter enum test (double) (optional)
- * @param enumQueryDouble Query parameter enum test (double) (optional)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse testEnumParametersWithHttpInfo(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, BigDecimal enumQueryInteger, Double enumQueryDouble) throws ApiException {
- com.squareup.okhttp.Call call = testEnumParametersCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, null, null);
- return apiClient.execute(call);
- }
-
- /**
- * To test enum parameters (asynchronously)
- *
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
- * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
- * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
- * @param enumQueryStringArray Query parameter enum test (string array) (optional)
- * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
- * @param enumQueryInteger Query parameter enum test (double) (optional)
- * @param enumQueryDouble Query parameter enum test (double) (optional)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call testEnumParametersAsync(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, BigDecimal enumQueryInteger, Double enumQueryDouble, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = testEnumParametersCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
-}
+
+
+package io.swagger.client.api;
+
+import io.swagger.client.ApiCallback;
+import io.swagger.client.ApiClient;
+import io.swagger.client.ApiException;
+import io.swagger.client.ApiResponse;
+import io.swagger.client.Configuration;
+import io.swagger.client.Pair;
+import io.swagger.client.ProgressRequestBody;
+import io.swagger.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import java.math.BigDecimal;
+import io.swagger.client.model.Client;
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class FakeApi {
+ private ApiClient apiClient;
+
+ public FakeApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public FakeApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /* Build call for testClientModel */
+ private com.squareup.okhttp.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = body;
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call testClientModelValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException("Missing the required parameter 'body' when calling testClientModel(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = testClientModelCall(body, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * To test \"client\" model
+ * To test \"client\" model
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public Client testClientModel(Client body) throws ApiException {
+ ApiResponse resp = testClientModelWithHttpInfo(body);
+ return resp.getData();
+ }
+
+ /**
+ * To test \"client\" model
+ * To test \"client\" model
+ * @param body client model (required)
+ * @return ApiResponse<Client>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException {
+ com.squareup.okhttp.Call call = testClientModelValidateBeforeCall(body, null, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return apiClient.execute(call, localVarReturnType);
+ }
+
+ /**
+ * To test \"client\" model (asynchronously)
+ * To test \"client\" model
+ * @param body client model (required)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call testClientModelAsync(Client body, final ApiCallback callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = testClientModelValidateBeforeCall(body, progressListener, progressRequestListener);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ apiClient.executeAsync(call, localVarReturnType, callback);
+ return call;
+ }
+ /* Build call for testEndpointParameters */
+ private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ if (integer != null)
+ localVarFormParams.put("integer", integer);
+ if (int32 != null)
+ localVarFormParams.put("int32", int32);
+ if (int64 != null)
+ localVarFormParams.put("int64", int64);
+ if (number != null)
+ localVarFormParams.put("number", number);
+ if (_float != null)
+ localVarFormParams.put("float", _float);
+ if (_double != null)
+ localVarFormParams.put("double", _double);
+ if (string != null)
+ localVarFormParams.put("string", string);
+ if (patternWithoutDelimiter != null)
+ localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
+ if (_byte != null)
+ localVarFormParams.put("byte", _byte);
+ if (binary != null)
+ localVarFormParams.put("binary", binary);
+ if (date != null)
+ localVarFormParams.put("date", date);
+ if (dateTime != null)
+ localVarFormParams.put("dateTime", dateTime);
+ if (password != null)
+ localVarFormParams.put("password", password);
+ if (paramCallback != null)
+ localVarFormParams.put("callback", paramCallback);
+
+ final String[] localVarAccepts = {
+ "application/xml; charset=utf-8", "application/json; charset=utf-8"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/xml; charset=utf-8", "application/json; charset=utf-8"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "http_basic_test" };
+ return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'number' is set
+ if (number == null) {
+ throw new ApiException("Missing the required parameter 'number' when calling testEndpointParameters(Async)");
+ }
+
+ // verify the required parameter '_double' is set
+ if (_double == null) {
+ throw new ApiException("Missing the required parameter '_double' when calling testEndpointParameters(Async)");
+ }
+
+ // verify the required parameter 'patternWithoutDelimiter' is set
+ if (patternWithoutDelimiter == null) {
+ throw new ApiException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters(Async)");
+ }
+
+ // verify the required parameter '_byte' is set
+ if (_byte == null) {
+ throw new ApiException("Missing the required parameter '_byte' when calling testEndpointParameters(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
+ testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
+ }
+
+ /**
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
+ com.squareup.okhttp.Call call = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 (asynchronously)
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ApiCallback callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
+ /* Build call for testEnumParameters */
+ private com.squareup.okhttp.Call testEnumParametersCall(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+ if (enumQueryStringArray != null)
+ localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
+ if (enumQueryString != null)
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
+ if (enumQueryInteger != null)
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
+
+ Map localVarHeaderParams = new HashMap();
+ if (enumHeaderStringArray != null)
+ localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
+ if (enumHeaderString != null)
+ localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
+
+ Map localVarFormParams = new HashMap();
+ if (enumFormStringArray != null)
+ localVarFormParams.put("enum_form_string_array", enumFormStringArray);
+ if (enumFormString != null)
+ localVarFormParams.put("enum_form_string", enumFormString);
+ if (enumQueryDouble != null)
+ localVarFormParams.put("enum_query_double", enumQueryDouble);
+
+ final String[] localVarAccepts = {
+ "*/*"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "*/*"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call testEnumParametersValidateBeforeCall(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+
+ com.squareup.okhttp.Call call = testEnumParametersCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * To test enum parameters
+ * To test enum parameters
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional)
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
+ testEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+ }
+
+ /**
+ * To test enum parameters
+ * To test enum parameters
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional)
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse testEnumParametersWithHttpInfo(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
+ com.squareup.okhttp.Call call = testEnumParametersValidateBeforeCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * To test enum parameters (asynchronously)
+ * To test enum parameters
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional)
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call testEnumParametersAsync(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, final ApiCallback callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = testEnumParametersValidateBeforeCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
+}
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java
index aca7f0b02b0..d86cc92060b 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java
@@ -8,928 +8,1013 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
-
-
-package io.swagger.client.api;
-
-import io.swagger.client.ApiCallback;
-import io.swagger.client.ApiClient;
-import io.swagger.client.ApiException;
-import io.swagger.client.ApiResponse;
-import io.swagger.client.Configuration;
-import io.swagger.client.Pair;
-import io.swagger.client.ProgressRequestBody;
-import io.swagger.client.ProgressResponseBody;
-
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-import io.swagger.client.model.Pet;
-import java.io.File;
-import io.swagger.client.model.ModelApiResponse;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class PetApi {
- private ApiClient apiClient;
-
- public PetApi() {
- this(Configuration.getDefaultApiClient());
- }
-
- public PetApi(ApiClient apiClient) {
- this.apiClient = apiClient;
- }
-
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
- }
-
- /* Build call for addPet */
- private com.squareup.okhttp.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = body;
-
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/json", "application/xml"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Add a new pet to the store
- *
- * @param body Pet object that needs to be added to the store (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public void addPet(Pet body) throws ApiException {
- addPetWithHttpInfo(body);
- }
-
- /**
- * Add a new pet to the store
- *
- * @param body Pet object that needs to be added to the store (required)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException {
- com.squareup.okhttp.Call call = addPetCall(body, null, null);
- return apiClient.execute(call);
- }
-
- /**
- * Add a new pet to the store (asynchronously)
- *
- * @param body Pet object that needs to be added to the store (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call addPetAsync(Pet body, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
- /* Build call for deletePet */
- private com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'petId' is set
- if (petId == null) {
- throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
- .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
- if (apiKey != null)
- localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Deletes a pet
- *
- * @param petId Pet id to delete (required)
- * @param apiKey (optional)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public void deletePet(Long petId, String apiKey) throws ApiException {
- deletePetWithHttpInfo(petId, apiKey);
- }
-
- /**
- * Deletes a pet
- *
- * @param petId Pet id to delete (required)
- * @param apiKey (optional)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
- com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, null, null);
- return apiClient.execute(call);
- }
-
- /**
- * Deletes a pet (asynchronously)
- *
- * @param petId Pet id to delete (required)
- * @param apiKey (optional)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call deletePetAsync(Long petId, String apiKey, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
- /* Build call for findPetsByStatus */
- private com.squareup.okhttp.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'status' is set
- if (status == null) {
- throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
- if (status != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Finds Pets by status
- * Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (required)
- * @return List<Pet>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public List findPetsByStatus(List status) throws ApiException {
- ApiResponse> resp = findPetsByStatusWithHttpInfo(status);
- return resp.getData();
- }
-
- /**
- * Finds Pets by status
- * Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (required)
- * @return ApiResponse<List<Pet>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException {
- com.squareup.okhttp.Call call = findPetsByStatusCall(status, null, null);
- Type localVarReturnType = new TypeToken>(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * Finds Pets by status (asynchronously)
- * Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call findPetsByStatusAsync(List status, final ApiCallback> callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken>(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
- /* Build call for findPetsByTags */
- private com.squareup.okhttp.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'tags' is set
- if (tags == null) {
- throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
- if (tags != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Finds Pets by tags
- * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- * @param tags Tags to filter by (required)
- * @return List<Pet>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public List findPetsByTags(List tags) throws ApiException {
- ApiResponse> resp = findPetsByTagsWithHttpInfo(tags);
- return resp.getData();
- }
-
- /**
- * Finds Pets by tags
- * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- * @param tags Tags to filter by (required)
- * @return ApiResponse<List<Pet>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException {
- com.squareup.okhttp.Call call = findPetsByTagsCall(tags, null, null);
- Type localVarReturnType = new TypeToken>(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * Finds Pets by tags (asynchronously)
- * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- * @param tags Tags to filter by (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call findPetsByTagsAsync(List tags, final ApiCallback> callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken>(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
- /* Build call for getPetById */
- private com.squareup.okhttp.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'petId' is set
- if (petId == null) {
- throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
- .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "api_key" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Find pet by ID
- * Returns a single pet
- * @param petId ID of pet to return (required)
- * @return Pet
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public Pet getPetById(Long petId) throws ApiException {
- ApiResponse resp = getPetByIdWithHttpInfo(petId);
- return resp.getData();
- }
-
- /**
- * Find pet by ID
- * Returns a single pet
- * @param petId ID of pet to return (required)
- * @return ApiResponse<Pet>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException {
- com.squareup.okhttp.Call call = getPetByIdCall(petId, null, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * Find pet by ID (asynchronously)
- * Returns a single pet
- * @param petId ID of pet to return (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call getPetByIdAsync(Long petId, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
- /* Build call for updatePet */
- private com.squareup.okhttp.Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = body;
-
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException("Missing the required parameter 'body' when calling updatePet(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet".replaceAll("\\{format\\}","json");
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/json", "application/xml"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Update an existing pet
- *
- * @param body Pet object that needs to be added to the store (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public void updatePet(Pet body) throws ApiException {
- updatePetWithHttpInfo(body);
- }
-
- /**
- * Update an existing pet
- *
- * @param body Pet object that needs to be added to the store (required)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException {
- com.squareup.okhttp.Call call = updatePetCall(body, null, null);
- return apiClient.execute(call);
- }
-
- /**
- * Update an existing pet (asynchronously)
- *
- * @param body Pet object that needs to be added to the store (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call updatePetAsync(Pet body, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
- /* Build call for updatePetWithForm */
- private com.squareup.okhttp.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'petId' is set
- if (petId == null) {
- throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
- .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
- if (name != null)
- localVarFormParams.put("name", name);
- if (status != null)
- localVarFormParams.put("status", status);
-
- final String[] localVarAccepts = {
- "application/xml", "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/x-www-form-urlencoded"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * Updates a pet in the store with form data
- *
- * @param petId ID of pet that needs to be updated (required)
- * @param name Updated name of the pet (optional)
- * @param status Updated status of the pet (optional)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
- updatePetWithFormWithHttpInfo(petId, name, status);
- }
-
- /**
- * Updates a pet in the store with form data
- *
- * @param petId ID of pet that needs to be updated (required)
- * @param name Updated name of the pet (optional)
- * @param status Updated status of the pet (optional)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
- com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, null, null);
- return apiClient.execute(call);
- }
-
- /**
- * Updates a pet in the store with form data (asynchronously)
- *
- * @param petId ID of pet that needs to be updated (required)
- * @param name Updated name of the pet (optional)
- * @param status Updated status of the pet (optional)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
- /* Build call for uploadFile */
- private com.squareup.okhttp.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'petId' is set
- if (petId == null) {
- throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)");
- }
-
-
- // create path and map variables
- String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
- .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
-
- List localVarQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
- if (additionalMetadata != null)
- localVarFormParams.put("additionalMetadata", additionalMetadata);
- if (file != null)
- localVarFormParams.put("file", file);
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "multipart/form-data"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "petstore_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- /**
- * uploads an image
- *
- * @param petId ID of pet to update (required)
- * @param additionalMetadata Additional data to pass to server (optional)
- * @param file file to upload (optional)
- * @return ModelApiResponse
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
- ApiResponse resp = uploadFileWithHttpInfo(petId, additionalMetadata, file);
- return resp.getData();
- }
-
- /**
- * uploads an image
- *
- * @param petId ID of pet to update (required)
- * @param additionalMetadata Additional data to pass to server (optional)
- * @param file file to upload (optional)
- * @return ApiResponse<ModelApiResponse>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
- com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, null, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * uploads an image (asynchronously)
- *
- * @param petId ID of pet to update (required)
- * @param additionalMetadata Additional data to pass to server (optional)
- * @param file file to upload (optional)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
-}
+
+
+package io.swagger.client.api;
+
+import io.swagger.client.ApiCallback;
+import io.swagger.client.ApiClient;
+import io.swagger.client.ApiException;
+import io.swagger.client.ApiResponse;
+import io.swagger.client.Configuration;
+import io.swagger.client.Pair;
+import io.swagger.client.ProgressRequestBody;
+import io.swagger.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import java.io.File;
+import io.swagger.client.model.ModelApiResponse;
+import io.swagger.client.model.Pet;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PetApi {
+ private ApiClient apiClient;
+
+ public PetApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public PetApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /* Build call for addPet */
+ private com.squareup.okhttp.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = body;
+
+ // create path and map variables
+ String localVarPath = "/pet".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/xml", "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "petstore_auth" };
+ return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call addPetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void addPet(Pet body) throws ApiException {
+ addPetWithHttpInfo(body);
+ }
+
+ /**
+ * Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException {
+ com.squareup.okhttp.Call call = addPetValidateBeforeCall(body, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Add a new pet to the store (asynchronously)
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call addPetAsync(Pet body, final ApiCallback callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = addPetValidateBeforeCall(body, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
+ /* Build call for deletePet */
+ private com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
+ .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+ if (apiKey != null)
+ localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/xml", "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "petstore_auth" };
+ return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void deletePet(Long petId, String apiKey) throws ApiException {
+ deletePetWithHttpInfo(petId, apiKey);
+ }
+
+ /**
+ * Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
+ com.squareup.okhttp.Call call = deletePetValidateBeforeCall(petId, apiKey, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Deletes a pet (asynchronously)
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call deletePetAsync(Long petId, String apiKey, final ApiCallback callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = deletePetValidateBeforeCall(petId, apiKey, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
+ /* Build call for findPetsByStatus */
+ private com.squareup.okhttp.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+ if (status != null)
+ localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/xml", "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "petstore_auth" };
+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call findPetsByStatusValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'status' is set
+ if (status == null) {
+ throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ * @param status Status values that need to be considered for filter (required)
+ * @return List<Pet>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public List findPetsByStatus(List status) throws ApiException {
+ ApiResponse> resp = findPetsByStatusWithHttpInfo(status);
+ return resp.getData();
+ }
+
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ * @param status Status values that need to be considered for filter (required)
+ * @return ApiResponse<List<Pet>>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException {
+ com.squareup.okhttp.Call call = findPetsByStatusValidateBeforeCall(status, null, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ return apiClient.execute(call, localVarReturnType);
+ }
+
+ /**
+ * Finds Pets by status (asynchronously)
+ * Multiple status values can be provided with comma separated strings
+ * @param status Status values that need to be considered for filter (required)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call findPetsByStatusAsync(List status, final ApiCallback> callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = findPetsByStatusValidateBeforeCall(status, progressListener, progressRequestListener);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ apiClient.executeAsync(call, localVarReturnType, callback);
+ return call;
+ }
+ /* Build call for findPetsByTags */
+ private com.squareup.okhttp.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+ if (tags != null)
+ localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/xml", "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "petstore_auth" };
+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call findPetsByTagsValidateBeforeCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'tags' is set
+ if (tags == null) {
+ throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
+ }
+
+ /**
+ * Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @param tags Tags to filter by (required)
+ * @return List<Pet>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public List findPetsByTags(List