diff --git a/README.md b/README.md
index e5be5de59f7a..d3d19f7c63a7 100644
--- a/README.md
+++ b/README.md
@@ -59,8 +59,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
-------------------------- | ------------ | -------------------------- | -----
-2.2.0-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen)
-2.1.6 (**current stable**) | 2016-04-06 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-codegen/tree/v2.1.6)
+2.2.0 (**current stable**) | 2016-07-15 | 1.0, 1.1, 1.2, 2.0 | [tag v2.2.0](https://github.com/swagger-api/swagger-codegen/tree/v2.2.0)
+2.1.6 | 2016-04-06 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-codegen/tree/v2.1.6)
2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/v2.0.17)
1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1)
@@ -69,7 +69,7 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
If you're looking for the latest stable version, you can grab it directly from maven central (you'll need java 7 runtime at a minimum):
```
-wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.1.6/swagger-codegen-cli-2.1.6.jar -O swagger-codegen-cli.jar
+wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.0/swagger-codegen-cli-2.2.0.jar -O swagger-codegen-cli.jar
java -jar swagger-codegen-cli.jar help
```
@@ -148,7 +148,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
```
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
-You can also download the JAR (latest relesae) directly from [maven.org]( http://central.maven.org/maven2/io/swagger/swagger-codegen/2.1.6/swagger-codegen-2.1.6.jar)
+You can also download the JAR (latest relesae) directly from [maven.org]( http://central.maven.org/maven2/io/swagger/swagger-codegen/2.2.0/swagger-codegen-2.2.0.jar)
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate`
diff --git a/modules/swagger-codegen-cli/pom.xml b/modules/swagger-codegen-cli/pom.xml
index 92490778689b..fa1ddefa72aa 100644
--- a/modules/swagger-codegen-cli/pom.xml
+++ b/modules/swagger-codegen-cli/pom.xml
@@ -3,7 +3,7 @@
io.swagger
swagger-codegen-project
- 2.2.0-SNAPSHOT
+ 2.2.1-SNAPSHOT
../..
4.0.0
diff --git a/modules/swagger-codegen-maven-plugin/pom.xml b/modules/swagger-codegen-maven-plugin/pom.xml
index 0b6885bf0486..8850b8ee7ea8 100644
--- a/modules/swagger-codegen-maven-plugin/pom.xml
+++ b/modules/swagger-codegen-maven-plugin/pom.xml
@@ -6,7 +6,7 @@
io.swagger
swagger-codegen-project
- 2.2.0-SNAPSHOT
+ 2.2.1-SNAPSHOT
../..
swagger-codegen-maven-plugin
diff --git a/modules/swagger-codegen/pom.xml b/modules/swagger-codegen/pom.xml
index 8f7e98074deb..16b89d6a5bac 100644
--- a/modules/swagger-codegen/pom.xml
+++ b/modules/swagger-codegen/pom.xml
@@ -3,7 +3,7 @@
io.swagger
swagger-codegen-project
- 2.2.0-SNAPSHOT
+ 2.2.1-SNAPSHOT
../..
4.0.0
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
index 1eceabdd973e..47df8cded35f 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
@@ -1195,7 +1195,35 @@ public class DefaultCodegen {
allRequired = null;
}
// parent model
- final RefModel parent = (RefModel) composed.getParent();
+ RefModel parent = (RefModel) composed.getParent();
+
+ // interfaces (intermediate models)
+ if (composed.getInterfaces() != null) {
+ if (m.interfaces == null)
+ m.interfaces = new ArrayList();
+ for (RefModel _interface : composed.getInterfaces()) {
+ Model interfaceModel = null;
+ if (allDefinitions != null) {
+ interfaceModel = allDefinitions.get(_interface.getSimpleRef());
+ }
+ // set first interface with discriminator found as parent
+ if (parent == null && interfaceModel instanceof ModelImpl && ((ModelImpl) interfaceModel).getDiscriminator() != null) {
+ parent = _interface;
+ } else {
+ final String interfaceRef = toModelName(_interface.getSimpleRef());
+ m.interfaces.add(interfaceRef);
+ addImport(m, interfaceRef);
+ if (allDefinitions != null) {
+ if (supportsInheritance) {
+ addProperties(allProperties, allRequired, interfaceModel, allDefinitions);
+ } else {
+ addProperties(properties, required, interfaceModel, allDefinitions);
+ }
+ }
+ }
+ }
+ }
+
if (parent != null) {
final String parentRef = parent.getSimpleRef();
m.parentSchema = parentRef;
@@ -1210,24 +1238,7 @@ public class DefaultCodegen {
}
}
}
- // interfaces (intermediate models)
- if (composed.getInterfaces() != null) {
- if (m.interfaces == null)
- m.interfaces = new ArrayList();
- for (RefModel _interface : composed.getInterfaces()) {
- final String interfaceRef = toModelName(_interface.getSimpleRef());
- m.interfaces.add(interfaceRef);
- addImport(m, interfaceRef);
- if (allDefinitions != null) {
- final Model interfaceModel = allDefinitions.get(_interface.getSimpleRef());
- if (supportsInheritance) {
- addProperties(allProperties, allRequired, interfaceModel, allDefinitions);
- } else {
- addProperties(properties, required, interfaceModel, allDefinitions);
- }
- }
- }
- }
+
// child model (properties owned by the model itself)
Model child = composed.getChild();
if (child != null && child instanceof RefModel && allDefinitions != null) {
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java
index b0a2fd342927..20b6acca907a 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java
@@ -259,7 +259,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
private Model getParent(Model model) {
if (model instanceof ComposedModel) {
- return definitions.get(((ComposedModel) model).getParent().getReference());
+ Model parent = ((ComposedModel) model).getParent();
+ if(parent != null) {
+ return definitions.get(parent.getReference());
+ }
}
return null;
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 000acb852e36..9c46c524f1d1 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
@@ -117,6 +117,18 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
+ } else if (additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) {
+ // guess from api package
+ String derviedInvokerPackage = deriveInvokerPackageName((String)additionalProperties.get(CodegenConstants.API_PACKAGE));
+ this.additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, derviedInvokerPackage);
+ this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
+ LOGGER.info("Invoker Package Name, originally not set, is now dervied from api package name: " + derviedInvokerPackage);
+ } else if (additionalProperties.containsKey(CodegenConstants.MODEL_PACKAGE)) {
+ // guess from model package
+ String derviedInvokerPackage = deriveInvokerPackageName((String)additionalProperties.get(CodegenConstants.MODEL_PACKAGE));
+ this.additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, derviedInvokerPackage);
+ this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
+ LOGGER.info("Invoker Package Name, originally not set, is now dervied from model package name: " + derviedInvokerPackage);
} else {
//not set, use default to be passed to template
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);
@@ -845,4 +857,23 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
return input.replace("*/", "*_/").replace("/*", "/_*");
}
+ /*
+ * Derive invoker package name based on the input
+ * e.g. foo.bar.model => foo.bar
+ *
+ * @param input API package/model name
+ * @return Derived invoker package name based on API package/model name
+ */
+ private String deriveInvokerPackageName(String input) {
+ String[] parts = input.split(Pattern.quote(".")); // Split on period.
+
+ StringBuilder sb = new StringBuilder();
+ String delim = "";
+ for (String p : Arrays.copyOf(parts, parts.length-1)) {
+ sb.append(delim).append(p);
+ delim = ".";
+ }
+ return sb.toString();
+ }
+
}
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 ee55337e4b90..4978faba6e96 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
@@ -188,7 +188,7 @@
- 1.5.8
+ 1.5.9
2.22.2
2.7.5
{{^java8}}
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 c9991c230e50..1be9703bad3e 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
@@ -142,7 +142,7 @@
- 1.5.8
+ 1.5.9
1.9.0
2.7.5
2.9.3
diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache
index a46b1960a67c..5b6b7c0161d2 100644
--- a/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache
@@ -111,7 +111,7 @@
1.0.0
- 1.0.4
+ 1.0.8
9.2.9.v20150224
1.0.1
4.8.2
diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pom.mustache
index 3373c53b2cec..a98e1b68ad43 100644
--- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pom.mustache
@@ -145,7 +145,7 @@
- 1.5.8
+ 1.5.9
9.2.9.v20150224
3.0.11.Final
1.6.3
diff --git a/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache b/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache
index b7bd04afffb3..ea6661986748 100644
--- a/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache
@@ -217,7 +217,7 @@
2.3.9
1.2
2.2
- 1.5.8
+ 1.5.9
1.0.0
4.8.1
diff --git a/modules/swagger-codegen/src/main/resources/android/pom.mustache b/modules/swagger-codegen/src/main/resources/android/pom.mustache
index bf11a6625c50..e073253123db 100644
--- a/modules/swagger-codegen/src/main/resources/android/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/android/pom.mustache
@@ -145,7 +145,7 @@
- 1.5.8
+ 1.5.9
2.3.1
4.8.1
1.0.0
diff --git a/modules/swagger-codegen/src/main/resources/scala/pom.mustache b/modules/swagger-codegen/src/main/resources/scala/pom.mustache
index 51256c424912..e6d80631460a 100644
--- a/modules/swagger-codegen/src/main/resources/scala/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/scala/pom.mustache
@@ -210,7 +210,7 @@
1.2
2.2
1.19
- 1.5.8
+ 1.5.9
1.0.5
1.0.0
2.4.2
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaInheritanceTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaInheritanceTest.java
index dcd87b4d7008..a4cb27db7561 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaInheritanceTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaInheritanceTest.java
@@ -13,10 +13,14 @@ import com.google.common.collect.Sets;
import org.testng.Assert;
import org.testng.annotations.Test;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
public class JavaInheritanceTest {
@SuppressWarnings("static-method")
- @Test(description = "convert a composed model")
+ @Test(description = "convert a composed model with parent")
public void javaInheritanceTest() {
final Model model = new ComposedModel().parent(new RefModel("Base"))
.child(new ModelImpl().additionalProperties(new StringProperty()));
@@ -29,4 +33,26 @@ public class JavaInheritanceTest {
Assert.assertEquals(cm.parent, "Base");
Assert.assertEquals(cm.imports, Sets.newHashSet("Base"));
}
+
+ @SuppressWarnings("static-method")
+ @Test(description = "convert a composed model with discriminator")
+ public void javaInheritanceWithDiscriminatorTest() {
+ ModelImpl base = new ModelImpl();
+ base.setDiscriminator("disc");
+
+ final Model model = new ComposedModel()
+ .interfaces(Arrays.asList(new RefModel("Base")))
+ .child(new ModelImpl().additionalProperties(new StringProperty()));
+
+ final Map allDefinitions = new HashMap();
+ allDefinitions.put("Base", base);
+
+ final DefaultCodegen codegen = new JavaClientCodegen();
+ final CodegenModel cm = codegen.fromModel("sample", model, allDefinitions);
+
+ Assert.assertEquals(cm.name, "sample");
+ Assert.assertEquals(cm.classname, "Sample");
+ Assert.assertEquals(cm.parent, "Base");
+ Assert.assertEquals(cm.imports, Sets.newHashSet("Base"));
+ }
}
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/javascript/JavaScriptInheritanceTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/javascript/JavaScriptInheritanceTest.java
index 94285e468881..592a9e2ae587 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/javascript/JavaScriptInheritanceTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/javascript/JavaScriptInheritanceTest.java
@@ -51,7 +51,7 @@ public class JavaScriptInheritanceTest {
Assert.assertEquals(cm.vars.size(), 1);
Assert.assertEquals(cm.vars.get(0).name, "childProp");
Assert.assertEquals(cm.allVars.size(), 4);
- String[] allVars = {"baseProp", "intf1Prop", "intf2Prop", "childProp"};
+ String[] allVars = {"intf1Prop", "intf2Prop", "baseProp", "childProp"};
for (int i = 0; i < allVars.length; i++) {
Assert.assertEquals(cm.allVars.get(i).name, allVars[i]);
}
@@ -91,7 +91,7 @@ public class JavaScriptInheritanceTest {
Assert.assertEquals(cm.imports, Sets.newHashSet("Base", "Interface1", "Interface2"));
Assert.assertEquals(cm.vars.size(), 4);
Assert.assertEquals(cm.allVars.size(), 4);
- String[] allVars = {"baseProp", "intf1Prop", "intf2Prop", "childProp"};
+ String[] allVars = {"intf1Prop", "intf2Prop", "baseProp", "childProp"};
for (int i = 0; i < allVars.length; i++) {
Assert.assertEquals(cm.vars.get(i).name, allVars[i]);
Assert.assertEquals(cm.allVars.get(i).name, allVars[i]);
diff --git a/modules/swagger-generator/pom.xml b/modules/swagger-generator/pom.xml
index 7304fdd04bc3..29d4e25c2b3c 100644
--- a/modules/swagger-generator/pom.xml
+++ b/modules/swagger-generator/pom.xml
@@ -4,7 +4,7 @@
io.swagger
swagger-codegen-project
- 2.2.0-SNAPSHOT
+ 2.2.1-SNAPSHOT
../..
swagger-generator
diff --git a/pom.xml b/pom.xml
index f31a7c230d98..be3a7f8c5e6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
swagger-codegen-project
pom
swagger-codegen-project
- 2.2.0-SNAPSHOT
+ 2.2.1-SNAPSHOT
https://github.com/swagger-api/swagger-codegen
scm:git:git@github.com:swagger-api/swagger-codegen.git
@@ -704,7 +704,7 @@
- 1.0.19
+ 1.0.21
2.11.1
2.3.4
1.5.9
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 fd559f5e624b..57fa0cdd95ad 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
@@ -2,6 +2,7 @@ package io.swagger.client.api;
import io.swagger.client.ApiClient;
+import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
@@ -16,6 +17,19 @@ import feign.*;
public interface FakeApi extends ApiClient.Api {
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /fake")
+ @Headers({
+ "Content-type: application/json",
+ "Accept: application/json",
+ })
+ Client testClientModel(Client body);
+
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..2fbd695b1df8
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @JsonProperty("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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/Client.md b/samples/client/petstore/java/jersey1/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/docs/Client.md
@@ -0,0 +1,10 @@
+
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md
index 21a4db7c3778..c145425060f9 100644
--- a/samples/client/petstore/java/jersey1/docs/FakeApi.md
+++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md
@@ -4,10 +4,54 @@ 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
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
index c772f9402da7..f949514a7ff1 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
@@ -32,6 +32,7 @@ import io.swagger.client.Configuration;
import io.swagger.client.model.*;
import io.swagger.client.Pair;
+import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
@@ -62,6 +63,47 @@ public class FakeApi {
this.apiClient = apiClient;
}
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client testClientModel(Client body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
+ }
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ // query params
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ GenericType localVarReturnType = new GenericType() {};
+ return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..2fbd695b1df8
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @JsonProperty("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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-java8/docs/Client.md b/samples/client/petstore/java/jersey2-java8/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java8/docs/Client.md
@@ -0,0 +1,10 @@
+
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md
index 678a0f76a82b..c60ae94adfea 100644
--- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md
+++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md
@@ -4,10 +4,54 @@ 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
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java
index 5bb6afe51b89..c010d34a6559 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java
@@ -7,6 +7,7 @@ import io.swagger.client.Pair;
import javax.ws.rs.core.GenericType;
+import io.swagger.client.model.Client;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.math.BigDecimal;
@@ -36,6 +37,47 @@ public class FakeApi {
this.apiClient = apiClient;
}
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client testClientModel(Client body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
+ }
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ // query params
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ GenericType localVarReturnType = new GenericType() {};
+ return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..2fbd695b1df8
--- /dev/null
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @JsonProperty("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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/Client.md b/samples/client/petstore/java/jersey2/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /dev/null
+++ b/samples/client/petstore/java/jersey2/docs/Client.md
@@ -0,0 +1,10 @@
+
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/jersey2/docs/FakeApi.md b/samples/client/petstore/java/jersey2/docs/FakeApi.md
index 21a4db7c3778..c145425060f9 100644
--- a/samples/client/petstore/java/jersey2/docs/FakeApi.md
+++ b/samples/client/petstore/java/jersey2/docs/FakeApi.md
@@ -4,10 +4,54 @@ 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
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
index 547417bfa55f..d4a083ffe88d 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
@@ -7,6 +7,7 @@ import io.swagger.client.Pair;
import javax.ws.rs.core.GenericType;
+import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
@@ -36,6 +37,47 @@ public class FakeApi {
this.apiClient = apiClient;
}
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client testClientModel(Client body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
+ }
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ // query params
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ GenericType localVarReturnType = new GenericType() {};
+ return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..2fbd695b1df8
--- /dev/null
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @JsonProperty("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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/docs/Client.md b/samples/client/petstore/java/okhttp-gson/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson/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/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md
index 21a4db7c3778..c145425060f9 100644
--- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md
+++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md
@@ -4,10 +4,54 @@ 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
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
index 52dce361e2a4..c6e71e5f1b66 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
@@ -38,6 +38,7 @@ 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;
@@ -67,6 +68,112 @@ public class FakeApi {
this.apiClient = apiClient;
}
+ /* Build call for testClientModel */
+ private com.squareup.okhttp.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException("Missing the required parameter 'body' when calling testClientModel(Async)");
+ }
+
+
+ // create path and map variables
+ String localVarPath = "/fake".replaceAll("\\{format\\}","json");
+
+ List localVarQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public Client testClientModel(Client body) throws ApiException {
+ ApiResponse resp = testClientModelWithHttpInfo(body);
+ return resp.getData();
+ }
+
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return ApiResponse<Client>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException {
+ com.squareup.okhttp.Call call = testClientModelCall(body, null, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return apiClient.execute(call, localVarReturnType);
+ }
+
+ /**
+ * To test \"client\" model (asynchronously)
+ *
+ * @param body client model (required)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call testClientModelAsync(Client body, final ApiCallback callback) throws ApiException {
+
+ ProgressResponseBody.ProgressListener progressListener = null;
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+ if (callback != null) {
+ progressListener = new ProgressResponseBody.ProgressListener() {
+ @Override
+ public void update(long bytesRead, long contentLength, boolean done) {
+ callback.onDownloadProgress(bytesRead, contentLength, done);
+ }
+ };
+
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+ @Override
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+ callback.onUploadProgress(bytesWritten, contentLength, done);
+ }
+ };
+ }
+
+ com.squareup.okhttp.Call call = testClientModelCall(body, progressListener, progressRequestListener);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ apiClient.executeAsync(call, localVarReturnType, callback);
+ return call;
+ }
/* Build call for testEndpointParameters */
private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, LocalDate date, DateTime dateTime, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..6eac28668461
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @SerializedName("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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/retrofit/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
index b1d2d056bb9b..076b9fc2ab14 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
@@ -6,6 +6,7 @@ import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
+import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
@@ -16,6 +17,31 @@ import java.util.List;
import java.util.Map;
public interface FakeApi {
+ /**
+ * To test \"client\" model
+ * Sync method
+ *
+ * @param body client model (required)
+ * @return Client
+ */
+
+ @PATCH("/fake")
+ Client testClientModel(
+ @Body Client body
+ );
+
+ /**
+ * To test \"client\" model
+ * Async method
+ * @param body client model (required)
+ * @param cb callback method
+ * @return void
+ */
+
+ @PATCH("/fake")
+ void testClientModel(
+ @Body Client body, Callback cb
+ );
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Sync method
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..6eac28668461
--- /dev/null
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @SerializedName("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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/retrofit2/docs/Client.md b/samples/client/petstore/java/retrofit2/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2/docs/Client.md
@@ -0,0 +1,10 @@
+
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md
index decba432a56d..ce1e37babc31 100644
--- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md
+++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md
@@ -4,10 +4,54 @@ 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
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
index 042a6ba37e57..9bd1f7b9882c 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
@@ -8,6 +8,7 @@ import retrofit2.http.*;
import okhttp3.RequestBody;
+import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
@@ -18,6 +19,18 @@ import java.util.List;
import java.util.Map;
public interface FakeApi {
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Call<Client>
+ */
+
+ @PATCH("fake")
+ Call testClientModel(
+ @Body Client body
+ );
+
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..6eac28668461
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @SerializedName("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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/retrofit2rx/docs/Client.md b/samples/client/petstore/java/retrofit2rx/docs/Client.md
new file mode 100644
index 000000000000..5c490ea166c7
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx/docs/Client.md
@@ -0,0 +1,10 @@
+
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md
index decba432a56d..ce1e37babc31 100644
--- a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md
+++ b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md
@@ -4,10 +4,54 @@ 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
+
+# **testClientModel**
+> Client testClientModel(body)
+
+To test \"client\" model
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+Client body = new Client(); // Client | client model
+try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
# **testEndpointParameters**
> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
index 7a6fec402bb7..aadcdfdee76c 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
@@ -8,6 +8,7 @@ import retrofit2.http.*;
import okhttp3.RequestBody;
+import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
@@ -18,6 +19,18 @@ import java.util.List;
import java.util.Map;
public interface FakeApi {
+ /**
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return Call<Client>
+ */
+
+ @PATCH("fake")
+ Observable testClientModel(
+ @Body Client body
+ );
+
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java
new file mode 100644
index 000000000000..6eac28668461
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Client
+ */
+
+public class Client {
+ @SerializedName("client")
+ private String client = null;
+
+ public Client client(String client) {
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+
+ sb.append(" client: ").append(toIndentedString(client)).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 ");
+ }
+}
+