Merge pull request #2984 from daknin/2983

2983: Java Feign client generator:  HTTP header name should be named …
This commit is contained in:
wing328 2016-05-30 10:40:10 +08:00
commit 6e83939f0e
30 changed files with 661 additions and 46 deletions

View File

@ -26,7 +26,7 @@ public interface {{classname}} extends ApiClient.Api {
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}") @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
@Headers({ @Headers({
"Content-type: {{vendorExtensions.x-contentType}}", "Content-type: {{vendorExtensions.x-contentType}}",
"Accepts: {{vendorExtensions.x-accepts}}",{{#headerParams}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}}
"{{paramName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, "{{paramName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}},
{{/hasMore}}{{/headerParams}} {{/hasMore}}{{/headerParams}}
}) })

View File

@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View File

@ -1,4 +1,4 @@
#Tue May 17 23:03:29 CST 2016 #Tue May 17 23:08:05 CST 2016
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@ -14,7 +14,7 @@ import feign.codec.EncodeException;
import feign.codec.Encoder; import feign.codec.Encoder;
import feign.RequestTemplate; import feign.RequestTemplate;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class FormAwareEncoder implements Encoder { public class FormAwareEncoder implements Encoder {
public static final String UTF_8 = "utf-8"; public static final String UTF_8 = "utf-8";
private static final String LINE_FEED = "\r\n"; private static final String LINE_FEED = "\r\n";

View File

@ -1,6 +1,6 @@
package io.swagger.client; package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class StringUtil { public class StringUtil {
/** /**
* Check if the given array contains the given value (with case-insensitive comparison). * Check if the given array contains the given value (with case-insensitive comparison).

View File

@ -11,7 +11,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import feign.*; import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public interface FakeApi extends ApiClient.Api { public interface FakeApi extends ApiClient.Api {
@ -34,8 +34,8 @@ public interface FakeApi extends ApiClient.Api {
*/ */
@RequestLine("POST /fake") @RequestLine("POST /fake")
@Headers({ @Headers({
"Content-type: application/x-www-form-urlencoded", "Content-type: application/xml; charset&#x3D;utf-8",
"Accepts: application/json", "Accept: application/xml; charset&#x3D;utf-8,application/json; charset&#x3D;utf-8",
}) })
void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("string") String string, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("binary") byte[] binary, @Param("date") Date date, @Param("dateTime") Date dateTime, @Param("password") String password); void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("string") String string, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("binary") byte[] binary, @Param("date") Date date, @Param("dateTime") Date dateTime, @Param("password") String password);
} }

View File

@ -12,7 +12,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import feign.*; import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public interface PetApi extends ApiClient.Api { public interface PetApi extends ApiClient.Api {
@ -25,7 +25,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("POST /pet") @RequestLine("POST /pet")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void addPet(Pet body); void addPet(Pet body);
@ -39,7 +39,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("DELETE /pet/{petId}") @RequestLine("DELETE /pet/{petId}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
"apiKey: {apiKey}" "apiKey: {apiKey}"
}) })
void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
@ -53,7 +53,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("GET /pet/findByStatus?status={status}") @RequestLine("GET /pet/findByStatus?status={status}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
List<Pet> findPetsByStatus(@Param("status") List<String> status); List<Pet> findPetsByStatus(@Param("status") List<String> status);
@ -66,7 +66,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("GET /pet/findByTags?tags={tags}") @RequestLine("GET /pet/findByTags?tags={tags}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
List<Pet> findPetsByTags(@Param("tags") List<String> tags); List<Pet> findPetsByTags(@Param("tags") List<String> tags);
@ -79,7 +79,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("GET /pet/{petId}") @RequestLine("GET /pet/{petId}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
Pet getPetById(@Param("petId") Long petId); Pet getPetById(@Param("petId") Long petId);
@ -92,7 +92,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("PUT /pet") @RequestLine("PUT /pet")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void updatePet(Pet body); void updatePet(Pet body);
@ -107,7 +107,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("POST /pet/{petId}") @RequestLine("POST /pet/{petId}")
@Headers({ @Headers({
"Content-type: application/x-www-form-urlencoded", "Content-type: application/x-www-form-urlencoded",
"Accepts: application/json", "Accept: application/json",
}) })
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status); void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
@ -122,7 +122,7 @@ public interface PetApi extends ApiClient.Api {
@RequestLine("POST /pet/{petId}/uploadImage") @RequestLine("POST /pet/{petId}/uploadImage")
@Headers({ @Headers({
"Content-type: multipart/form-data", "Content-type: multipart/form-data",
"Accepts: application/json", "Accept: application/json",
}) })
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
} }

View File

@ -10,7 +10,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import feign.*; import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public interface StoreApi extends ApiClient.Api { public interface StoreApi extends ApiClient.Api {
@ -23,7 +23,7 @@ public interface StoreApi extends ApiClient.Api {
@RequestLine("DELETE /store/order/{orderId}") @RequestLine("DELETE /store/order/{orderId}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void deleteOrder(@Param("orderId") String orderId); void deleteOrder(@Param("orderId") String orderId);
@ -35,7 +35,7 @@ public interface StoreApi extends ApiClient.Api {
@RequestLine("GET /store/inventory") @RequestLine("GET /store/inventory")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
Map<String, Integer> getInventory(); Map<String, Integer> getInventory();
@ -48,7 +48,7 @@ public interface StoreApi extends ApiClient.Api {
@RequestLine("GET /store/order/{orderId}") @RequestLine("GET /store/order/{orderId}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
Order getOrderById(@Param("orderId") Long orderId); Order getOrderById(@Param("orderId") Long orderId);
@ -61,7 +61,7 @@ public interface StoreApi extends ApiClient.Api {
@RequestLine("POST /store/order") @RequestLine("POST /store/order")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
Order placeOrder(Order body); Order placeOrder(Order body);
} }

View File

@ -10,7 +10,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import feign.*; import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public interface UserApi extends ApiClient.Api { public interface UserApi extends ApiClient.Api {
@ -23,7 +23,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("POST /user") @RequestLine("POST /user")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void createUser(User body); void createUser(User body);
@ -36,7 +36,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("POST /user/createWithArray") @RequestLine("POST /user/createWithArray")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void createUsersWithArrayInput(List<User> body); void createUsersWithArrayInput(List<User> body);
@ -49,7 +49,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("POST /user/createWithList") @RequestLine("POST /user/createWithList")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void createUsersWithListInput(List<User> body); void createUsersWithListInput(List<User> body);
@ -62,7 +62,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("DELETE /user/{username}") @RequestLine("DELETE /user/{username}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void deleteUser(@Param("username") String username); void deleteUser(@Param("username") String username);
@ -75,7 +75,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("GET /user/{username}") @RequestLine("GET /user/{username}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
User getUserByName(@Param("username") String username); User getUserByName(@Param("username") String username);
@ -89,7 +89,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("GET /user/login?username={username}&password={password}") @RequestLine("GET /user/login?username={username}&password={password}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
String loginUser(@Param("username") String username, @Param("password") String password); String loginUser(@Param("username") String username, @Param("password") String password);
@ -101,7 +101,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("GET /user/logout") @RequestLine("GET /user/logout")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void logoutUser(); void logoutUser();
@ -115,7 +115,7 @@ public interface UserApi extends ApiClient.Api {
@RequestLine("PUT /user/{username}") @RequestLine("PUT /user/{username}")
@Headers({ @Headers({
"Content-type: application/json", "Content-type: application/json",
"Accepts: application/json", "Accept: application/json",
}) })
void updateUser(@Param("username") String username, User body); void updateUser(@Param("username") String username, User body);
} }

View File

@ -0,0 +1,97 @@
package io.swagger.client.model;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* AdditionalPropertiesClass
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class AdditionalPropertiesClass {
private Map<String, String> mapProperty = new HashMap<String, String>();
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>();
/**
**/
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("map_property")
public Map<String, String> getMapProperty() {
return mapProperty;
}
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
/**
**/
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("map_of_map_property")
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).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 ");
}
}

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* Animal * Animal
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Animal { public class Animal {
private String className = null; private String className = null;

View File

@ -10,7 +10,7 @@ import java.util.List;
/** /**
* AnimalFarm * AnimalFarm
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class AnimalFarm extends ArrayList<Animal> { public class AnimalFarm extends ArrayList<Animal> {

View File

@ -0,0 +1,116 @@
package io.swagger.client.model;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayTest
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class ArrayTest {
private List<String> arrayOfString = new ArrayList<String>();
private List<List<Long>> arrayArrayOfInteger = new ArrayList<List<Long>>();
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
/**
**/
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("array_of_string")
public List<String> getArrayOfString() {
return arrayOfString;
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
/**
**/
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("array_array_of_integer")
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
/**
**/
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("array_array_of_model")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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 ");
}
}

View File

@ -11,7 +11,7 @@ import io.swagger.client.model.Animal;
/** /**
* Cat * Cat
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Cat extends Animal { public class Cat extends Animal {
private String className = null; private String className = null;

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* Category * Category
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Category { public class Category {
private Long id = null; private Long id = null;

View File

@ -11,7 +11,7 @@ import io.swagger.client.model.Animal;
/** /**
* Dog * Dog
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Dog extends Animal { public class Dog extends Animal {
private String className = null; private String className = null;

View File

@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* EnumTest * EnumTest
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class EnumTest { public class EnumTest {

View File

@ -12,7 +12,7 @@ import java.util.Date;
/** /**
* FormatTest * FormatTest
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class FormatTest { public class FormatTest {
private Integer integer = null; private Integer integer = null;

View File

@ -0,0 +1,119 @@
package io.swagger.client.model;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class MixedPropertiesAndAdditionalPropertiesClass {
private String uuid = null;
private Date dateTime = null;
private Map<String, Animal> map = new HashMap<String, Animal>();
/**
**/
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
this.uuid = uuid;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
**/
public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("dateTime")
public Date getDateTime() {
return dateTime;
}
public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
/**
**/
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("map")
public Map<String, Animal> getMap() {
return map;
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
@Override
public int hashCode() {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" map: ").append(toIndentedString(map)).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 ");
}
}

View File

@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
* Model for testing model name starting with number * Model for testing model name starting with number
*/ */
@ApiModel(description = "Model for testing model name starting with number") @ApiModel(description = "Model for testing model name starting with number")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Model200Response { public class Model200Response {
private Integer name = null; private Integer name = null;

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* ModelApiResponse * ModelApiResponse
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class ModelApiResponse { public class ModelApiResponse {
private Integer code = null; private Integer code = null;

View File

@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
* Model for testing reserved words * Model for testing reserved words
*/ */
@ApiModel(description = "Model for testing reserved words") @ApiModel(description = "Model for testing reserved words")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class ModelReturn { public class ModelReturn {
private Integer _return = null; private Integer _return = null;

View File

@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
* Model for testing model name same as property name * Model for testing model name same as property name
*/ */
@ApiModel(description = "Model for testing model name same as property name") @ApiModel(description = "Model for testing model name same as property name")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Name { public class Name {
private Integer name = null; private Integer name = null;

View File

@ -12,7 +12,7 @@ import java.util.Date;
/** /**
* Order * Order
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Order { public class Order {
private Long id = null; private Long id = null;

View File

@ -15,7 +15,7 @@ import java.util.List;
/** /**
* Pet * Pet
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Pet { public class Pet {
private Long id = null; private Long id = null;

View File

@ -0,0 +1,84 @@
package io.swagger.client.model;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ReadOnlyFirst
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class ReadOnlyFirst {
private String bar = null;
private String baz = null;
@ApiModelProperty(example = "null", value = "")
@JsonProperty("bar")
public String getBar() {
return bar;
}
/**
**/
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("baz")
public String getBaz() {
return baz;
}
public void setBaz(String baz) {
this.baz = baz;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(this.baz, readOnlyFirst.baz);
}
@Override
public int hashCode() {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReadOnlyFirst {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" baz: ").append(toIndentedString(baz)).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 ");
}
}

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* SpecialModelName * SpecialModelName
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class SpecialModelName { public class SpecialModelName {
private Long specialPropertyName = null; private Long specialPropertyName = null;

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* Tag * Tag
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class Tag { public class Tag {
private Long id = null; private Long id = null;

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* User * User
*/ */
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-13T16:29:08.210Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-29T21:13:47.191+01:00")
public class User { public class User {
private Long id = null; private Long id = null;