From 5306b11b4a2e9ede85215dac944788797d99e7ed Mon Sep 17 00:00:00 2001
From: wing328
Date: Sun, 22 Jan 2017 11:40:59 +0800
Subject: [PATCH] [java] Improve pom.xml to qualify for publishing to Maven
central (#4616)
* [java] Attach Javadoc to artifact generation.
* [java] Attach source to artifact generation.
* [java] Add gpg signing to artifact publishing.
* [java] Add artifact URL to pom.xml .
* [java] Add artifact description to pom.xml .
* [java] Add artifact URL and description params to Jax RSS.
* [java] Add developer info to pom.xml .
* [java] Parameterise SCM info in generated pom.xml .
* [java] Move GPG signing to verify phase so that .asc files are uploaded during deploy phase.
* [java] Change GPG signing to be an optional via Maven profile. Can't assume all users will perform a release/deploy from an environment with correct GPG key/pass.
* update java petstore smaples
* camelize tag name, remove invalid file
* add back missing files for okhttp-gson
* fix docstring in java feign client
* fix docstring with various java api clients
---
.../io/swagger/codegen/CodegenConstants.java | 27 +
.../languages/AbstractJavaCodegen.java | 113 +
.../main/resources/Java/ApiClient.mustache | 51 +-
.../src/main/resources/Java/api.mustache | 10 +-
.../Java/libraries/feign/ApiClient.mustache | 34 +-
.../Java/libraries/feign/api.mustache | 8 +-
.../Java/libraries/feign/pom.mustache | 63 +-
.../Java/libraries/jersey2/ApiClient.mustache | 65 +-
.../Java/libraries/jersey2/JSON.mustache | 1 +
.../Java/libraries/jersey2/api.mustache | 10 +-
.../Java/libraries/jersey2/pom.mustache | 65 +-
.../Java/libraries/okhttp-gson/pom.mustache | 67 +-
.../libraries/retrofit/ApiClient.mustache | 48 +-
.../Java/libraries/retrofit/api.mustache | 15 +-
.../Java/libraries/retrofit/pom.mustache | 65 +-
.../Java/libraries/retrofit2/api.mustache | 6 +-
.../Java/libraries/retrofit2/pom.mustache | 69 +-
.../src/main/resources/Java/pom.mustache | 63 +-
.../codegen/java/JavaClientOptionsTest.java | 18 +
.../codegen/jaxrs/JaxRSServerOptionsTest.java | 18 +
.../codegen/options/JavaOptionsProvider.java | 18 +
.../options/JaxRSServerOptionsProvider.java | 18 +
samples/client/petstore/java/feign/pom.xml | 59 +-
.../java/io/swagger/client/ApiClient.java | 34 +-
.../java/io/swagger/client/api/FakeApi.java | 48 +-
.../java/io/swagger/client/api/PetApi.java | 34 +-
.../java/io/swagger/client/api/StoreApi.java | 9 +-
.../java/io/swagger/client/api/UserApi.java | 24 +-
.../java/io/swagger/client/model/Animal.java | 8 +-
.../swagger/client/model/Capitalization.java | 204 ++
.../java/jersey1/docs/Capitalization.md | 15 +
.../jersey1/docs/Fake_classname_tags123Api.md | 52 +
.../java/jersey1/docs/FakeclassnametagsApi.md | 52 +
samples/client/petstore/java/jersey1/pom.xml | 63 +-
.../java/io/swagger/client/ApiClient.java | 51 +-
.../java/io/swagger/client/api/PetApi.java | 4 +-
.../java/io/swagger/client/api/StoreApi.java | 2 +-
.../java/io/swagger/client/model/Animal.java | 8 +-
.../swagger/client/model/Capitalization.java | 204 ++
.../petstore/java/jersey2-java6/effective.pom | 431 ++++
.../java/jersey2-java8/docs/Capitalization.md | 15 +
.../docs/Fake_classname_tags123Api.md | 52 +
.../docs/FakeclassnametagsApi.md | 52 +
.../petstore/java/jersey2-java8/pom.xml | 61 +-
.../java/io/swagger/client/ApiClient.java | 65 +-
.../src/main/java/io/swagger/client/JSON.java | 1 +
.../java/io/swagger/client/api/PetApi.java | 4 +-
.../java/io/swagger/client/api/StoreApi.java | 2 +-
.../java/io/swagger/client/model/Animal.java | 8 +-
.../swagger/client/model/Capitalization.java | 204 ++
.../java/jersey2/docs/Capitalization.md | 15 +
.../jersey2/docs/Fake_classname_tags123Api.md | 52 +
.../java/jersey2/docs/FakeclassnametagsApi.md | 52 +
samples/client/petstore/java/jersey2/pom.xml | 61 +-
.../java/io/swagger/client/ApiClient.java | 65 +-
.../src/main/java/io/swagger/client/JSON.java | 1 +
.../java/io/swagger/client/api/PetApi.java | 4 +-
.../java/io/swagger/client/api/StoreApi.java | 2 +-
.../java/io/swagger/client/model/Animal.java | 8 +-
.../swagger/client/model/Capitalization.java | 204 ++
.../okhttp-gson-parcelableModel/.travis.yml | 12 -
.../okhttp-gson-parcelableModel/docs/Cat.md | 2 -
.../docs/Client.md | 10 +
.../okhttp-gson-parcelableModel/docs/Dog.md | 2 -
.../docs/EnumArrays.md | 27 +
.../docs/EnumTest.md | 1 +
.../docs/FakeApi.md | 111 +-
.../docs/FakeclassnametagsApi.md | 52 +
.../docs/MapTest.md | 2 +
.../docs/Model200Response.md | 2 +-
.../docs/PetApi.md | 2 +-
.../okhttp-gson-parcelableModel/effective.pom | 395 ++++
.../java/io/swagger/client/ApiCallback.java | 12 -
.../java/io/swagger/client/ApiClient.java | 12 -
.../java/io/swagger/client/ApiException.java | 12 -
.../java/io/swagger/client/ApiResponse.java | 12 -
.../java/io/swagger/client/Configuration.java | 12 -
.../src/main/java/io/swagger/client/JSON.java | 12 -
.../src/main/java/io/swagger/client/Pair.java | 12 -
.../swagger/client/ProgressRequestBody.java | 12 -
.../swagger/client/ProgressResponseBody.java | 12 -
.../java/io/swagger/client/StringUtil.java | 12 -
.../java/io/swagger/client/api/FakeApi.java | 147 +-
.../java/io/swagger/client/api/PetApi.java | 239 +-
.../java/io/swagger/client/api/StoreApi.java | 115 +-
.../java/io/swagger/client/api/UserApi.java | 247 +-
.../io/swagger/client/auth/ApiKeyAuth.java | 12 -
.../swagger/client/auth/Authentication.java | 12 -
.../io/swagger/client/auth/HttpBasicAuth.java | 12 -
.../java/io/swagger/client/auth/OAuth.java | 12 -
.../io/swagger/client/auth/OAuthFlow.java | 12 -
.../model/AdditionalPropertiesClass.java | 15 +-
.../java/io/swagger/client/model/Animal.java | 16 +-
.../io/swagger/client/model/AnimalFarm.java | 15 +-
.../model/ArrayOfArrayOfNumberOnly.java | 15 +-
.../client/model/ArrayOfNumberOnly.java | 15 +-
.../io/swagger/client/model/ArrayTest.java | 15 +-
.../java/io/swagger/client/model/Cat.java | 26 +-
.../io/swagger/client/model/Category.java | 15 +-
.../java/io/swagger/client/model/Client.java | 116 +
.../java/io/swagger/client/model/Dog.java | 26 +-
.../io/swagger/client/model/EnumArrays.java | 193 ++
.../io/swagger/client/model/EnumClass.java | 12 -
.../io/swagger/client/model/EnumTest.java | 46 +-
.../io/swagger/client/model/FormatTest.java | 23 +-
.../swagger/client/model/HasOnlyReadOnly.java | 15 +-
.../java/io/swagger/client/model/MapTest.java | 15 +-
...ropertiesAndAdditionalPropertiesClass.java | 15 +-
.../client/model/Model200Response.java | 19 +-
.../client/model/ModelApiResponse.java | 15 +-
.../io/swagger/client/model/ModelReturn.java | 15 +-
.../java/io/swagger/client/model/Name.java | 15 +-
.../io/swagger/client/model/NumberOnly.java | 15 +-
.../java/io/swagger/client/model/Order.java | 15 +-
.../java/io/swagger/client/model/Pet.java | 15 +-
.../swagger/client/model/ReadOnlyFirst.java | 15 +-
.../client/model/SpecialModelName.java | 15 +-
.../java/io/swagger/client/model/Tag.java | 15 +-
.../java/io/swagger/client/model/User.java | 15 +-
.../client/api/FakeclassnametagsApiTest.java | 61 +
.../petstore/java/okhttp-gson/.gitignore | 21 -
.../java/okhttp-gson/.swagger-codegen-ignore | 23 -
.../petstore/java/okhttp-gson/.travis.yml | 17 -
.../java/okhttp-gson/docs/Capitalization.md | 15 +
.../docs/Fake_classname_tags123Api.md | 52 +
.../okhttp-gson/docs/FakeclassnametagsApi.md | 52 +
.../client/petstore/java/okhttp-gson/pom.xml | 61 +-
.../java/io/swagger/client/api/FakeApi.java | 1018 ++++-----
.../java/io/swagger/client/api/PetApi.java | 2018 ++++++++---------
.../java/io/swagger/client/api/StoreApi.java | 1016 ++++-----
.../java/io/swagger/client/api/UserApi.java | 1962 ++++++++--------
.../java/io/swagger/client/model/Animal.java | 1 +
.../swagger/client/model/Capitalization.java | 203 ++
samples/client/petstore/java/retrofit/pom.xml | 61 +-
.../java/io/swagger/client/ApiClient.java | 55 +-
.../java/io/swagger/client/api/FakeApi.java | 3 -
.../java/io/swagger/client/api/PetApi.java | 12 +-
.../java/io/swagger/client/api/StoreApi.java | 6 +-
.../java/io/swagger/client/api/UserApi.java | 8 -
.../java/io/swagger/client/model/Animal.java | 1 +
.../swagger/client/model/Capitalization.java | 203 ++
.../retrofit2-play24/docs/Capitalization.md | 15 +
.../petstore/java/retrofit2-play24/pom.xml | 65 +-
.../java/io/swagger/client/api/PetApi.java | 4 +-
.../java/io/swagger/client/api/StoreApi.java | 2 +-
.../java/io/swagger/client/model/Animal.java | 8 +-
.../swagger/client/model/Capitalization.java | 205 ++
.../java/retrofit2/docs/Capitalization.md | 15 +
.../docs/Fake_classname_tags123Api.md | 52 +
.../retrofit2/docs/FakeclassnametagsApi.md | 52 +
.../client/petstore/java/retrofit2/pom.xml | 63 +-
.../java/io/swagger/client/api/PetApi.java | 4 +-
.../java/io/swagger/client/api/StoreApi.java | 2 +-
.../java/io/swagger/client/model/Animal.java | 1 +
.../swagger/client/model/Capitalization.java | 203 ++
.../java/retrofit2rx/docs/Capitalization.md | 15 +
.../docs/Fake_classname_tags123Api.md | 52 +
.../retrofit2rx/docs/FakeclassnametagsApi.md | 52 +
.../client/petstore/java/retrofit2rx/pom.xml | 63 +-
.../java/io/swagger/client/api/PetApi.java | 4 +-
.../java/io/swagger/client/api/StoreApi.java | 2 +-
.../java/io/swagger/client/model/Animal.java | 1 +
.../swagger/client/model/Capitalization.java | 203 ++
163 files changed, 9152 insertions(+), 4190 deletions(-)
create mode 100644 samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/jersey1/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md
create mode 100644 samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/jersey2-java6/effective.pom
create mode 100644 samples/client/petstore/java/jersey2-java8/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/jersey2-java8/docs/Fake_classname_tags123Api.md
create mode 100644 samples/client/petstore/java/jersey2-java8/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/jersey2/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/jersey2/docs/Fake_classname_tags123Api.md
create mode 100644 samples/client/petstore/java/jersey2/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/effective.pom
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java
create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/api/FakeclassnametagsApiTest.java
delete mode 100644 samples/client/petstore/java/okhttp-gson/.gitignore
delete mode 100644 samples/client/petstore/java/okhttp-gson/.swagger-codegen-ignore
delete mode 100644 samples/client/petstore/java/okhttp-gson/.travis.yml
create mode 100644 samples/client/petstore/java/okhttp-gson/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/okhttp-gson/docs/Fake_classname_tags123Api.md
create mode 100644 samples/client/petstore/java/okhttp-gson/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/retrofit2-play24/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/retrofit2/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/retrofit2/docs/Fake_classname_tags123Api.md
create mode 100644 samples/client/petstore/java/retrofit2/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Capitalization.java
create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Capitalization.md
create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Fake_classname_tags123Api.md
create mode 100644 samples/client/petstore/java/retrofit2rx/docs/FakeclassnametagsApi.md
create mode 100644 samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Capitalization.java
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 a13a9552d3fb..30707bce341f 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
@@ -36,6 +36,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 05f619732fb9..ef5b4bc4a756 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 abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
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 abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
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 {
@@ -929,6 +1001,42 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
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;
}
@@ -1021,4 +1129,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
additionalProperties.put(propertyKey, value);
}
+ @Override
+ public String sanitizeTag(String tag) {
+ return camelize(sanitizeName(tag));
+ }
+
}
diff --git a/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache
index 25aa9099ef22..14a215eac4a4 100644
--- a/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache
@@ -102,6 +102,7 @@ public class ApiClient {
* Build the Client used to make HTTP requests with the latest settings,
* i.e. objectMapper and debugging.
* TODO: better to use the Builder Pattern?
+ * @return API client
*/
public ApiClient rebuildHttpClient() {
// Add the JSON serialization support to Jersey
@@ -122,6 +123,7 @@ public class ApiClient {
* Note: If you make changes to the object mapper, remember to set it back via
* setObjectMapper in order to trigger HTTP client rebuilding.
*
+ * @return Object mapper
*/
public ObjectMapper getObjectMapper() {
return objectMapper;
@@ -154,6 +156,7 @@ public class ApiClient {
/**
* Gets the status code of the previous request
+ * @return Status code
*/
public int getStatusCode() {
return statusCode;
@@ -161,6 +164,7 @@ public class ApiClient {
/**
* Gets the response headers of the previous request
+ * @return Response headers
*/
public Map> getResponseHeaders() {
return responseHeaders;
@@ -168,6 +172,7 @@ public class ApiClient {
/**
* Get authentications (key: authentication name, value: authentication).
+ * @return Map of authentication
*/
public Map getAuthentications() {
return authentications;
@@ -185,6 +190,7 @@ public class ApiClient {
/**
* Helper method to set username for the first HTTP basic authentication.
+ * @param username Username
*/
public void setUsername(String username) {
for (Authentication auth : authentications.values()) {
@@ -198,6 +204,7 @@ public class ApiClient {
/**
* Helper method to set password for the first HTTP basic authentication.
+ * @param password Password
*/
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
@@ -211,6 +218,7 @@ public class ApiClient {
/**
* Helper method to set API key value for the first API key authentication.
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
@@ -224,6 +232,7 @@ public class ApiClient {
/**
* Helper method to set API key prefix for the first API key authentication.
+ * @param apiKeyPrefix API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
@@ -237,6 +246,7 @@ public class ApiClient {
/**
* Helper method to set access token for the first OAuth2 authentication.
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
@@ -250,6 +260,8 @@ public class ApiClient {
/**
* Set the User-Agent header's value (by adding to the default header map).
+ * @param userAgent User agent
+ * @return API client
*/
public ApiClient setUserAgent(String userAgent) {
addDefaultHeader("User-Agent", userAgent);
@@ -261,6 +273,7 @@ public class ApiClient {
*
* @param key The header's key
* @param value The header's value
+ * @return API client
*/
public ApiClient addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
@@ -269,6 +282,7 @@ public class ApiClient {
/**
* Check that whether debugging is enabled for this API client.
+ * @return True if debugging is on
*/
public boolean isDebugging() {
return debugging;
@@ -278,6 +292,7 @@ public class ApiClient {
* Enable/disable debugging for this API client.
*
* @param debugging To enable (true) or disable (false) debugging
+ * @return API client
*/
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
@@ -288,6 +303,7 @@ public class ApiClient {
/**
* Connect timeout (in milliseconds).
+ * @return Connection timeout
*/
public int getConnectTimeout() {
return connectionTimeout;
@@ -297,6 +313,8 @@ public class ApiClient {
* Set the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
+ * @param connectionTimeout Connection timeout in milliseconds
+ * @return API client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
@@ -306,6 +324,7 @@ public class ApiClient {
/**
* Get the date format used to parse/format date parameters.
+ * @return Date format
*/
public DateFormat getDateFormat() {
return dateFormat;
@@ -313,6 +332,8 @@ public class ApiClient {
/**
* Set the date format used to parse/format date parameters.
+ * @param dateFormat Date format
+ * @return API client
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -325,6 +346,8 @@ public class ApiClient {
/**
* Parse the given string into Date object.
+ * @param str String
+ * @return Date
*/
public Date parseDate(String str) {
try {
@@ -336,6 +359,8 @@ public class ApiClient {
/**
* Format the given Date object into string.
+ * @param date Date
+ * @return Date in string format
*/
public String formatDate(Date date) {
return dateFormat.format(date);
@@ -343,6 +368,8 @@ public class ApiClient {
/**
* Format the given parameter object into string.
+ * @param param Object
+ * @return Object in string format
*/
public String parameterToString(Object param) {
if (param == null) {
@@ -364,8 +391,12 @@ public class ApiClient {
}
/*
- Format to {@code Pair} objects.
- */
+ * Format to {@code Pair} objects.
+ * @param collectionFormat Collection format
+ * @param name Name
+ * @param value Value
+ * @return List of pair
+ */
public List parameterToPairs(String collectionFormat, String name, Object value){
List params = new ArrayList();
@@ -425,6 +456,8 @@ public class ApiClient {
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
+ * @param mime MIME
+ * @return True if MIME type is boolean
*/
public boolean isJsonMime(String mime) {
return mime != null && mime.matches("(?i)application\\/json(;.*)?");
@@ -474,6 +507,8 @@ public class ApiClient {
/**
* Escape the given string to be used as URL query value.
+ * @param str String
+ * @return Escaped string
*/
public String escapeString(String str) {
try {
@@ -486,6 +521,11 @@ public class ApiClient {
/**
* Serialize the given Java object into string according the given
* Content-Type (only JSON is supported for now).
+ * @param obj Object
+ * @param contentType Content type
+ * @param formParams Form parameters
+ * @return Object
+ * @throws ApiException API exception
*/
public Object serialize(Object obj, String contentType, Map formParams) throws ApiException {
if (contentType.startsWith("multipart/form-data")) {
@@ -591,6 +631,7 @@ public class ApiClient {
/**
* Invoke API by sending HTTP request with the given options.
*
+ * @param Type
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
* @param queryParams The query parameters
@@ -600,7 +641,9 @@ public class ApiClient {
* @param accept The request's Accept header
* @param contentType The request's Content-Type header
* @param authNames The authentications to apply
+ * @param returnType Return type
* @return The response body in type of string
+ * @throws ApiException API exception
*/
public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException {
@@ -639,6 +682,8 @@ public class ApiClient {
* Update query and header parameters based on authentication settings.
*
* @param authNames The authentications to apply
+ * @param queryParams Query parameters
+ * @param headerParams Header parameters
*/
private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) {
for (String authName : authNames) {
@@ -650,6 +695,8 @@ public class ApiClient {
/**
* Encode the given form parameters as request body.
+ * @param formParams Form parameters
+ * @return HTTP form encoded parameters
*/
private String getXWWWFormUrlencodedParams(Map formParams) {
StringBuilder formParamBuilder = new StringBuilder();
diff --git a/modules/swagger-codegen/src/main/resources/Java/api.mustache b/modules/swagger-codegen/src/main/resources/Java/api.mustache
index 80db47354d0f..5bf40a593f0f 100644
--- a/modules/swagger-codegen/src/main/resources/Java/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/api.mustache
@@ -44,9 +44,13 @@ public class {{classname}} {
{{#operation}}
/**
* {{summary}}
- * {{notes}}{{#allParams}}
- * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#returnType}}
- * @return {{{returnType}}}{{/returnType}}
+ * {{notes}}
+ {{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ {{#returnType}}
+ * @return {{returnType}}
+ {{/returnType}}
* @throws ApiException if fails to make API call
*/
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/ApiClient.mustache
index 0a92f42cf737..e0257e0452d4 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/ApiClient.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/ApiClient.mustache
@@ -159,6 +159,9 @@ public class ApiClient {
* apiClient.setBasePath("http://localhost:8080");
* XYZApi api = apiClient.buildClient(XYZApi.class);
* XYZResponse response = api.someMethod(...);
+ * @param Type
+ * @param clientClass Client class
+ * @return The Client
*/
public T buildClient(Class clientClass) {
return feignBuilder.target(clientClass, basePath);
@@ -196,7 +199,7 @@ public class ApiClient {
/**
* Helper method to configure the first api key found
- * @param apiKey
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -211,8 +214,8 @@ public class ApiClient {
/**
* Helper method to configure the username/password for basic auth or password OAuth
- * @param username
- * @param password
+ * @param username Username
+ * @param password Password
*/
public void setCredentials(String username, String password) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -232,7 +235,7 @@ public class ApiClient {
/**
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return
+ * @return Token request builder
*/
public TokenRequestBuilder getTokenEndPoint() {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -246,7 +249,7 @@ public class ApiClient {
/**
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return
+ * @return Authentication request builder
*/
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -260,8 +263,8 @@ public class ApiClient {
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
- * @param accessToken
- * @param expiresIn : validity period in seconds
+ * @param accessToken Access Token
+ * @param expiresIn Validity period in seconds
*/
public void setAccessToken(String accessToken, Long expiresIn) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -275,9 +278,9 @@ public class ApiClient {
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
- * @param clientId
- * @param clientSecret
- * @param redirectURI
+ * @param clientId Client ID
+ * @param clientSecret Client secret
+ * @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -297,7 +300,7 @@ public class ApiClient {
/**
* Configures a listener which is notified when a new access token is received.
- * @param accessTokenListener
+ * @param accessTokenListener Acesss token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -309,14 +312,19 @@ public class ApiClient {
}
}
+ /**
+ * Gets request interceptor based on authentication name
+ * @param authName Authentiation name
+ * @return Request Interceptor
+ */
public RequestInterceptor getAuthorization(String authName) {
return apiAuthorizations.get(authName);
}
/**
* Adds an authorization to be used by the client
- * @param authName
- * @param authorization
+ * @param authName Authentication name
+ * @param authorization Request interceptor
*/
public void addAuthorization(String authName, RequestInterceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/api.mustache
index a72dac0496df..ce2c205ea9d9 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/api.mustache
@@ -23,8 +23,12 @@ public interface {{classname}} extends ApiClient.Api {
/**
* {{summary}}
* {{notes}}
-{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
-{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
+{{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+{{/allParams}}
+{{#returnType}}
+ * @return {{returnType}}
+{{/returnType}}
*/
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
@Headers({
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 134e1443da11..bd0a392256fd 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.plugins
maven-javadoc-plugin
2.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/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache
index b81cd18d37f0..5eecde916640 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache
@@ -91,6 +91,7 @@ public class ApiClient {
/**
* Gets the JSON instance to do JSON serialization and deserialization.
+ * @return JSON
*/
public JSON getJSON() {
return json;
@@ -116,6 +117,7 @@ public class ApiClient {
/**
* Gets the status code of the previous request
+ * @return Status code
*/
public int getStatusCode() {
return statusCode;
@@ -123,6 +125,7 @@ public class ApiClient {
/**
* Gets the response headers of the previous request
+ * @return Response headers
*/
public Map> getResponseHeaders() {
return responseHeaders;
@@ -130,6 +133,7 @@ public class ApiClient {
/**
* Get authentications (key: authentication name, value: authentication).
+ * @return Map of authentication object
*/
public Map getAuthentications() {
return authentications;
@@ -147,6 +151,7 @@ public class ApiClient {
/**
* Helper method to set username for the first HTTP basic authentication.
+ * @param username Username
*/
public void setUsername(String username) {
for (Authentication auth : authentications.values()) {
@@ -160,6 +165,7 @@ public class ApiClient {
/**
* Helper method to set password for the first HTTP basic authentication.
+ * @param password Password
*/
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
@@ -173,6 +179,7 @@ public class ApiClient {
/**
* Helper method to set API key value for the first API key authentication.
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
@@ -186,6 +193,7 @@ public class ApiClient {
/**
* Helper method to set API key prefix for the first API key authentication.
+ * @param apiKeyPrefix API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
@@ -199,6 +207,7 @@ public class ApiClient {
/**
* Helper method to set access token for the first OAuth2 authentication.
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
@@ -212,6 +221,8 @@ public class ApiClient {
/**
* Set the User-Agent header's value (by adding to the default header map).
+ * @param userAgent Http user agent
+ * @return API client
*/
public ApiClient setUserAgent(String userAgent) {
addDefaultHeader("User-Agent", userAgent);
@@ -223,6 +234,7 @@ public class ApiClient {
*
* @param key The header's key
* @param value The header's value
+ * @return API client
*/
public ApiClient addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
@@ -231,6 +243,7 @@ public class ApiClient {
/**
* Check that whether debugging is enabled for this API client.
+ * @return True if debugging is switched on
*/
public boolean isDebugging() {
return debugging;
@@ -240,6 +253,7 @@ public class ApiClient {
* Enable/disable debugging for this API client.
*
* @param debugging To enable (true) or disable (false) debugging
+ * @return API client
*/
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
@@ -253,12 +267,17 @@ public class ApiClient {
* with file response. The default value is null, i.e. using
* the system's default tempopary folder.
*
- * @see https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File)
+ * @return Temp folder path
*/
public String getTempFolderPath() {
return tempFolderPath;
}
+ /**
+ * Set temp folder path
+ * @param tempFolderPath Temp folder path
+ * @return API client
+ */
public ApiClient setTempFolderPath(String tempFolderPath) {
this.tempFolderPath = tempFolderPath;
return this;
@@ -266,6 +285,7 @@ public class ApiClient {
/**
* Connect timeout (in milliseconds).
+ * @return Connection timeout
*/
public int getConnectTimeout() {
return connectionTimeout;
@@ -275,6 +295,8 @@ public class ApiClient {
* Set the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
+ * @param connectionTimeout Connection timeout in milliseconds
+ * @return API client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
@@ -284,6 +306,7 @@ public class ApiClient {
/**
* Get the date format used to parse/format date parameters.
+ * @return Date format
*/
public DateFormat getDateFormat() {
return dateFormat;
@@ -291,6 +314,8 @@ public class ApiClient {
/**
* Set the date format used to parse/format date parameters.
+ * @param dateFormat Date format
+ * @return API client
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -301,6 +326,8 @@ public class ApiClient {
/**
* Parse the given string into Date object.
+ * @param str String
+ * @return Date
*/
public Date parseDate(String str) {
try {
@@ -312,6 +339,8 @@ public class ApiClient {
/**
* Format the given Date object into string.
+ * @param date Date
+ * @return Date in string format
*/
public String formatDate(Date date) {
return dateFormat.format(date);
@@ -319,6 +348,8 @@ public class ApiClient {
/**
* Format the given parameter object into string.
+ * @param param Object
+ * @return Object in string format
*/
public String parameterToString(Object param) {
if (param == null) {
@@ -340,8 +371,12 @@ public class ApiClient {
}
/*
- Format to {@code Pair} objects.
- */
+ * Format to {@code Pair} objects.
+ * @param collectionFormat Collection format
+ * @param name Name
+ * @param value Value
+ * @return List of pairs
+ */
public List parameterToPairs(String collectionFormat, String name, Object value){
List params = new ArrayList();
@@ -360,8 +395,8 @@ public class ApiClient {
return params;
}
- // get the collection format
- String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv
+ // get the collection format (default: csv)
+ String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format
if ("multi".equals(format)) {
@@ -401,6 +436,8 @@ public class ApiClient {
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
+ * @param mime MIME
+ * @return True if the MIME type is JSON
*/
public boolean isJsonMime(String mime) {
return mime != null && mime.matches("(?i)application\\/json(;.*)?");
@@ -450,6 +487,8 @@ public class ApiClient {
/**
* Escape the given string to be used as URL query value.
+ * @param str String
+ * @return Escaped string
*/
public String escapeString(String str) {
try {
@@ -462,6 +501,11 @@ public class ApiClient {
/**
* Serialize the given Java object into string entity according the given
* Content-Type (only JSON is supported for now).
+ * @param obj Object
+ * @param formParams Form parameters
+ * @param contentType Context type
+ * @return Entity
+ * @throws ApiException API exception
*/
public Entity> serialize(Object obj, Map formParams, String contentType) throws ApiException {
Entity> entity;
@@ -494,6 +538,11 @@ public class ApiClient {
/**
* Deserialize response body to Java object according to the Content-Type.
+ * @param Type
+ * @param response Response
+ * @param returnType Return type
+ * @return Deserialize object
+ * @throws ApiException API exception
*/
@SuppressWarnings("unchecked")
public T deserialize(Response response, GenericType returnType) throws ApiException {
@@ -522,6 +571,8 @@ public class ApiClient {
/**
* Download file from the given response.
+ * @param response Response
+ * @return File
* @throws ApiException If fail to read file content from response and write to disk
*/
public File downloadFileFromResponse(Response response) throws ApiException {
@@ -578,6 +629,7 @@ public class ApiClient {
/**
* Invoke API by sending HTTP request with the given options.
*
+ * @param Type
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
* @param queryParams The query parameters
@@ -589,6 +641,7 @@ public class ApiClient {
* @param authNames The authentications to apply
* @param returnType The return type into which to deserialize the response
* @return The response body in type of string
+ * @throws ApiException API exception
*/
public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams);
@@ -673,6 +726,8 @@ public class ApiClient {
/**
* Build the Client used to make HTTP requests.
+ * @param debugging Debug setting
+ * @return Client
*/
private Client buildHttpClient(boolean debugging) {
final ClientConfig clientConfig = new ClientConfig();
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/JSON.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/JSON.mustache
index ec15354a8a65..8aa3732abc31 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/JSON.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/JSON.mustache
@@ -35,6 +35,7 @@ public class JSON implements ContextResolver {
/**
* Set the date format for JSON (de)serialization with Date properties.
+ * @param dateFormat Date format
*/
public void setDateFormat(DateFormat dateFormat) {
mapper.setDateFormat(dateFormat);
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache
index 26cb9d7d946d..531e56e6d4c6 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache
@@ -41,9 +41,13 @@ public class {{classname}} {
{{#operation}}
/**
* {{summary}}
- * {{notes}}{{#allParams}}
- * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#returnType}}
- * @return {{{returnType}}}{{/returnType}}
+ * {{notes}}
+ {{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ {{#returnType}}
+ * @return {{returnType}}
+ {{/returnType}}
* @throws ApiException if fails to make API call
*/
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
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 5c51b9cd677e..17d8943c8227 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.plugins
maven-javadoc-plugin
2.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 b34c3856f4dc..40cbe01c0bc8 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.plugins
maven-javadoc-plugin
2.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.el
el-api
2.2
-
+
{{/performBeanValidation}}
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/ApiClient.mustache
index 6e987c5e14db..1da27f21ac22 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/ApiClient.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/ApiClient.mustache
@@ -68,7 +68,7 @@ public class ApiClient {
/**
* Basic constructor for single auth name
- * @param authName
+ * @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[]{authName});
@@ -76,8 +76,8 @@ public class ApiClient {
/**
* Helper constructor for single api key
- * @param authName
- * @param apiKey
+ * @param authName Authentication name
+ * @param apiKey API key
*/
public ApiClient(String authName, String apiKey) {
this(authName);
@@ -86,9 +86,9 @@ public class ApiClient {
/**
* Helper constructor for single basic auth or password oauth2
- * @param authName
- * @param username
- * @param password
+ * @param authName Authentication name
+ * @param username Username
+ * @param password Password
*/
public ApiClient(String authName, String username, String password) {
this(authName);
@@ -97,11 +97,11 @@ public class ApiClient {
/**
* Helper constructor for single password oauth2
- * @param authName
- * @param clientId
- * @param secret
- * @param username
- * @param password
+ * @param authName Authentication name
+ * @param clientId Client ID
+ * @param secret Client secret
+ * @param username Username
+ * @param password Password
*/
public ApiClient(String authName, String clientId, String secret, String username, String password) {
this(authName);
@@ -135,7 +135,7 @@ public class ApiClient {
/**
* Helper method to configure the first api key found
- * @param apiKey
+ * @param apiKey API key
*/
private void setApiKey(String apiKey) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -149,8 +149,8 @@ public class ApiClient {
/**
* Helper method to configure the username/password for basic auth or password oauth
- * @param username
- * @param password
+ * @param username Username
+ * @param password Password
*/
private void setCredentials(String username, String password) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -169,7 +169,7 @@ public class ApiClient {
/**
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return
+ * @return Token request builder
*/
public TokenRequestBuilder getTokenEndPoint() {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -183,7 +183,7 @@ public class ApiClient {
/**
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return
+ * @return Authentication request builder
*/
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -197,7 +197,7 @@ public class ApiClient {
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
- * @param accessToken
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -211,9 +211,9 @@ public class ApiClient {
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
- * @param clientId
- * @param clientSecret
- * @param redirectURI
+ * @param clientId Client ID
+ * @param clientSecret Client secret
+ * @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -233,7 +233,7 @@ public class ApiClient {
/**
* Configures a listener which is notified when a new access token is received.
- * @param accessTokenListener
+ * @param accessTokenListener Access token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -247,8 +247,8 @@ public class ApiClient {
/**
* Adds an authorization to be used by the client
- * @param authName
- * @param authorization
+ * @param authName Authentication name
+ * @param authorization Authorization
*/
public void addAuthorization(String authName, Interceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
@@ -286,7 +286,7 @@ public class ApiClient {
/**
* Clones the okClient given in parameter, adds the auth interceptors and uses it to configure the RestAdapter
- * @param okClient
+ * @param okClient OkHttp client
*/
public void configureFromOkclient(OkHttpClient okClient) {
OkHttpClient clone = okClient.clone();
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache
index e03801db6c22..9d2d003d4f47 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache
@@ -23,8 +23,12 @@ public interface {{classname}} {
* {{summary}}
* Sync method
* {{notes}}
-{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
-{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
+{{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+{{/allParams}}
+{{#returnType}}
+ * @return {{returnType}}
+{{/returnType}}
*/
{{#formParams}}{{#-first}}
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
@@ -36,9 +40,10 @@ public interface {{classname}} {
/**
* {{summary}}
* Async method
-{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
-{{/allParams}} * @param cb callback method
- * @return void
+{{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+{{/allParams}}
+ * @param cb callback method
*/
{{#formParams}}{{#-first}}
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
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 e38068e27b2f..427cc514416f 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.plugins
maven-javadoc-plugin
2.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/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache
index 0296d4afb7ab..b72af4f17034 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache
@@ -29,8 +29,10 @@ public interface {{classname}} {
/**
* {{summary}}
* {{notes}}
-{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
-{{/allParams}} * @return Call<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
+{{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+{{/allParams}}
+ * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
*/
{{#formParams}}{{#-first}}
{{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
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 5f2d74d3c53e..2434c0da20d7 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.plugins
maven-javadoc-plugin
2.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.core
jackson-databind
${jackson-version}
-
+
com.fasterxml.jackson.datatype
jackson-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 30d9b7bb839d..43e45ee68fa2 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.plugins
maven-javadoc-plugin
2.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 ec1bc951f387..a4a13ecbcbc8 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 @@ public class JavaClientOptionsTest extends AbstractOptionsTest {
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 fdcf69690faa..4ce6410eafd2 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 @@ public class JaxRSServerOptionsTest extends AbstractOptionsTest {
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 ce627794deac..eb60599435cb 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";
@@ -41,6 +50,15 @@ public class JavaOptionsProvider implements OptionsProvider {
.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 139d79b99476..3aeebceef90d 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
@@ -15,6 +15,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";
@@ -55,6 +64,15 @@ public class JaxRSServerOptionsProvider implements OptionsProvider {
.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/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml
index 680c521fefd3..9ed227ceae16 100644
--- a/samples/client/petstore/java/feign/pom.xml
+++ b/samples/client/petstore/java/feign/pom.xml
@@ -6,8 +6,10 @@
jar
swagger-petstore-feign
1.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.git
scm:git:git@github.com:swagger-api/swagger-codegen.git
https://github.com/swagger-api/swagger-codegen
@@ -23,6 +25,15 @@
+
+
+ Swagger
+ apiteam@swagger.io
+ Swagger
+ http://swagger.io
+
+
+
@@ -107,9 +118,55 @@
org.apache.maven.plugins
maven-javadoc-plugin
2.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/feign/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java
index 68480d81e8f9..b46c05bc576b 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java
@@ -150,6 +150,9 @@ public class ApiClient {
* apiClient.setBasePath("http://localhost:8080");
* XYZApi api = apiClient.buildClient(XYZApi.class);
* XYZResponse response = api.someMethod(...);
+ * @param Type
+ * @param clientClass Client class
+ * @return The Client
*/
public T buildClient(Class clientClass) {
return feignBuilder.target(clientClass, basePath);
@@ -187,7 +190,7 @@ public class ApiClient {
/**
* Helper method to configure the first api key found
- * @param apiKey
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -202,8 +205,8 @@ public class ApiClient {
/**
* Helper method to configure the username/password for basic auth or password OAuth
- * @param username
- * @param password
+ * @param username Username
+ * @param password Password
*/
public void setCredentials(String username, String password) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -223,7 +226,7 @@ public class ApiClient {
/**
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return
+ * @return Token request builder
*/
public TokenRequestBuilder getTokenEndPoint() {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -237,7 +240,7 @@ public class ApiClient {
/**
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
- * @return
+ * @return Authentication request builder
*/
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -251,8 +254,8 @@ public class ApiClient {
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
- * @param accessToken
- * @param expiresIn : validity period in seconds
+ * @param accessToken Access Token
+ * @param expiresIn Validity period in seconds
*/
public void setAccessToken(String accessToken, Long expiresIn) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -266,9 +269,9 @@ public class ApiClient {
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
- * @param clientId
- * @param clientSecret
- * @param redirectURI
+ * @param clientId Client ID
+ * @param clientSecret Client secret
+ * @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -288,7 +291,7 @@ public class ApiClient {
/**
* Configures a listener which is notified when a new access token is received.
- * @param accessTokenListener
+ * @param accessTokenListener Acesss token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
@@ -300,14 +303,19 @@ public class ApiClient {
}
}
+ /**
+ * Gets request interceptor based on authentication name
+ * @param authName Authentiation name
+ * @return Request Interceptor
+ */
public RequestInterceptor getAuthorization(String authName) {
return apiAuthorizations.get(authName);
}
/**
* Adds an authorization to be used by the client
- * @param authName
- * @param authorization
+ * @param authName Authentication name
+ * @param authorization Request interceptor
*/
public void addAuthorization(String authName, RequestInterceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
index d387e4786a30..0b30eeb442c2 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
@@ -20,7 +20,7 @@ public interface FakeApi extends ApiClient.Api {
/**
* To test \"client\" model
* To test \"client\" model
- * @param body client model (required)
+ * @param body client model (required)
* @return Client
*/
@RequestLine("PATCH /fake")
@@ -33,21 +33,20 @@ public interface FakeApi extends ApiClient.Api {
/**
* 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 void
+ * @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)
*/
@RequestLine("POST /fake")
@Headers({
@@ -59,15 +58,14 @@ public interface FakeApi extends ApiClient.Api {
/**
* 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 void
+ * @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)
*/
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}")
@Headers({
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
index b2b713992e33..05133620f821 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
@@ -19,8 +19,7 @@ public interface PetApi extends ApiClient.Api {
/**
* Add a new pet to the store
*
- * @param body Pet object that needs to be added to the store (required)
- * @return void
+ * @param body Pet object that needs to be added to the store (required)
*/
@RequestLine("POST /pet")
@Headers({
@@ -32,9 +31,8 @@ public interface PetApi extends ApiClient.Api {
/**
* Deletes a pet
*
- * @param petId Pet id to delete (required)
- * @param apiKey (optional)
- * @return void
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
*/
@RequestLine("DELETE /pet/{petId}")
@Headers({
@@ -47,8 +45,8 @@ public interface PetApi extends ApiClient.Api {
/**
* 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
+ * @param status Status values that need to be considered for filter (required)
+ * @return List<Pet>
*/
@RequestLine("GET /pet/findByStatus?status={status}")
@Headers({
@@ -60,8 +58,8 @@ public interface PetApi extends ApiClient.Api {
/**
* 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
+ * @param tags Tags to filter by (required)
+ * @return List<Pet>
*/
@RequestLine("GET /pet/findByTags?tags={tags}")
@Headers({
@@ -73,7 +71,7 @@ public interface PetApi extends ApiClient.Api {
/**
* Find pet by ID
* Returns a single pet
- * @param petId ID of pet to return (required)
+ * @param petId ID of pet to return (required)
* @return Pet
*/
@RequestLine("GET /pet/{petId}")
@@ -86,8 +84,7 @@ public interface PetApi extends ApiClient.Api {
/**
* Update an existing pet
*
- * @param body Pet object that needs to be added to the store (required)
- * @return void
+ * @param body Pet object that needs to be added to the store (required)
*/
@RequestLine("PUT /pet")
@Headers({
@@ -99,10 +96,9 @@ public interface PetApi extends ApiClient.Api {
/**
* 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 void
+ * @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)
*/
@RequestLine("POST /pet/{petId}")
@Headers({
@@ -114,9 +110,9 @@ public interface PetApi extends ApiClient.Api {
/**
* 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)
+ * @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
*/
@RequestLine("POST /pet/{petId}/uploadImage")
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
index a0d06d34dd88..9e1ecddbece5 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
@@ -17,8 +17,7 @@ public interface StoreApi extends ApiClient.Api {
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
- * @param orderId ID of the order that needs to be deleted (required)
- * @return void
+ * @param orderId ID of the order that needs to be deleted (required)
*/
@RequestLine("DELETE /store/order/{orderId}")
@Headers({
@@ -30,7 +29,7 @@ public interface StoreApi extends ApiClient.Api {
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
- * @return Map
+ * @return Map<String, Integer>
*/
@RequestLine("GET /store/inventory")
@Headers({
@@ -42,7 +41,7 @@ public interface StoreApi extends ApiClient.Api {
/**
* Find purchase order by ID
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
- * @param orderId ID of pet that needs to be fetched (required)
+ * @param orderId ID of pet that needs to be fetched (required)
* @return Order
*/
@RequestLine("GET /store/order/{orderId}")
@@ -55,7 +54,7 @@ public interface StoreApi extends ApiClient.Api {
/**
* Place an order for a pet
*
- * @param body order placed for purchasing the pet (required)
+ * @param body order placed for purchasing the pet (required)
* @return Order
*/
@RequestLine("POST /store/order")
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
index d4f59bffc4ce..ae2ea06f9b60 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
@@ -17,8 +17,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Create user
* This can only be done by the logged in user.
- * @param body Created user object (required)
- * @return void
+ * @param body Created user object (required)
*/
@RequestLine("POST /user")
@Headers({
@@ -30,8 +29,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Creates list of users with given input array
*
- * @param body List of user object (required)
- * @return void
+ * @param body List of user object (required)
*/
@RequestLine("POST /user/createWithArray")
@Headers({
@@ -43,8 +41,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Creates list of users with given input array
*
- * @param body List of user object (required)
- * @return void
+ * @param body List of user object (required)
*/
@RequestLine("POST /user/createWithList")
@Headers({
@@ -56,8 +53,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Delete user
* This can only be done by the logged in user.
- * @param username The name that needs to be deleted (required)
- * @return void
+ * @param username The name that needs to be deleted (required)
*/
@RequestLine("DELETE /user/{username}")
@Headers({
@@ -69,7 +65,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Get user by user name
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
*/
@RequestLine("GET /user/{username}")
@@ -82,8 +78,8 @@ public interface UserApi extends ApiClient.Api {
/**
* Logs user into the system
*
- * @param username The user name for login (required)
- * @param password The password for login in clear text (required)
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
* @return String
*/
@RequestLine("GET /user/login?username={username}&password={password}")
@@ -96,7 +92,6 @@ public interface UserApi extends ApiClient.Api {
/**
* Logs out current logged in user session
*
- * @return void
*/
@RequestLine("GET /user/logout")
@Headers({
@@ -108,9 +103,8 @@ public interface UserApi extends ApiClient.Api {
/**
* Updated user
* This can only be done by the logged in user.
- * @param username name that need to be deleted (required)
- * @param body Updated user object (required)
- * @return void
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
*/
@RequestLine("PUT /user/{username}")
@Headers({
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java
index 8fc61b6891a0..7c570ce933db 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java
@@ -24,10 +24,12 @@ 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"),
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
+@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/feign/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java
new file mode 100644
index 000000000000..1466f6695208
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java
@@ -0,0 +1,204 @@
+/*
+ * 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 java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Capitalization
+ */
+
+public class Capitalization {
+ @JsonProperty("smallCamel")
+ private String smallCamel = null;
+
+ @JsonProperty("CapitalCamel")
+ private String capitalCamel = null;
+
+ @JsonProperty("small_Snake")
+ private String smallSnake = null;
+
+ @JsonProperty("Capital_Snake")
+ private String capitalSnake = null;
+
+ @JsonProperty("SCA_ETH_Flow_Points")
+ private String scAETHFlowPoints = null;
+
+ @JsonProperty("ATT_NAME")
+ private String ATT_NAME = null;
+
+ public Capitalization smallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ return this;
+ }
+
+ /**
+ * Get smallCamel
+ * @return smallCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallCamel() {
+ return smallCamel;
+ }
+
+ public void setSmallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ }
+
+ public Capitalization capitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ return this;
+ }
+
+ /**
+ * Get capitalCamel
+ * @return capitalCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalCamel() {
+ return capitalCamel;
+ }
+
+ public void setCapitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ }
+
+ public Capitalization smallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ return this;
+ }
+
+ /**
+ * Get smallSnake
+ * @return smallSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallSnake() {
+ return smallSnake;
+ }
+
+ public void setSmallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ }
+
+ public Capitalization capitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ return this;
+ }
+
+ /**
+ * Get capitalSnake
+ * @return capitalSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalSnake() {
+ return capitalSnake;
+ }
+
+ public void setCapitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ }
+
+ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ return this;
+ }
+
+ /**
+ * Get scAETHFlowPoints
+ * @return scAETHFlowPoints
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getScAETHFlowPoints() {
+ return scAETHFlowPoints;
+ }
+
+ public void setScAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ }
+
+ public Capitalization ATT_NAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ return this;
+ }
+
+ /**
+ * Name of the pet
+ * @return ATT_NAME
+ **/
+ @ApiModelProperty(example = "null", value = "Name of the pet ")
+ public String getATTNAME() {
+ return ATT_NAME;
+ }
+
+ public void setATTNAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Capitalization capitalization = (Capitalization) o;
+ return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
+ Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
+ Objects.equals(this.smallSnake, capitalization.smallSnake) &&
+ Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
+ Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
+ Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Capitalization {\n");
+
+ sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
+ sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
+ sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
+ sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
+ sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
+ sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).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/jersey1/docs/Capitalization.md b/samples/client/petstore/java/jersey1/docs/Capitalization.md
new file mode 100644
index 000000000000..0f3064c1996f
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/docs/Capitalization.md
@@ -0,0 +1,15 @@
+
+# Capitalization
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**smallCamel** | **String** | | [optional]
+**capitalCamel** | **String** | | [optional]
+**smallSnake** | **String** | | [optional]
+**capitalSnake** | **String** | | [optional]
+**scAETHFlowPoints** | **String** | | [optional]
+**ATT_NAME** | **String** | Name of the pet | [optional]
+
+
+
diff --git a/samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md b/samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md
new file mode 100644
index 000000000000..56f7c9ea1fff
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md
@@ -0,0 +1,52 @@
+# Fake_classname_tags123Api
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.Fake_classname_tags123Api;
+
+
+Fake_classname_tags123Api apiInstance = new Fake_classname_tags123Api();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling Fake_classname_tags123Api#testClassname");
+ 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
+
diff --git a/samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md b/samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md
new file mode 100644
index 000000000000..f8ec0768e1f8
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md
@@ -0,0 +1,52 @@
+# FakeclassnametagsApi
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](FakeclassnametagsApi.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeclassnametagsApi;
+
+
+FakeclassnametagsApi apiInstance = new FakeclassnametagsApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeclassnametagsApi#testClassname");
+ 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
+
diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml
index f1cae8b91b6a..3ba83ba77f60 100644
--- a/samples/client/petstore/java/jersey1/pom.xml
+++ b/samples/client/petstore/java/jersey1/pom.xml
@@ -6,7 +6,13 @@
jar
swagger-java-client
1.0.0
-
+ https://github.com/swagger-api/swagger-codegen
+ Swagger Java
+
+ scm:git:git@github.com:swagger-api/swagger-codegen.git
+ scm:git:git@github.com:swagger-api/swagger-codegen.git
+ https://github.com/swagger-api/swagger-codegen
+
2.2.0
@@ -19,6 +25,15 @@
+
+
+ Swagger
+ apiteam@swagger.io
+ Swagger
+ http://swagger.io
+
+
+
@@ -113,9 +128,55 @@
org.apache.maven.plugins
maven-javadoc-plugin
2.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/jersey1/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/ApiClient.java
index 36792292bdc1..de98188515a8 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/ApiClient.java
@@ -103,6 +103,7 @@ public class ApiClient {
* Build the Client used to make HTTP requests with the latest settings,
* i.e. objectMapper and debugging.
* TODO: better to use the Builder Pattern?
+ * @return API client
*/
public ApiClient rebuildHttpClient() {
// Add the JSON serialization support to Jersey
@@ -123,6 +124,7 @@ public class ApiClient {
* Note: If you make changes to the object mapper, remember to set it back via
* setObjectMapper in order to trigger HTTP client rebuilding.
*
+ * @return Object mapper
*/
public ObjectMapper getObjectMapper() {
return objectMapper;
@@ -155,6 +157,7 @@ public class ApiClient {
/**
* Gets the status code of the previous request
+ * @return Status code
*/
public int getStatusCode() {
return statusCode;
@@ -162,6 +165,7 @@ public class ApiClient {
/**
* Gets the response headers of the previous request
+ * @return Response headers
*/
public Map> getResponseHeaders() {
return responseHeaders;
@@ -169,6 +173,7 @@ public class ApiClient {
/**
* Get authentications (key: authentication name, value: authentication).
+ * @return Map of authentication
*/
public Map getAuthentications() {
return authentications;
@@ -186,6 +191,7 @@ public class ApiClient {
/**
* Helper method to set username for the first HTTP basic authentication.
+ * @param username Username
*/
public void setUsername(String username) {
for (Authentication auth : authentications.values()) {
@@ -199,6 +205,7 @@ public class ApiClient {
/**
* Helper method to set password for the first HTTP basic authentication.
+ * @param password Password
*/
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
@@ -212,6 +219,7 @@ public class ApiClient {
/**
* Helper method to set API key value for the first API key authentication.
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
@@ -225,6 +233,7 @@ public class ApiClient {
/**
* Helper method to set API key prefix for the first API key authentication.
+ * @param apiKeyPrefix API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
@@ -238,6 +247,7 @@ public class ApiClient {
/**
* Helper method to set access token for the first OAuth2 authentication.
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
@@ -251,6 +261,8 @@ public class ApiClient {
/**
* Set the User-Agent header's value (by adding to the default header map).
+ * @param userAgent User agent
+ * @return API client
*/
public ApiClient setUserAgent(String userAgent) {
addDefaultHeader("User-Agent", userAgent);
@@ -262,6 +274,7 @@ public class ApiClient {
*
* @param key The header's key
* @param value The header's value
+ * @return API client
*/
public ApiClient addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
@@ -270,6 +283,7 @@ public class ApiClient {
/**
* Check that whether debugging is enabled for this API client.
+ * @return True if debugging is on
*/
public boolean isDebugging() {
return debugging;
@@ -279,6 +293,7 @@ public class ApiClient {
* Enable/disable debugging for this API client.
*
* @param debugging To enable (true) or disable (false) debugging
+ * @return API client
*/
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
@@ -289,6 +304,7 @@ public class ApiClient {
/**
* Connect timeout (in milliseconds).
+ * @return Connection timeout
*/
public int getConnectTimeout() {
return connectionTimeout;
@@ -298,6 +314,8 @@ public class ApiClient {
* Set the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
+ * @param connectionTimeout Connection timeout in milliseconds
+ * @return API client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
@@ -307,6 +325,7 @@ public class ApiClient {
/**
* Get the date format used to parse/format date parameters.
+ * @return Date format
*/
public DateFormat getDateFormat() {
return dateFormat;
@@ -314,6 +333,8 @@ public class ApiClient {
/**
* Set the date format used to parse/format date parameters.
+ * @param dateFormat Date format
+ * @return API client
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -326,6 +347,8 @@ public class ApiClient {
/**
* Parse the given string into Date object.
+ * @param str String
+ * @return Date
*/
public Date parseDate(String str) {
try {
@@ -337,6 +360,8 @@ public class ApiClient {
/**
* Format the given Date object into string.
+ * @param date Date
+ * @return Date in string format
*/
public String formatDate(Date date) {
return dateFormat.format(date);
@@ -344,6 +369,8 @@ public class ApiClient {
/**
* Format the given parameter object into string.
+ * @param param Object
+ * @return Object in string format
*/
public String parameterToString(Object param) {
if (param == null) {
@@ -365,8 +392,12 @@ public class ApiClient {
}
/*
- Format to {@code Pair} objects.
- */
+ * Format to {@code Pair} objects.
+ * @param collectionFormat Collection format
+ * @param name Name
+ * @param value Value
+ * @return List of pair
+ */
public List parameterToPairs(String collectionFormat, String name, Object value){
List params = new ArrayList();
@@ -426,6 +457,8 @@ public class ApiClient {
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
+ * @param mime MIME
+ * @return True if MIME type is boolean
*/
public boolean isJsonMime(String mime) {
return mime != null && mime.matches("(?i)application\\/json(;.*)?");
@@ -475,6 +508,8 @@ public class ApiClient {
/**
* Escape the given string to be used as URL query value.
+ * @param str String
+ * @return Escaped string
*/
public String escapeString(String str) {
try {
@@ -487,6 +522,11 @@ public class ApiClient {
/**
* Serialize the given Java object into string according the given
* Content-Type (only JSON is supported for now).
+ * @param obj Object
+ * @param contentType Content type
+ * @param formParams Form parameters
+ * @return Object
+ * @throws ApiException API exception
*/
public Object serialize(Object obj, String contentType, Map formParams) throws ApiException {
if (contentType.startsWith("multipart/form-data")) {
@@ -592,6 +632,7 @@ public class ApiClient {
/**
* Invoke API by sending HTTP request with the given options.
*
+ * @param Type
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
* @param queryParams The query parameters
@@ -601,7 +642,9 @@ public class ApiClient {
* @param accept The request's Accept header
* @param contentType The request's Content-Type header
* @param authNames The authentications to apply
+ * @param returnType Return type
* @return The response body in type of string
+ * @throws ApiException API exception
*/
public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException {
@@ -640,6 +683,8 @@ public class ApiClient {
* Update query and header parameters based on authentication settings.
*
* @param authNames The authentications to apply
+ * @param queryParams Query parameters
+ * @param headerParams Header parameters
*/
private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) {
for (String authName : authNames) {
@@ -651,6 +696,8 @@ public class ApiClient {
/**
* Encode the given form parameters as request body.
+ * @param formParams Form parameters
+ * @return HTTP form encoded parameters
*/
private String getXWWWFormUrlencodedParams(Map formParams) {
StringBuilder formParamBuilder = new StringBuilder();
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java
index 301e4efe99c0..2d67203c51e8 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java
@@ -138,7 +138,7 @@ public class PetApi {
* 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
+ * @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List findPetsByStatus(List status) throws ApiException {
@@ -180,7 +180,7 @@ public class PetApi {
* 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
+ * @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List findPetsByTags(List tags) throws ApiException {
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java
index d6ab1a49e7c5..74bd29b88b04 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java
@@ -92,7 +92,7 @@ public class StoreApi {
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
- * @return Map
+ * @return Map<String, Integer>
* @throws ApiException if fails to make API call
*/
public Map getInventory() throws ApiException {
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java
index 8fc61b6891a0..7c570ce933db 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java
@@ -24,10 +24,12 @@ 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"),
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
+@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/jersey1/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java
new file mode 100644
index 000000000000..1466f6695208
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java
@@ -0,0 +1,204 @@
+/*
+ * 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 java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Capitalization
+ */
+
+public class Capitalization {
+ @JsonProperty("smallCamel")
+ private String smallCamel = null;
+
+ @JsonProperty("CapitalCamel")
+ private String capitalCamel = null;
+
+ @JsonProperty("small_Snake")
+ private String smallSnake = null;
+
+ @JsonProperty("Capital_Snake")
+ private String capitalSnake = null;
+
+ @JsonProperty("SCA_ETH_Flow_Points")
+ private String scAETHFlowPoints = null;
+
+ @JsonProperty("ATT_NAME")
+ private String ATT_NAME = null;
+
+ public Capitalization smallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ return this;
+ }
+
+ /**
+ * Get smallCamel
+ * @return smallCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallCamel() {
+ return smallCamel;
+ }
+
+ public void setSmallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ }
+
+ public Capitalization capitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ return this;
+ }
+
+ /**
+ * Get capitalCamel
+ * @return capitalCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalCamel() {
+ return capitalCamel;
+ }
+
+ public void setCapitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ }
+
+ public Capitalization smallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ return this;
+ }
+
+ /**
+ * Get smallSnake
+ * @return smallSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallSnake() {
+ return smallSnake;
+ }
+
+ public void setSmallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ }
+
+ public Capitalization capitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ return this;
+ }
+
+ /**
+ * Get capitalSnake
+ * @return capitalSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalSnake() {
+ return capitalSnake;
+ }
+
+ public void setCapitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ }
+
+ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ return this;
+ }
+
+ /**
+ * Get scAETHFlowPoints
+ * @return scAETHFlowPoints
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getScAETHFlowPoints() {
+ return scAETHFlowPoints;
+ }
+
+ public void setScAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ }
+
+ public Capitalization ATT_NAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ return this;
+ }
+
+ /**
+ * Name of the pet
+ * @return ATT_NAME
+ **/
+ @ApiModelProperty(example = "null", value = "Name of the pet ")
+ public String getATTNAME() {
+ return ATT_NAME;
+ }
+
+ public void setATTNAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Capitalization capitalization = (Capitalization) o;
+ return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
+ Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
+ Objects.equals(this.smallSnake, capitalization.smallSnake) &&
+ Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
+ Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
+ Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Capitalization {\n");
+
+ sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
+ sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
+ sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
+ sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
+ sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
+ sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).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/effective.pom b/samples/client/petstore/java/jersey2-java6/effective.pom
new file mode 100644
index 000000000000..70b95f7d5b58
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java6/effective.pom
@@ -0,0 +1,431 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4.0.0
+ io.swagger
+ swagger-petstore-jersey2-java6
+ 1.0.0
+ swagger-petstore-jersey2-java6
+
+ 2.2.0
+
+
+ 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
+
+
+ 2.5
+ 3.5
+ 2.7.5
+ 2.22.2
+ 2.9.4
+ 4.12
+ 1.0.0
+ 1.5.9
+
+
+
+ io.swagger
+ swagger-annotations
+ 1.5.9
+ compile
+
+
+ org.glassfish.jersey.core
+ jersey-client
+ 2.22.2
+ compile
+
+
+ org.glassfish.jersey.media
+ jersey-media-multipart
+ 2.22.2
+ compile
+
+
+ org.glassfish.jersey.media
+ jersey-media-json-jackson
+ 2.22.2
+ compile
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ 2.7.5
+ compile
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ 2.7.5
+ compile
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ 2.7.5
+ compile
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-joda
+ 2.7.5
+ compile
+
+
+ joda-time
+ joda-time
+ 2.9.4
+ compile
+
+
+ com.brsanthu
+ migbase64
+ 2.2
+ compile
+
+
+ org.apache.commons
+ commons-lang3
+ 3.5
+ compile
+
+
+ commons-io
+ commons-io
+ 2.5
+ compile
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+
+
+
+ false
+
+ central
+ Central Repository
+ https://repo.maven.apache.org/maven2
+
+
+
+
+
+ never
+
+
+ false
+
+ central
+ Central Repository
+ https://repo.maven.apache.org/maven2
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/src/main/java
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/src/main/scripts
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/src/test/java
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/classes
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/test-classes
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/src/main/resources
+
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/src/test/resources
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target
+ swagger-petstore-jersey2-java6-1.0.0
+
+
+
+ maven-antrun-plugin
+ 1.3
+
+
+ maven-assembly-plugin
+ 2.2-beta-5
+
+
+ maven-dependency-plugin
+ 2.8
+
+
+ maven-release-plugin
+ 2.3.2
+
+
+
+
+
+ maven-surefire-plugin
+ 2.12
+
+
+ default-test
+ test
+
+ test
+
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+ maven-dependency-plugin
+ 2.8
+
+
+ package
+
+ copy-dependencies
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/lib
+
+
+
+
+
+ maven-jar-plugin
+ 2.6
+
+
+ default-jar
+ package
+
+ jar
+
+
+
+
+
+ jar
+ test-jar
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.12
+
+
+ add_sources
+ generate-sources
+
+ add-source
+
+
+
+ src/main/java
+
+
+
+
+ add_test_sources
+ generate-test-sources
+
+ add-test-source
+
+
+
+ src/test/java
+
+
+
+
+
+
+ maven-compiler-plugin
+ 2.5.1
+
+
+ default-compile
+ compile
+
+ compile
+
+
+ 1.7
+ 1.7
+
+
+
+ default-testCompile
+ test-compile
+
+ testCompile
+
+
+ 1.7
+ 1.7
+
+
+
+
+ 1.7
+ 1.7
+
+
+
+ maven-javadoc-plugin
+ 2.10.4
+
+
+ maven-clean-plugin
+ 2.5
+
+
+ default-clean
+ clean
+
+ clean
+
+
+
+
+
+ maven-resources-plugin
+ 2.6
+
+
+ default-testResources
+ process-test-resources
+
+ testResources
+
+
+
+ default-resources
+ process-resources
+
+ resources
+
+
+
+
+
+ maven-install-plugin
+ 2.4
+
+
+ default-install
+ install
+
+ install
+
+
+
+
+
+ maven-deploy-plugin
+ 2.7
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+
+ maven-site-plugin
+ 3.3
+
+
+ default-site
+ site
+
+ site
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/site
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+ default-deploy
+ site-deploy
+
+ deploy
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/site
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/site
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/jersey2-java6/target/site
+
+
\ No newline at end of file
diff --git a/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md b/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md
new file mode 100644
index 000000000000..0f3064c1996f
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java8/docs/Capitalization.md
@@ -0,0 +1,15 @@
+
+# Capitalization
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**smallCamel** | **String** | | [optional]
+**capitalCamel** | **String** | | [optional]
+**smallSnake** | **String** | | [optional]
+**capitalSnake** | **String** | | [optional]
+**scAETHFlowPoints** | **String** | | [optional]
+**ATT_NAME** | **String** | Name of the pet | [optional]
+
+
+
diff --git a/samples/client/petstore/java/jersey2-java8/docs/Fake_classname_tags123Api.md b/samples/client/petstore/java/jersey2-java8/docs/Fake_classname_tags123Api.md
new file mode 100644
index 000000000000..56f7c9ea1fff
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java8/docs/Fake_classname_tags123Api.md
@@ -0,0 +1,52 @@
+# Fake_classname_tags123Api
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.Fake_classname_tags123Api;
+
+
+Fake_classname_tags123Api apiInstance = new Fake_classname_tags123Api();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling Fake_classname_tags123Api#testClassname");
+ 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
+
diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeclassnametagsApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeclassnametagsApi.md
new file mode 100644
index 000000000000..f8ec0768e1f8
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java8/docs/FakeclassnametagsApi.md
@@ -0,0 +1,52 @@
+# FakeclassnametagsApi
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](FakeclassnametagsApi.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeclassnametagsApi;
+
+
+FakeclassnametagsApi apiInstance = new FakeclassnametagsApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeclassnametagsApi#testClassname");
+ 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
+
diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml
index 7e8523783d22..be696a53993e 100644
--- a/samples/client/petstore/java/jersey2-java8/pom.xml
+++ b/samples/client/petstore/java/jersey2-java8/pom.xml
@@ -6,8 +6,10 @@
jar
swagger-petstore-jersey2
1.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.git
scm:git:git@github.com:swagger-api/swagger-codegen.git
https://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.plugins
maven-javadoc-plugin
2.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-java8/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java
index adec2801d001..3e2dab9ee91a 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java
@@ -86,6 +86,7 @@ public class ApiClient {
/**
* Gets the JSON instance to do JSON serialization and deserialization.
+ * @return JSON
*/
public JSON getJSON() {
return json;
@@ -111,6 +112,7 @@ public class ApiClient {
/**
* Gets the status code of the previous request
+ * @return Status code
*/
public int getStatusCode() {
return statusCode;
@@ -118,6 +120,7 @@ public class ApiClient {
/**
* Gets the response headers of the previous request
+ * @return Response headers
*/
public Map> getResponseHeaders() {
return responseHeaders;
@@ -125,6 +128,7 @@ public class ApiClient {
/**
* Get authentications (key: authentication name, value: authentication).
+ * @return Map of authentication object
*/
public Map getAuthentications() {
return authentications;
@@ -142,6 +146,7 @@ public class ApiClient {
/**
* Helper method to set username for the first HTTP basic authentication.
+ * @param username Username
*/
public void setUsername(String username) {
for (Authentication auth : authentications.values()) {
@@ -155,6 +160,7 @@ public class ApiClient {
/**
* Helper method to set password for the first HTTP basic authentication.
+ * @param password Password
*/
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
@@ -168,6 +174,7 @@ public class ApiClient {
/**
* Helper method to set API key value for the first API key authentication.
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
@@ -181,6 +188,7 @@ public class ApiClient {
/**
* Helper method to set API key prefix for the first API key authentication.
+ * @param apiKeyPrefix API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
@@ -194,6 +202,7 @@ public class ApiClient {
/**
* Helper method to set access token for the first OAuth2 authentication.
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
@@ -207,6 +216,8 @@ public class ApiClient {
/**
* Set the User-Agent header's value (by adding to the default header map).
+ * @param userAgent Http user agent
+ * @return API client
*/
public ApiClient setUserAgent(String userAgent) {
addDefaultHeader("User-Agent", userAgent);
@@ -218,6 +229,7 @@ public class ApiClient {
*
* @param key The header's key
* @param value The header's value
+ * @return API client
*/
public ApiClient addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
@@ -226,6 +238,7 @@ public class ApiClient {
/**
* Check that whether debugging is enabled for this API client.
+ * @return True if debugging is switched on
*/
public boolean isDebugging() {
return debugging;
@@ -235,6 +248,7 @@ public class ApiClient {
* Enable/disable debugging for this API client.
*
* @param debugging To enable (true) or disable (false) debugging
+ * @return API client
*/
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
@@ -248,12 +262,17 @@ public class ApiClient {
* with file response. The default value is null, i.e. using
* the system's default tempopary folder.
*
- * @see https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File)
+ * @return Temp folder path
*/
public String getTempFolderPath() {
return tempFolderPath;
}
+ /**
+ * Set temp folder path
+ * @param tempFolderPath Temp folder path
+ * @return API client
+ */
public ApiClient setTempFolderPath(String tempFolderPath) {
this.tempFolderPath = tempFolderPath;
return this;
@@ -261,6 +280,7 @@ public class ApiClient {
/**
* Connect timeout (in milliseconds).
+ * @return Connection timeout
*/
public int getConnectTimeout() {
return connectionTimeout;
@@ -270,6 +290,8 @@ public class ApiClient {
* Set the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
+ * @param connectionTimeout Connection timeout in milliseconds
+ * @return API client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
@@ -279,6 +301,7 @@ public class ApiClient {
/**
* Get the date format used to parse/format date parameters.
+ * @return Date format
*/
public DateFormat getDateFormat() {
return dateFormat;
@@ -286,6 +309,8 @@ public class ApiClient {
/**
* Set the date format used to parse/format date parameters.
+ * @param dateFormat Date format
+ * @return API client
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -296,6 +321,8 @@ public class ApiClient {
/**
* Parse the given string into Date object.
+ * @param str String
+ * @return Date
*/
public Date parseDate(String str) {
try {
@@ -307,6 +334,8 @@ public class ApiClient {
/**
* Format the given Date object into string.
+ * @param date Date
+ * @return Date in string format
*/
public String formatDate(Date date) {
return dateFormat.format(date);
@@ -314,6 +343,8 @@ public class ApiClient {
/**
* Format the given parameter object into string.
+ * @param param Object
+ * @return Object in string format
*/
public String parameterToString(Object param) {
if (param == null) {
@@ -335,8 +366,12 @@ public class ApiClient {
}
/*
- Format to {@code Pair} objects.
- */
+ * Format to {@code Pair} objects.
+ * @param collectionFormat Collection format
+ * @param name Name
+ * @param value Value
+ * @return List of pairs
+ */
public List parameterToPairs(String collectionFormat, String name, Object value){
List params = new ArrayList();
@@ -355,8 +390,8 @@ public class ApiClient {
return params;
}
- // get the collection format
- String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv
+ // get the collection format (default: csv)
+ String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format
if ("multi".equals(format)) {
@@ -396,6 +431,8 @@ public class ApiClient {
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
+ * @param mime MIME
+ * @return True if the MIME type is JSON
*/
public boolean isJsonMime(String mime) {
return mime != null && mime.matches("(?i)application\\/json(;.*)?");
@@ -445,6 +482,8 @@ public class ApiClient {
/**
* Escape the given string to be used as URL query value.
+ * @param str String
+ * @return Escaped string
*/
public String escapeString(String str) {
try {
@@ -457,6 +496,11 @@ public class ApiClient {
/**
* Serialize the given Java object into string entity according the given
* Content-Type (only JSON is supported for now).
+ * @param obj Object
+ * @param formParams Form parameters
+ * @param contentType Context type
+ * @return Entity
+ * @throws ApiException API exception
*/
public Entity> serialize(Object obj, Map formParams, String contentType) throws ApiException {
Entity> entity;
@@ -489,6 +533,11 @@ public class ApiClient {
/**
* Deserialize response body to Java object according to the Content-Type.
+ * @param Type
+ * @param response Response
+ * @param returnType Return type
+ * @return Deserialize object
+ * @throws ApiException API exception
*/
@SuppressWarnings("unchecked")
public T deserialize(Response response, GenericType returnType) throws ApiException {
@@ -517,6 +566,8 @@ public class ApiClient {
/**
* Download file from the given response.
+ * @param response Response
+ * @return File
* @throws ApiException If fail to read file content from response and write to disk
*/
public File downloadFileFromResponse(Response response) throws ApiException {
@@ -567,6 +618,7 @@ public class ApiClient {
/**
* Invoke API by sending HTTP request with the given options.
*
+ * @param Type
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
* @param queryParams The query parameters
@@ -578,6 +630,7 @@ public class ApiClient {
* @param authNames The authentications to apply
* @param returnType The return type into which to deserialize the response
* @return The response body in type of string
+ * @throws ApiException API exception
*/
public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams);
@@ -662,6 +715,8 @@ public class ApiClient {
/**
* Build the Client used to make HTTP requests.
+ * @param debugging Debug setting
+ * @return Client
*/
private Client buildHttpClient(boolean debugging) {
final ClientConfig clientConfig = new ClientConfig();
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/JSON.java
index abdcdf7354b8..92cfab69f2b5 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/JSON.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/JSON.java
@@ -25,6 +25,7 @@ public class JSON implements ContextResolver {
/**
* Set the date format for JSON (de)serialization with Date properties.
+ * @param dateFormat Date format
*/
public void setDateFormat(DateFormat dateFormat) {
mapper.setDateFormat(dateFormat);
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java
index 131088873d17..e816fce5bad4 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java
@@ -124,7 +124,7 @@ public class PetApi {
* 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
+ * @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List findPetsByStatus(List status) throws ApiException {
@@ -166,7 +166,7 @@ public class PetApi {
* 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
+ * @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List findPetsByTags(List tags) throws ApiException {
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java
index c0c9a166ad72..41bd67518715 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java
@@ -78,7 +78,7 @@ public class StoreApi {
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
- * @return Map
+ * @return Map<String, Integer>
* @throws ApiException if fails to make API call
*/
public Map getInventory() throws ApiException {
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
index 8fc61b6891a0..7c570ce933db 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
@@ -24,10 +24,12 @@ 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"),
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
+@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-java8/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java
new file mode 100644
index 000000000000..1466f6695208
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java
@@ -0,0 +1,204 @@
+/*
+ * 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 java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Capitalization
+ */
+
+public class Capitalization {
+ @JsonProperty("smallCamel")
+ private String smallCamel = null;
+
+ @JsonProperty("CapitalCamel")
+ private String capitalCamel = null;
+
+ @JsonProperty("small_Snake")
+ private String smallSnake = null;
+
+ @JsonProperty("Capital_Snake")
+ private String capitalSnake = null;
+
+ @JsonProperty("SCA_ETH_Flow_Points")
+ private String scAETHFlowPoints = null;
+
+ @JsonProperty("ATT_NAME")
+ private String ATT_NAME = null;
+
+ public Capitalization smallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ return this;
+ }
+
+ /**
+ * Get smallCamel
+ * @return smallCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallCamel() {
+ return smallCamel;
+ }
+
+ public void setSmallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ }
+
+ public Capitalization capitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ return this;
+ }
+
+ /**
+ * Get capitalCamel
+ * @return capitalCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalCamel() {
+ return capitalCamel;
+ }
+
+ public void setCapitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ }
+
+ public Capitalization smallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ return this;
+ }
+
+ /**
+ * Get smallSnake
+ * @return smallSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallSnake() {
+ return smallSnake;
+ }
+
+ public void setSmallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ }
+
+ public Capitalization capitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ return this;
+ }
+
+ /**
+ * Get capitalSnake
+ * @return capitalSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalSnake() {
+ return capitalSnake;
+ }
+
+ public void setCapitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ }
+
+ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ return this;
+ }
+
+ /**
+ * Get scAETHFlowPoints
+ * @return scAETHFlowPoints
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getScAETHFlowPoints() {
+ return scAETHFlowPoints;
+ }
+
+ public void setScAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ }
+
+ public Capitalization ATT_NAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ return this;
+ }
+
+ /**
+ * Name of the pet
+ * @return ATT_NAME
+ **/
+ @ApiModelProperty(example = "null", value = "Name of the pet ")
+ public String getATTNAME() {
+ return ATT_NAME;
+ }
+
+ public void setATTNAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Capitalization capitalization = (Capitalization) o;
+ return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
+ Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
+ Objects.equals(this.smallSnake, capitalization.smallSnake) &&
+ Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
+ Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
+ Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Capitalization {\n");
+
+ sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
+ sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
+ sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
+ sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
+ sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
+ sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).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/docs/Capitalization.md b/samples/client/petstore/java/jersey2/docs/Capitalization.md
new file mode 100644
index 000000000000..0f3064c1996f
--- /dev/null
+++ b/samples/client/petstore/java/jersey2/docs/Capitalization.md
@@ -0,0 +1,15 @@
+
+# Capitalization
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**smallCamel** | **String** | | [optional]
+**capitalCamel** | **String** | | [optional]
+**smallSnake** | **String** | | [optional]
+**capitalSnake** | **String** | | [optional]
+**scAETHFlowPoints** | **String** | | [optional]
+**ATT_NAME** | **String** | Name of the pet | [optional]
+
+
+
diff --git a/samples/client/petstore/java/jersey2/docs/Fake_classname_tags123Api.md b/samples/client/petstore/java/jersey2/docs/Fake_classname_tags123Api.md
new file mode 100644
index 000000000000..56f7c9ea1fff
--- /dev/null
+++ b/samples/client/petstore/java/jersey2/docs/Fake_classname_tags123Api.md
@@ -0,0 +1,52 @@
+# Fake_classname_tags123Api
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.Fake_classname_tags123Api;
+
+
+Fake_classname_tags123Api apiInstance = new Fake_classname_tags123Api();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling Fake_classname_tags123Api#testClassname");
+ 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
+
diff --git a/samples/client/petstore/java/jersey2/docs/FakeclassnametagsApi.md b/samples/client/petstore/java/jersey2/docs/FakeclassnametagsApi.md
new file mode 100644
index 000000000000..f8ec0768e1f8
--- /dev/null
+++ b/samples/client/petstore/java/jersey2/docs/FakeclassnametagsApi.md
@@ -0,0 +1,52 @@
+# FakeclassnametagsApi
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](FakeclassnametagsApi.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeclassnametagsApi;
+
+
+FakeclassnametagsApi apiInstance = new FakeclassnametagsApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeclassnametagsApi#testClassname");
+ 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
+
diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml
index 5e8b8375da07..1ead35657196 100644
--- a/samples/client/petstore/java/jersey2/pom.xml
+++ b/samples/client/petstore/java/jersey2/pom.xml
@@ -6,8 +6,10 @@
jar
swagger-petstore-jersey2
1.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.git
scm:git:git@github.com:swagger-api/swagger-codegen.git
https://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.plugins
maven-javadoc-plugin
2.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/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java
index adec2801d001..3e2dab9ee91a 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java
@@ -86,6 +86,7 @@ public class ApiClient {
/**
* Gets the JSON instance to do JSON serialization and deserialization.
+ * @return JSON
*/
public JSON getJSON() {
return json;
@@ -111,6 +112,7 @@ public class ApiClient {
/**
* Gets the status code of the previous request
+ * @return Status code
*/
public int getStatusCode() {
return statusCode;
@@ -118,6 +120,7 @@ public class ApiClient {
/**
* Gets the response headers of the previous request
+ * @return Response headers
*/
public Map> getResponseHeaders() {
return responseHeaders;
@@ -125,6 +128,7 @@ public class ApiClient {
/**
* Get authentications (key: authentication name, value: authentication).
+ * @return Map of authentication object
*/
public Map getAuthentications() {
return authentications;
@@ -142,6 +146,7 @@ public class ApiClient {
/**
* Helper method to set username for the first HTTP basic authentication.
+ * @param username Username
*/
public void setUsername(String username) {
for (Authentication auth : authentications.values()) {
@@ -155,6 +160,7 @@ public class ApiClient {
/**
* Helper method to set password for the first HTTP basic authentication.
+ * @param password Password
*/
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
@@ -168,6 +174,7 @@ public class ApiClient {
/**
* Helper method to set API key value for the first API key authentication.
+ * @param apiKey API key
*/
public void setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
@@ -181,6 +188,7 @@ public class ApiClient {
/**
* Helper method to set API key prefix for the first API key authentication.
+ * @param apiKeyPrefix API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
@@ -194,6 +202,7 @@ public class ApiClient {
/**
* Helper method to set access token for the first OAuth2 authentication.
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
@@ -207,6 +216,8 @@ public class ApiClient {
/**
* Set the User-Agent header's value (by adding to the default header map).
+ * @param userAgent Http user agent
+ * @return API client
*/
public ApiClient setUserAgent(String userAgent) {
addDefaultHeader("User-Agent", userAgent);
@@ -218,6 +229,7 @@ public class ApiClient {
*
* @param key The header's key
* @param value The header's value
+ * @return API client
*/
public ApiClient addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
@@ -226,6 +238,7 @@ public class ApiClient {
/**
* Check that whether debugging is enabled for this API client.
+ * @return True if debugging is switched on
*/
public boolean isDebugging() {
return debugging;
@@ -235,6 +248,7 @@ public class ApiClient {
* Enable/disable debugging for this API client.
*
* @param debugging To enable (true) or disable (false) debugging
+ * @return API client
*/
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
@@ -248,12 +262,17 @@ public class ApiClient {
* with file response. The default value is null, i.e. using
* the system's default tempopary folder.
*
- * @see https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File)
+ * @return Temp folder path
*/
public String getTempFolderPath() {
return tempFolderPath;
}
+ /**
+ * Set temp folder path
+ * @param tempFolderPath Temp folder path
+ * @return API client
+ */
public ApiClient setTempFolderPath(String tempFolderPath) {
this.tempFolderPath = tempFolderPath;
return this;
@@ -261,6 +280,7 @@ public class ApiClient {
/**
* Connect timeout (in milliseconds).
+ * @return Connection timeout
*/
public int getConnectTimeout() {
return connectionTimeout;
@@ -270,6 +290,8 @@ public class ApiClient {
* Set the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
+ * @param connectionTimeout Connection timeout in milliseconds
+ * @return API client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
@@ -279,6 +301,7 @@ public class ApiClient {
/**
* Get the date format used to parse/format date parameters.
+ * @return Date format
*/
public DateFormat getDateFormat() {
return dateFormat;
@@ -286,6 +309,8 @@ public class ApiClient {
/**
* Set the date format used to parse/format date parameters.
+ * @param dateFormat Date format
+ * @return API client
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
@@ -296,6 +321,8 @@ public class ApiClient {
/**
* Parse the given string into Date object.
+ * @param str String
+ * @return Date
*/
public Date parseDate(String str) {
try {
@@ -307,6 +334,8 @@ public class ApiClient {
/**
* Format the given Date object into string.
+ * @param date Date
+ * @return Date in string format
*/
public String formatDate(Date date) {
return dateFormat.format(date);
@@ -314,6 +343,8 @@ public class ApiClient {
/**
* Format the given parameter object into string.
+ * @param param Object
+ * @return Object in string format
*/
public String parameterToString(Object param) {
if (param == null) {
@@ -335,8 +366,12 @@ public class ApiClient {
}
/*
- Format to {@code Pair} objects.
- */
+ * Format to {@code Pair} objects.
+ * @param collectionFormat Collection format
+ * @param name Name
+ * @param value Value
+ * @return List of pairs
+ */
public List parameterToPairs(String collectionFormat, String name, Object value){
List params = new ArrayList();
@@ -355,8 +390,8 @@ public class ApiClient {
return params;
}
- // get the collection format
- String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv
+ // get the collection format (default: csv)
+ String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format
if ("multi".equals(format)) {
@@ -396,6 +431,8 @@ public class ApiClient {
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
+ * @param mime MIME
+ * @return True if the MIME type is JSON
*/
public boolean isJsonMime(String mime) {
return mime != null && mime.matches("(?i)application\\/json(;.*)?");
@@ -445,6 +482,8 @@ public class ApiClient {
/**
* Escape the given string to be used as URL query value.
+ * @param str String
+ * @return Escaped string
*/
public String escapeString(String str) {
try {
@@ -457,6 +496,11 @@ public class ApiClient {
/**
* Serialize the given Java object into string entity according the given
* Content-Type (only JSON is supported for now).
+ * @param obj Object
+ * @param formParams Form parameters
+ * @param contentType Context type
+ * @return Entity
+ * @throws ApiException API exception
*/
public Entity> serialize(Object obj, Map formParams, String contentType) throws ApiException {
Entity> entity;
@@ -489,6 +533,11 @@ public class ApiClient {
/**
* Deserialize response body to Java object according to the Content-Type.
+ * @param Type
+ * @param response Response
+ * @param returnType Return type
+ * @return Deserialize object
+ * @throws ApiException API exception
*/
@SuppressWarnings("unchecked")
public T deserialize(Response response, GenericType returnType) throws ApiException {
@@ -517,6 +566,8 @@ public class ApiClient {
/**
* Download file from the given response.
+ * @param response Response
+ * @return File
* @throws ApiException If fail to read file content from response and write to disk
*/
public File downloadFileFromResponse(Response response) throws ApiException {
@@ -567,6 +618,7 @@ public class ApiClient {
/**
* Invoke API by sending HTTP request with the given options.
*
+ * @param Type
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
* @param queryParams The query parameters
@@ -578,6 +630,7 @@ public class ApiClient {
* @param authNames The authentications to apply
* @param returnType The return type into which to deserialize the response
* @return The response body in type of string
+ * @throws ApiException API exception
*/
public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams);
@@ -662,6 +715,8 @@ public class ApiClient {
/**
* Build the Client used to make HTTP requests.
+ * @param debugging Debug setting
+ * @return Client
*/
private Client buildHttpClient(boolean debugging) {
final ClientConfig clientConfig = new ClientConfig();
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java
index 126fa1c856ac..562e2e13ea3a 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java
@@ -25,6 +25,7 @@ public class JSON implements ContextResolver {
/**
* Set the date format for JSON (de)serialization with Date properties.
+ * @param dateFormat Date format
*/
public void setDateFormat(DateFormat dateFormat) {
mapper.setDateFormat(dateFormat);
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java
index 131088873d17..e816fce5bad4 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java
@@ -124,7 +124,7 @@ public class PetApi {
* 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
+ * @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List findPetsByStatus(List status) throws ApiException {
@@ -166,7 +166,7 @@ public class PetApi {
* 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
+ * @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List findPetsByTags(List tags) throws ApiException {
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java
index c0c9a166ad72..41bd67518715 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java
@@ -78,7 +78,7 @@ public class StoreApi {
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
- * @return Map
+ * @return Map<String, Integer>
* @throws ApiException if fails to make API call
*/
public Map getInventory() throws ApiException {
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java
index 8fc61b6891a0..7c570ce933db 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java
@@ -24,10 +24,12 @@ 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"),
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
+@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/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java
new file mode 100644
index 000000000000..1466f6695208
--- /dev/null
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java
@@ -0,0 +1,204 @@
+/*
+ * 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 java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Capitalization
+ */
+
+public class Capitalization {
+ @JsonProperty("smallCamel")
+ private String smallCamel = null;
+
+ @JsonProperty("CapitalCamel")
+ private String capitalCamel = null;
+
+ @JsonProperty("small_Snake")
+ private String smallSnake = null;
+
+ @JsonProperty("Capital_Snake")
+ private String capitalSnake = null;
+
+ @JsonProperty("SCA_ETH_Flow_Points")
+ private String scAETHFlowPoints = null;
+
+ @JsonProperty("ATT_NAME")
+ private String ATT_NAME = null;
+
+ public Capitalization smallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ return this;
+ }
+
+ /**
+ * Get smallCamel
+ * @return smallCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallCamel() {
+ return smallCamel;
+ }
+
+ public void setSmallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ }
+
+ public Capitalization capitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ return this;
+ }
+
+ /**
+ * Get capitalCamel
+ * @return capitalCamel
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalCamel() {
+ return capitalCamel;
+ }
+
+ public void setCapitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ }
+
+ public Capitalization smallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ return this;
+ }
+
+ /**
+ * Get smallSnake
+ * @return smallSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSmallSnake() {
+ return smallSnake;
+ }
+
+ public void setSmallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ }
+
+ public Capitalization capitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ return this;
+ }
+
+ /**
+ * Get capitalSnake
+ * @return capitalSnake
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCapitalSnake() {
+ return capitalSnake;
+ }
+
+ public void setCapitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ }
+
+ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ return this;
+ }
+
+ /**
+ * Get scAETHFlowPoints
+ * @return scAETHFlowPoints
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getScAETHFlowPoints() {
+ return scAETHFlowPoints;
+ }
+
+ public void setScAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ }
+
+ public Capitalization ATT_NAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ return this;
+ }
+
+ /**
+ * Name of the pet
+ * @return ATT_NAME
+ **/
+ @ApiModelProperty(example = "null", value = "Name of the pet ")
+ public String getATTNAME() {
+ return ATT_NAME;
+ }
+
+ public void setATTNAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Capitalization capitalization = (Capitalization) o;
+ return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
+ Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
+ Objects.equals(this.smallSnake, capitalization.smallSnake) &&
+ Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
+ Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
+ Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Capitalization {\n");
+
+ sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
+ sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
+ sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
+ sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
+ sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
+ sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).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/okhttp-gson-parcelableModel/.travis.yml b/samples/client/petstore/java/okhttp-gson-parcelableModel/.travis.yml
index 33e79472abd8..70cb81a67c20 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 be6e56fa8ce3..6e9f71ce7dd0 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/Client.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /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 71a7dbe809e2..ac7cea323ffd 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 000000000000..4dddc0bfd27b
--- /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 29b6d288c8f4..08fee3448821 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 21a4db7c3778..284ae074be9a 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md
@@ -4,17 +4,18 @@ 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
-
-# **testEndpointParameters**
-> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
+
+# **testClientModel**
+> Client testClientModel(body)
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+To test \"client\" model
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+To test \"client\" model
### Example
```java
@@ -23,21 +24,77 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
//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, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+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 query parameters
+To test enum 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/FakeclassnametagsApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeclassnametagsApi.md
new file mode 100644
index 000000000000..f8ec0768e1f8
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeclassnametagsApi.md
@@ -0,0 +1,52 @@
+# FakeclassnametagsApi
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](FakeclassnametagsApi.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+# **testClassname**
+> Client testClassname(body)
+
+To test class name in snake case
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeclassnametagsApi;
+
+
+FakeclassnametagsApi apiInstance = new FakeclassnametagsApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeclassnametagsApi#testClassname");
+ 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
+
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 c671e97ffbc4..714a97a40d93 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 b47618b28cc2..5b3a9a0e46da 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/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
index e0314e20e519..3b5f84043e37 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/effective.pom b/samples/client/petstore/java/okhttp-gson-parcelableModel/effective.pom
new file mode 100644
index 000000000000..cc60c017b232
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/effective.pom
@@ -0,0 +1,395 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4.0.0
+ io.swagger
+ petstore-okhttp-gson-parcelable
+ 1.0.0
+ petstore-okhttp-gson-parcelable
+
+ 2.2.0
+
+
+ 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
+
+
+ 2.6.2
+ 1.7
+ 2.9.3
+ 4.12
+ 1.0.0
+ 1.7
+ 1.7
+ 2.7.5
+ UTF-8
+ 1.5.9
+
+
+
+ io.swagger
+ swagger-annotations
+ 1.5.9
+ compile
+
+
+ com.squareup.okhttp
+ okhttp
+ 2.7.5
+ compile
+
+
+ com.squareup.okhttp
+ logging-interceptor
+ 2.7.5
+ compile
+
+
+ com.google.code.gson
+ gson
+ 2.6.2
+ compile
+
+
+ joda-time
+ joda-time
+ 2.9.3
+ compile
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+
+
+
+ false
+
+ central
+ Central Repository
+ https://repo.maven.apache.org/maven2
+
+
+
+
+
+ never
+
+
+ false
+
+ central
+ Central Repository
+ https://repo.maven.apache.org/maven2
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/scripts
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/classes
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/test-classes
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/resources
+
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/resources
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target
+ petstore-okhttp-gson-parcelable-1.0.0
+
+
+
+ maven-antrun-plugin
+ 1.3
+
+
+ maven-assembly-plugin
+ 2.2-beta-5
+
+
+ maven-dependency-plugin
+ 2.8
+
+
+ maven-release-plugin
+ 2.3.2
+
+
+
+
+
+ maven-surefire-plugin
+ 2.12
+
+
+ default-test
+ test
+
+ test
+
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+ maven-dependency-plugin
+ 2.8
+
+
+ package
+
+ copy-dependencies
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/lib
+
+
+
+
+
+ maven-jar-plugin
+ 2.2
+
+
+ default-jar
+ package
+
+ jar
+
+
+
+
+
+ jar
+ test-jar
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.10
+
+
+ add_sources
+ generate-sources
+
+ add-source
+
+
+
+ src/main/java
+
+
+
+
+ add_test_sources
+ generate-test-sources
+
+ add-test-source
+
+
+
+ src/test/java
+
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ gradle-test
+ integration-test
+
+ exec
+
+
+ gradle
+
+ test
+
+
+
+
+
+
+ maven-clean-plugin
+ 2.5
+
+
+ default-clean
+ clean
+
+ clean
+
+
+
+
+
+ maven-resources-plugin
+ 2.6
+
+
+ default-testResources
+ process-test-resources
+
+ testResources
+
+
+
+ default-resources
+ process-resources
+
+ resources
+
+
+
+
+
+ maven-compiler-plugin
+ 3.1
+
+
+ default-compile
+ compile
+
+ compile
+
+
+
+ default-testCompile
+ test-compile
+
+ testCompile
+
+
+
+
+
+ maven-install-plugin
+ 2.4
+
+
+ default-install
+ install
+
+ install
+
+
+
+
+
+ maven-deploy-plugin
+ 2.7
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+
+ maven-site-plugin
+ 3.3
+
+
+ default-site
+ site
+
+ site
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/site
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+ default-deploy
+ site-deploy
+
+ deploy
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/site
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/site
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+
+
+ /Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/java/okhttp-gson-parcelableModel/target/site
+
+
\ No newline at end of file
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 a2460c37ee3d..be36cd4675d7 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 c4137dcb8169..d014d7d4035c 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 02a967d83730..d0b5cfc1e57e 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 b87ea49a02e0..6baa9120c690 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 57e53b2d5989..cbf868efb85c 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 0445a969c0ae..d72b38c95680 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 9ad2d2465199..b75cd316ac1d 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 fee9da83ddd3..a06ea04a4d09 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 761a23a28696..48c4bfa92d53 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 31140c76df4a..339a3fb36d5c 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 975bd34004cb..d11b40fa0585 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,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.
*/
@@ -38,10 +26,11 @@ 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 io.swagger.client.model.Client;
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -72,12 +61,6 @@ public class FakeApi {
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");
@@ -113,11 +96,29 @@ public class FakeApi {
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
@@ -129,20 +130,20 @@ public class FakeApi {
/**
* 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 = testClientModelCall(body, null, null);
+ 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
@@ -169,7 +170,7 @@ public class FakeApi {
};
}
- com.squareup.okhttp.Call call = testClientModelCall(body, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = testClientModelValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -178,27 +179,6 @@ public class FakeApi {
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");
@@ -262,6 +242,39 @@ public class FakeApi {
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;
+
+
+
+
+
}
/**
@@ -308,7 +321,7 @@ public class FakeApi {
* @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);
+ 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);
}
@@ -354,15 +367,14 @@ public class FakeApi {
};
}
- com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
+ 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, BigDecimal enumQueryInteger, Double enumQueryDouble, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ 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");
@@ -389,13 +401,13 @@ public class FakeApi {
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);
@@ -414,11 +426,24 @@ public class FakeApi {
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)
@@ -429,13 +454,13 @@ public class FakeApi {
* @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 {
+ 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)
@@ -447,14 +472,14 @@ public class FakeApi {
* @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);
+ 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)
@@ -467,7 +492,7 @@ public class FakeApi {
* @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 {
+ 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;
@@ -488,7 +513,7 @@ public class FakeApi {
};
}
- com.squareup.okhttp.Call call = testEnumParametersCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, progressListener, progressRequestListener);
+ 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 aca7f0b02b0d..b7119add7d11 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,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.
*/
@@ -38,9 +26,10 @@ 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 io.swagger.client.model.Pet;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -71,12 +60,6 @@ public class PetApi {
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");
@@ -112,6 +95,24 @@ public class PetApi {
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;
+
+
+
+
+
}
/**
@@ -132,7 +133,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = addPetValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -165,7 +166,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = addPetValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -173,12 +174,6 @@ public class PetApi {
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()));
@@ -217,6 +212,24 @@ public class PetApi {
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;
+
+
+
+
+
}
/**
@@ -239,7 +252,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = deletePetValidateBeforeCall(petId, apiKey, null, null);
return apiClient.execute(call);
}
@@ -273,7 +286,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = deletePetValidateBeforeCall(petId, apiKey, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -281,12 +294,6 @@ public class PetApi {
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");
@@ -324,6 +331,24 @@ public class PetApi {
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;
+
+
+
+
+
}
/**
@@ -346,7 +371,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = findPetsByStatusValidateBeforeCall(status, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -380,7 +405,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = findPetsByStatusValidateBeforeCall(status, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -389,12 +414,6 @@ public class PetApi {
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");
@@ -432,6 +451,24 @@ public class PetApi {
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;
+
+
+
+
+
}
/**
@@ -454,7 +491,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = findPetsByTagsValidateBeforeCall(tags, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -488,7 +525,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = findPetsByTagsValidateBeforeCall(tags, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -497,12 +534,6 @@ public class PetApi {
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()));
@@ -539,6 +570,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call getPetByIdValidateBeforeCall(Long petId, 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 getPetById(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
}
/**
@@ -561,7 +610,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = getPetByIdValidateBeforeCall(petId, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -595,7 +644,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = getPetByIdValidateBeforeCall(petId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -604,12 +653,6 @@ public class PetApi {
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");
@@ -645,6 +688,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call updatePetValidateBeforeCall(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 updatePet(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
}
/**
@@ -665,7 +726,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = updatePetValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -698,7 +759,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = updatePetValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -706,12 +767,6 @@ public class PetApi {
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()));
@@ -752,6 +807,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, 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 updatePetWithForm(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
}
/**
@@ -776,7 +849,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, null, null);
return apiClient.execute(call);
}
@@ -811,7 +884,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -819,12 +892,6 @@ public class PetApi {
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()));
@@ -865,6 +932,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, 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 uploadFile(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
}
/**
@@ -891,7 +976,7 @@ public class PetApi {
* @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);
+ com.squareup.okhttp.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -927,7 +1012,7 @@ public class PetApi {
};
}
- com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java
index 04ad8deb2a6d..199f2c7b1099 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.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.
*/
@@ -38,6 +26,7 @@ import com.google.gson.reflect.TypeToken;
import java.io.IOException;
+
import io.swagger.client.model.Order;
import java.lang.reflect.Type;
@@ -69,12 +58,6 @@ public class StoreApi {
private com.squareup.okhttp.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
- // verify the required parameter 'orderId' is set
- if (orderId == null) {
- throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)");
- }
-
-
// create path and map variables
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
@@ -111,6 +94,24 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'orderId' is set
+ if (orderId == null) {
+ throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
}
/**
@@ -131,7 +132,7 @@ public class StoreApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException {
- com.squareup.okhttp.Call call = deleteOrderCall(orderId, null, null);
+ com.squareup.okhttp.Call call = deleteOrderValidateBeforeCall(orderId, null, null);
return apiClient.execute(call);
}
@@ -164,7 +165,7 @@ public class StoreApi {
};
}
- com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = deleteOrderValidateBeforeCall(orderId, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -172,7 +173,6 @@ public class StoreApi {
private com.squareup.okhttp.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
-
// create path and map variables
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
@@ -208,6 +208,19 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+
+ com.squareup.okhttp.Call call = getInventoryCall(progressListener, progressRequestListener);
+ return call;
+
+
+
+
+
}
/**
@@ -228,7 +241,7 @@ public class StoreApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse