Add HTTP signature authentication support to Java (jersey2-experimental) (#6058)

* add fmt-maven-plugin to jersey2 exp

* update samples

* add http signature auth template

* minor fix

* fix http beaer auth, update sample

* fix http signature auth

* fix http signature auth

* header support

* add query string to path

* undo changes in default codegen

* ignore fake test

* add serialize to string method

* add serialzie to string method

* add get mapper

* auto format java source code

* remove plugin

* update pom.xml

* change back AbstractOpenApiSchema to T

* skip mvn code formatter in bin script

* undo changes to spec

* update samples

* add back HttpSignatureAuth.java
This commit is contained in:
William Cheng
2020-04-28 00:09:30 +08:00
committed by GitHub
parent 3b0bd368a6
commit 588023686a
196 changed files with 9227 additions and 10030 deletions

View File

@@ -27,13 +27,15 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-experimental.json -o samples/client/petstore/java/jersey2-experimental -t modules/openapi-generator/src/main/resources/Java --additional-properties hideGenerationTimestamp=true $@"
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-experimental.json -o samples/client/petstore/java/jersey2-experimental -t modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/jersey2-experimental/src/main"
rm -rf samples/client/petstore/java/jersey2-experimental/src/main
find samples/client/petstore/java/jersey2-experimental -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
java $JAVA_OPTS -jar $executable $ags
#mvn com.coveo:fmt-maven-plugin:format -f samples/client/petstore/java/jersey2-experimental/pom.xml
# copy additional manually written unit-tests
#mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client
#mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth

View File

@@ -373,6 +373,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
if (JERSEY2_EXPERIMENTAL.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("auth/HttpSignatureAuth.mustache", authFolder, "HttpSignatureAuth.java"));
supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java"));
}
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);

View File

@@ -23,6 +23,7 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
{{^supportJava6}}
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
@@ -56,6 +57,7 @@ import java.util.regex.Pattern;
import {{invokerPackage}}.auth.Authentication;
import {{invokerPackage}}.auth.HttpBasicAuth;
import {{invokerPackage}}.auth.HttpBearerAuth;
import {{invokerPackage}}.auth.HttpSignatureAuth;
import {{invokerPackage}}.auth.ApiKeyAuth;
import {{invokerPackage}}.model.AbstractOpenApiSchema;
@@ -159,11 +161,26 @@ public class ApiClient {
setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}");
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}}
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}}
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
authentications = new HashMap<String, Authentication>();
{{#authMethods}}
{{#isBasic}}
{{#isBasicBasic}}
authentications.put("{{name}}", new HttpBasicAuth());
{{/isBasicBasic}}
{{#isBasicBearer}}
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));
{{/isBasicBearer}}
{{#isHttpSignature}}
authentications.put("{{name}}", new HttpSignatureAuth("{{name}}", null, null));
{{/isHttpSignature}}
{{/isBasic}}
{{#isApiKey}}
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));
{{/isApiKey}}
{{#isOAuth}}
authentications.put("{{name}}", new OAuth());
{{/isOAuth}}
{{/authMethods}}
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
@@ -701,6 +718,38 @@ public class ApiClient {
return entity;
}
/**
* Serialize the given Java object into string according the given
* Content-Type (only JSON, HTTP form is supported for now).
* @param obj Object
* @param formParams Form parameters
* @param contentType Context type
* @return String
* @throws ApiException API exception
*/
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
return json.getMapper().writeValueAsString(obj);
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{
Object result = null;
@@ -862,7 +911,6 @@ public class ApiClient {
* @throws ApiException API exception
*/
public <T> ApiResponse<T> invokeAPI(String operation, String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// Not using `.target(targetURL).path(path)` below,
// to support (constant) query string in `path`, e.g. "/posts?draft=1"
@@ -935,6 +983,14 @@ public class ApiClient {
Entity<?> entity = serialize(body, formParams, contentType);
// put all headers in one place
Map<String, String> allHeaderParams = new HashMap<>();
allHeaderParams.putAll(defaultHeaderMap);
allHeaderParams.putAll(headerParams);
// update different parameters (e.g. headers) for authentication
updateParamsForAuth(authNames, queryParams, allHeaderParams, cookieParams, serializeToString(body, formParams, contentType), method, target.getUri());
Response response = null;
try {
@@ -1061,12 +1117,17 @@ public class ApiClient {
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
* @param method HTTP method (e.g. POST)
* @param uri HTTP URI
*/
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams,
Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
auth.applyToParams(queryParams, headerParams, cookieParams);
if (auth == null) {
throw new RuntimeException("Authentication undefined: " + authName);
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
}

View File

@@ -62,4 +62,6 @@ public class JSON implements ContextResolver<ObjectMapper> {
public ObjectMapper getContext(Class<?> type) {
return mapper;
}
public ObjectMapper getMapper() { return mapper; }
}

View File

@@ -0,0 +1,68 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
{{>generatedAnnotation}}
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
private String apiKey;
private String apiKeyPrefix;
public ApiKeyAuth(String location, String paramName) {
this.location = location;
this.paramName = paramName;
}
public String getLocation() {
return location;
}
public String getParamName() {
return paramName;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public String getApiKeyPrefix() {
return apiKeyPrefix;
}
public void setApiKeyPrefix(String apiKeyPrefix) {
this.apiKeyPrefix = apiKeyPrefix;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if (apiKey == null) {
return;
}
String value;
if (apiKeyPrefix != null) {
value = apiKeyPrefix + " " + apiKey;
} else {
value = apiKey;
}
if ("query".equals(location)) {
queryParams.add(new Pair(paramName, value));
} else if ("header".equals(location)) {
headerParams.put(paramName, value);
} else if ("cookie".equals(location)) {
cookieParams.put(paramName, value);
}
}
}

View File

@@ -0,0 +1,22 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
public interface Authentication {
/**
* Apply authentication settings to header and query params.
*
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
*/
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException;
}

View File

@@ -0,0 +1,62 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
{{^java8}}
import com.migcomponents.migbase64.Base64;
{{/java8}}
{{#java8}}
import java.util.Base64;
import java.nio.charset.StandardCharsets;
{{/java8}}
import java.net.URI;
import java.util.Map;
import java.util.List;
{{^java8}}
import java.io.UnsupportedEncodingException;
{{/java8}}
{{>generatedAnnotation}}
public class HttpBasicAuth implements Authentication {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if (username == null && password == null) {
return;
}
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
{{^java8}}
try {
headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
{{/java8}}
{{#java8}}
headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
{{/java8}}
}
}

View File

@@ -0,0 +1,51 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
{{>generatedAnnotation}}
public class HttpBearerAuth implements Authentication {
private final String scheme;
private String bearerToken;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
}
/**
* Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
*
* @return The bearer token
*/
public String getBearerToken() {
return bearerToken;
}
/**
* Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
*
* @param bearerToken The bearer token to send in the Authorization header
*/
public void setBearerToken(String bearerToken) {
this.bearerToken = bearerToken;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if(bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
}
}

View File

@@ -0,0 +1,115 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.net.URLEncoder;
import java.security.MessageDigest;
import java.security.Key;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.List;
import org.tomitribe.auth.signatures.*;
public class HttpSignatureAuth implements Authentication {
private Signer signer;
private String name;
private Algorithm algorithm;
private List<String> headers;
public HttpSignatureAuth(String name, Algorithm algorithm, List<String> headers) {
this.name = name;
this.algorithm = algorithm;
this.headers = headers;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Algorithm getAlgorithm() {
return algorithm;
}
public void setAlgorithm(Algorithm algorithm) {
this.algorithm = algorithm;
}
public List<String> getHeaders() {
return headers;
}
public void setHeaders(List<String> headers) {
this.headers = headers;
}
public Signer getSigner() {
return signer;
}
public void setSigner(Signer signer) {
this.signer = signer;
}
public void setup(Key key) throws ApiException {
if (key == null) {
throw new ApiException("key (java.security.Key) cannot be null");
}
signer = new Signer(key, new Signature(name, algorithm, null, headers));
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams,
String payload, String method, URI uri) throws ApiException {
try {
if (headers.contains("host")) {
headerParams.put("host", uri.getHost());
}
if (headers.contains("date")) {
headerParams.put("date", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US).format(new Date()));
}
if (headers.contains("digest")) {
headerParams.put("digest", "SHA-256=" + new String(Base64.getEncoder().encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes()))));
}
if (signer == null) {
throw new ApiException("Signer cannot be null. Please run the method `setup` to set it up correctly");
}
// construct the path with the URL query string
String path = uri.getPath();
List<String> urlQueries = new ArrayList<String>();
for (Pair queryParam : queryParams) {
urlQueries.add(queryParam.getName() + "=" + URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20"));
}
if (!urlQueries.isEmpty()) {
path = path + "?" + String.join("&", urlQueries);
}
headerParams.put("Authorization", signer.sign(method, path, headerParams).toString());
} catch (Exception ex) {
throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString());
}
}
}

View File

@@ -0,0 +1,30 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
{{>generatedAnnotation}}
public class OAuth implements Authentication {
private String accessToken;
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if (accessToken != null) {
headerParams.put("Authorization", "Bearer " + accessToken);
}
}
}

View File

@@ -0,0 +1,7 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
public enum OAuthFlow {
accessCode, implicit, password, application
}

View File

@@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<version>3.0.0-M4</version>
<configuration>
<systemProperties>
<property>
@@ -73,7 +73,7 @@
</systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel>
<forkMode>pertest</forkMode>
<threadCount>10</threadCount>
</configuration>
</plugin>
<plugin>
@@ -142,7 +142,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<version>3.8.1</version>
<configuration>
{{#supportJava6}}
<source>1.6</source>
@@ -158,6 +158,13 @@
<target>1.7</target>
{{/java8}}
{{/supportJava6}}
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-J-Xss4m</arg><!-- Compiling the generated JSON.java file may require larger stack size. -->
</compilerArgs>
</configuration>
</plugin>
<plugin>
@@ -283,14 +290,12 @@
<version>${jackson-databind-nullable-version}</version>
</dependency>
{{#withXml}}
<!-- XML processing: JAXB -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>${jersey-version}</version>
</dependency>
{{/withXml}}
{{#joda}}
<dependency>
@@ -325,14 +330,19 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons_lang3_version}</version>
<version>${commons-lang3-version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons_io_version}</version>
<version>${commons-io-version}</version>
</dependency>
{{/supportJava6}}
<dependency>
<groupId>org.tomitribe</groupId>
<artifactId>tomitribe-http-signatures</artifactId>
<version>${http-signature-version}</version>
</dependency>
{{#useBeanValidation}}
<!-- Bean Validation API support -->
<dependency>
@@ -358,8 +368,8 @@
{{/supportJava6}}
{{#supportJava6}}
<jersey-version>2.6</jersey-version>
<commons_io_version>2.5</commons_io_version>
<commons_lang3_version>3.6</commons_lang3_version>
<commons-io-version>2.5</commons-io-version>
<commons-lang3-version>3.6</commons-lang3-version>
{{/supportJava6}}
<jackson-version>2.10.3</jackson-version>
<jackson-databind-version>2.10.3</jackson-databind-version>
@@ -368,5 +378,6 @@
<threetenbp-version>2.9.10</threetenbp-version>
{{/threetenbp}}
<junit-version>4.13</junit-version>
<http-signature-version>1.3</http-signature-version>
</properties>
</project>

View File

@@ -1113,7 +1113,7 @@ paths:
schema:
type: string
security:
- http_signature_test
- http_signature_test: []
requestBody:
$ref: '#/components/requestBodies/Pet'
responses:

View File

@@ -6,17 +6,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapString** | **Map&lt;String, String&gt;** | | [optional]
**mapNumber** | [**Map&lt;String, BigDecimal&gt;**](BigDecimal.md) | | [optional]
**mapInteger** | **Map&lt;String, Integer&gt;** | | [optional]
**mapBoolean** | **Map&lt;String, Boolean&gt;** | | [optional]
**mapArrayInteger** | [**Map&lt;String, List&lt;Integer&gt;&gt;**](List.md) | | [optional]
**mapArrayAnytype** | [**Map&lt;String, List&lt;Object&gt;&gt;**](List.md) | | [optional]
**mapMapString** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapMapAnytype** | [**Map&lt;String, Map&lt;String, Object&gt;&gt;**](Map.md) | | [optional]
**anytype1** | [**Object**](.md) | | [optional]
**anytype2** | [**Object**](.md) | | [optional]
**anytype3** | [**Object**](.md) | | [optional]
**mapProperty** | **Map&lt;String, String&gt;** | | [optional]
**mapOfMapProperty** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## call123testSpecialTags
> Client call123testSpecialTags(body)
> Client call123testSpecialTags(client)
To test special tags
@@ -32,9 +32,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(body);
Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
@@ -52,7 +52,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type

View File

@@ -0,0 +1,68 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
## fooGet
> InlineResponseDefault fooGet()
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
InlineResponseDefault result = apiInstance.fooGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**InlineResponseDefault**](InlineResponseDefault.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |

View File

@@ -11,6 +11,9 @@ Name | Type | Description | Notes
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]

View File

@@ -4,7 +4,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
@@ -21,13 +22,11 @@ Method | HTTP request | Description
## createXmlItem
## fakeHealthGet
> createXmlItem(xmlItem)
> HealthCheckResult fakeHealthGet()
creates an XmlItem
this route creates an XmlItem
Health check endpoint
### Example
@@ -45,11 +44,74 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
try {
apiInstance.createXmlItem(xmlItem);
HealthCheckResult result = apiInstance.fakeHealthGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#createXmlItem");
System.err.println("Exception when calling FakeApi#fakeHealthGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**HealthCheckResult**](HealthCheckResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | The instance started successfully | - |
## fakeHttpSignatureTest
> fakeHttpSignatureTest(pet, query1, header1)
test http signature authentication
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
String query1 = "query1_example"; // String | query parameter
String header1 = "header1_example"; // String | header parameter
try {
apiInstance.fakeHttpSignatureTest(pet, query1, header1);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -64,7 +126,9 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**query1** | **String**| query parameter | [optional]
**header1** | **String**| header parameter | [optional]
### Return type
@@ -72,17 +136,17 @@ null (empty response body)
### Authorization
No authorization required
[http_signature_test](../README.md#http_signature_test)
### HTTP request headers
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | The instance started successfully | - |
## fakeOuterBooleanSerialize
@@ -141,7 +205,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
### HTTP response details
@@ -152,7 +216,7 @@ No authorization required
## fakeOuterCompositeSerialize
> OuterComposite fakeOuterCompositeSerialize(body)
> OuterComposite fakeOuterCompositeSerialize(outerComposite)
@@ -174,9 +238,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try {
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@@ -194,7 +258,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -206,7 +270,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
### HTTP response details
@@ -271,7 +335,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
### HTTP response details
@@ -336,7 +400,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
### HTTP response details
@@ -347,7 +411,7 @@ No authorization required
## testBodyWithFileSchema
> testBodyWithFileSchema(body)
> testBodyWithFileSchema(fileSchemaTestClass)
@@ -369,9 +433,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
try {
apiInstance.testBodyWithFileSchema(body);
apiInstance.testBodyWithFileSchema(fileSchemaTestClass);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
System.err.println("Status code: " + e.getCode());
@@ -388,7 +452,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@@ -411,7 +475,7 @@ No authorization required
## testBodyWithQueryParams
> testBodyWithQueryParams(query, body)
> testBodyWithQueryParams(query, user)
@@ -432,9 +496,9 @@ public class Example {
FakeApi apiInstance = new FakeApi(defaultClient);
String query = "query_example"; // String |
User body = new User(); // User |
User user = new User(); // User |
try {
apiInstance.testBodyWithQueryParams(query, body);
apiInstance.testBodyWithQueryParams(query, user);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
System.err.println("Status code: " + e.getCode());
@@ -452,7 +516,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**body** | [**User**](User.md)| |
**user** | [**User**](User.md)| |
### Return type
@@ -475,7 +539,7 @@ No authorization required
## testClientModel
> Client testClientModel(body)
> Client testClientModel(client)
To test \&quot;client\&quot; model
@@ -497,9 +561,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClientModel(body);
Client result = apiInstance.testClientModel(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel");
@@ -517,7 +581,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type
@@ -549,6 +613,7 @@ Fake endpoint for testing various parameters
偽のエンドポイント
가짜 엔드 포인트
### Example
```java
@@ -732,6 +797,7 @@ Fake endpoint to test group parameters (optional)
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
@@ -740,6 +806,10 @@ public class Example {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure HTTP bearer authorization: bearer_test
HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test");
bearer_test.setBearerToken("BEARER TOKEN");
FakeApi apiInstance = new FakeApi(defaultClient);
Integer requiredStringGroup = 56; // Integer | Required String in group parameters
Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
@@ -785,7 +855,7 @@ null (empty response body)
### Authorization
No authorization required
[bearer_test](../README.md#bearer_test)
### HTTP request headers
@@ -800,7 +870,7 @@ No authorization required
## testInlineAdditionalProperties
> testInlineAdditionalProperties(param)
> testInlineAdditionalProperties(requestBody)
test inline additionalProperties
@@ -820,9 +890,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Map<String, String> param = new HashMap(); // Map<String, String> | request body
Map<String, String> requestBody = new HashMap(); // Map<String, String> | request body
try {
apiInstance.testInlineAdditionalProperties(param);
apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
System.err.println("Status code: " + e.getCode());
@@ -839,7 +909,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | [**Map&lt;String, String&gt;**](String.md)| request body |
**requestBody** | [**Map&lt;String, String&gt;**](String.md)| request body |
### Return type

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## testClassname
> Client testClassname(body)
> Client testClassname(client)
To test class name in snake case
@@ -39,9 +39,9 @@ public class Example {
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClassname(body);
Client result = apiInstance.testClassname(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
@@ -59,7 +59,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type

View File

@@ -0,0 +1,12 @@
# Foo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]

View File

@@ -19,7 +19,8 @@ Name | Type | Description | Notes
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |
**bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**patternWithDigitsAndDelimiter** | **String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional]

View File

@@ -0,0 +1,13 @@
# HealthCheckResult
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nullableMessage** | **String** | | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Updated name of the pet | [optional]
**status** | **String** | Updated status of the pet | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
**file** | [**File**](File.md) | file to upload | [optional]

View File

@@ -0,0 +1,32 @@
# InlineObject2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumFormStringArray** | [**List&lt;EnumFormStringArrayEnum&gt;**](#List&lt;EnumFormStringArrayEnum&gt;) | Form parameter enum test (string array) | [optional]
**enumFormString** | [**EnumFormStringEnum**](#EnumFormStringEnum) | Form parameter enum test (string) | [optional]
## Enum: List&lt;EnumFormStringArrayEnum&gt;
Name | Value
---- | -----
GREATER_THAN | &quot;&gt;&quot;
DOLLAR | &quot;$&quot;
## Enum: EnumFormStringEnum
Name | Value
---- | -----
_ABC | &quot;_abc&quot;
_EFG | &quot;-efg&quot;
_XYZ_ | &quot;(xyz)&quot;

View File

@@ -0,0 +1,25 @@
# InlineObject3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | None | [optional]
**int32** | **Integer** | None | [optional]
**int64** | **Long** | None | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | None |
**_float** | **Float** | None | [optional]
**_double** | **Double** | None |
**string** | **String** | None | [optional]
**patternWithoutDelimiter** | **String** | None |
**_byte** | **byte[]** | None |
**binary** | [**File**](File.md) | None | [optional]
**date** | [**LocalDate**](LocalDate.md) | None | [optional]
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | None | [optional]
**password** | **String** | None | [optional]
**callback** | **String** | None | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**param** | **String** | field1 |
**param2** | **String** | field2 |

View File

@@ -0,0 +1,13 @@
# InlineObject5
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
**requiredFile** | [**File**](File.md) | file to upload |

View File

@@ -0,0 +1,12 @@
# InlineResponseDefault
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**string** | [**Foo**](Foo.md) | | [optional]

View File

@@ -0,0 +1,23 @@
# NullableClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integerProp** | **Integer** | | [optional]
**numberProp** | [**BigDecimal**](BigDecimal.md) | | [optional]
**booleanProp** | **Boolean** | | [optional]
**stringProp** | **String** | | [optional]
**dateProp** | [**LocalDate**](LocalDate.md) | | [optional]
**datetimeProp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**arrayNullableProp** | **List&lt;Object&gt;** | | [optional]
**arrayAndItemsNullableProp** | **List&lt;Object&gt;** | | [optional]
**arrayItemsNullable** | **List&lt;Object&gt;** | | [optional]
**objectNullableProp** | **Map&lt;String, Object&gt;** | | [optional]
**objectAndItemsNullableProp** | **Map&lt;String, Object&gt;** | | [optional]
**objectItemsNullable** | **Map&lt;String, Object&gt;** | | [optional]

View File

@@ -0,0 +1,15 @@
# OuterEnumDefaultValue
## Enum
* `PLACED` (value: `"placed"`)
* `APPROVED` (value: `"approved"`)
* `DELIVERED` (value: `"delivered"`)

View File

@@ -0,0 +1,15 @@
# OuterEnumInteger
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -0,0 +1,15 @@
# OuterEnumIntegerDefaultValue
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -18,7 +18,7 @@ Method | HTTP request | Description
## addPet
> addPet(body)
> addPet(pet)
Add a new pet to the store
@@ -43,9 +43,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
System.err.println("Status code: " + e.getCode());
@@ -62,7 +62,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -80,7 +80,6 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **405** | Invalid input | - |
@@ -150,7 +149,6 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid pet value | - |
@@ -372,7 +370,7 @@ Name | Type | Description | Notes
## updatePet
> updatePet(body)
> updatePet(pet)
Update an existing pet
@@ -397,9 +395,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.updatePet(body);
apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
System.err.println("Status code: " + e.getCode());
@@ -416,7 +414,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -434,7 +432,6 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Pet not found | - |
| **405** | Validation exception | - |

View File

@@ -213,7 +213,7 @@ No authorization required
## placeOrder
> Order placeOrder(body)
> Order placeOrder(order)
Place an order for a pet
@@ -233,9 +233,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order body = new Order(); // Order | order placed for purchasing the pet
Order order = new Order(); // Order | order placed for purchasing the pet
try {
Order result = apiInstance.placeOrder(body);
Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@@ -253,7 +253,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -265,7 +265,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
### HTTP response details

View File

@@ -17,7 +17,7 @@ Method | HTTP request | Description
## createUser
> createUser(body)
> createUser(user)
Create user
@@ -39,9 +39,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
apiInstance.createUser(body);
apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
System.err.println("Status code: " + e.getCode());
@@ -58,7 +58,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@@ -70,7 +70,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -81,7 +81,7 @@ No authorization required
## createUsersWithArrayInput
> createUsersWithArrayInput(body)
> createUsersWithArrayInput(user)
Creates list of users with given input array
@@ -101,9 +101,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
apiInstance.createUsersWithArrayInput(body);
apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
System.err.println("Status code: " + e.getCode());
@@ -120,7 +120,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -132,7 +132,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -143,7 +143,7 @@ No authorization required
## createUsersWithListInput
> createUsersWithListInput(body)
> createUsersWithListInput(user)
Creates list of users with given input array
@@ -163,9 +163,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
apiInstance.createUsersWithListInput(body);
apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
System.err.println("Status code: " + e.getCode());
@@ -182,7 +182,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -194,7 +194,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -459,7 +459,7 @@ No authorization required
## updateUser
> updateUser(username, body)
> updateUser(username, user)
Updated user
@@ -482,9 +482,9 @@ public class Example {
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object
User user = new User(); // User | Updated user object
try {
apiInstance.updateUser(username, body);
apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
System.err.println("Status code: " + e.getCode());
@@ -502,7 +502,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@@ -514,7 +514,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details

View File

@@ -56,7 +56,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<version>3.0.0-M4</version>
<configuration>
<systemProperties>
<property>
@@ -66,7 +66,7 @@
</systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel>
<forkMode>pertest</forkMode>
<threadCount>10</threadCount>
</configuration>
</plugin>
<plugin>
@@ -135,10 +135,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-J-Xss4m</arg><!-- Compiling the generated JSON.java file may require larger stack size. -->
</compilerArgs>
</configuration>
</plugin>
<plugin>
@@ -272,6 +279,11 @@
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.tomitribe</groupId>
<artifactId>tomitribe-http-signatures</artifactId>
<version>${http-signature-version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
@@ -289,5 +301,6 @@
<jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version>
<threetenbp-version>2.9.10</threetenbp-version>
<junit-version>4.13</junit-version>
<http-signature-version>1.3</http-signature-version>
</properties>
</project>

View File

@@ -1,5 +1,26 @@
package org.openapitools.client;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
@@ -10,69 +31,97 @@ import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import org.glassfish.jersey.logging.LoggingFeature;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Date;
import java.util.TimeZone;
import java.net.URLEncoder;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.text.DateFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.openapitools.client.auth.ApiKeyAuth;
import org.openapitools.client.auth.Authentication;
import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth;
import org.openapitools.client.auth.ApiKeyAuth;
import org.openapitools.client.model.AbstractOpenApiSchema;
import org.openapitools.client.auth.HttpSignatureAuth;
import org.openapitools.client.auth.OAuth;
import org.openapitools.client.model.AbstractOpenApiSchema;
public class ApiClient {
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
protected String basePath = "http://petstore.swagger.io:80/v2";
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
protected List<ServerConfiguration> servers =
new ArrayList<ServerConfiguration>(
Arrays.asList(
new ServerConfiguration(
"http://petstore.swagger.io:80/v2",
"http://{server}.swagger.io:{port}/v2",
"petstore server",
new HashMap<String, ServerVariable>() {
{
put(
"server",
new ServerVariable(
"No description provided",
new HashMap<String, ServerVariable>()
)
));
"petstore",
new HashSet<String>(
Arrays.asList("petstore", "qa-petstore", "dev-petstore"))));
put(
"port",
new ServerVariable(
"No description provided",
"80",
new HashSet<String>(Arrays.asList("80", "8080"))));
}
}),
new ServerConfiguration(
"https://localhost:8080/{version}",
"The local server",
new HashMap<String, ServerVariable>() {
{
put(
"version",
new ServerVariable(
"No description provided",
"v2",
new HashSet<String>(Arrays.asList("v1", "v2"))));
}
})));
protected Integer serverIndex = 0;
protected Map<String, String> serverVariables = null;
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
}};
protected Map<String, List<ServerConfiguration>> operationServers =
new HashMap<String, List<ServerConfiguration>>() {
{
put(
"PetApi.addPet",
new ArrayList<ServerConfiguration>(
Arrays.asList(
new ServerConfiguration(
"http://petstore.swagger.io/v2",
"No description provided",
new HashMap<String, ServerVariable>()),
new ServerConfiguration(
"http://path-server-test.petstore.local/v2",
"No description provided",
new HashMap<String, ServerVariable>()))));
put(
"PetApi.updatePet",
new ArrayList<ServerConfiguration>(
Arrays.asList(
new ServerConfiguration(
"http://petstore.swagger.io/v2",
"No description provided",
new HashMap<String, ServerVariable>()),
new ServerConfiguration(
"http://path-server-test.petstore.local/v2",
"No description provided",
new HashMap<String, ServerVariable>()))));
}
};
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
protected Map<String, Map<String, String>> operationServerVariables =
new HashMap<String, Map<String, String>>();
protected boolean debugging = false;
protected int connectionTimeout = 0;
private int readTimeout = 0;
@@ -99,7 +148,10 @@ public class ApiClient {
authentications = new HashMap<String, Authentication>();
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
authentications.put("bearer_test", new HttpBearerAuth("bearer"));
authentications.put("http_basic_test", new HttpBasicAuth());
authentications.put(
"http_signature_test", new HttpSignatureAuth("http_signature_test", null, null));
authentications.put("petstore_auth", new OAuth());
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
@@ -110,6 +162,7 @@ public class ApiClient {
/**
* Gets the JSON instance to do JSON serialization and deserialization.
*
* @return JSON
*/
public JSON getJSON() {
@@ -163,6 +216,7 @@ public class ApiClient {
/**
* Get authentications (key: authentication name, value: authentication).
*
* @return Map of authentication object
*/
public Map<String, Authentication> getAuthentications() {
@@ -181,6 +235,7 @@ public class ApiClient {
/**
* Helper method to set username for the first HTTP basic authentication.
*
* @param username Username
*/
public void setUsername(String username) {
@@ -195,6 +250,7 @@ public class ApiClient {
/**
* Helper method to set password for the first HTTP basic authentication.
*
* @param password Password
*/
public void setPassword(String password) {
@@ -209,6 +265,7 @@ public class ApiClient {
/**
* Helper method to set API key value for the first API key authentication.
*
* @param apiKey API key
*/
public void setApiKey(String apiKey) {
@@ -242,6 +299,7 @@ public class ApiClient {
/**
* Helper method to set API key prefix for the first API key authentication.
*
* @param apiKeyPrefix API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
@@ -256,6 +314,7 @@ public class ApiClient {
/**
* Helper method to set bearer token for the first Bearer authentication.
*
* @param bearerToken Bearer token
*/
public void setBearerToken(String bearerToken) {
@@ -270,6 +329,7 @@ public class ApiClient {
/**
* Helper method to set access token for the first OAuth2 authentication.
*
* @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
@@ -284,6 +344,7 @@ public class ApiClient {
/**
* Set the User-Agent header's value (by adding to the default header map).
*
* @param userAgent Http user agent
* @return API client
*/
@@ -318,6 +379,7 @@ public class ApiClient {
/**
* Check that whether debugging is enabled for this API client.
*
* @return True if debugging is switched on
*/
public boolean isDebugging() {
@@ -338,9 +400,8 @@ public class ApiClient {
}
/**
* The path of temporary folder used to store downloaded files from endpoints
* with file response. The default value is <code>null</code>, i.e. using
* the system's default tempopary folder.
* The path of temporary folder used to store downloaded files from endpoints with file response.
* The default value is <code>null</code>, i.e. using the system's default tempopary folder.
*
* @return Temp folder path
*/
@@ -350,6 +411,7 @@ public class ApiClient {
/**
* Set temp folder path
*
* @param tempFolderPath Temp folder path
* @return API client
*/
@@ -360,6 +422,7 @@ public class ApiClient {
/**
* Connect timeout (in milliseconds).
*
* @return Connection timeout
*/
public int getConnectTimeout() {
@@ -367,9 +430,9 @@ public class ApiClient {
}
/**
* Set the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
* Set the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values must
* be between 1 and {@link Integer#MAX_VALUE}.
*
* @param connectionTimeout Connection timeout in milliseconds
* @return API client
*/
@@ -381,6 +444,7 @@ public class ApiClient {
/**
* read timeout (in milliseconds).
*
* @return Read timeout
*/
public int getReadTimeout() {
@@ -388,9 +452,9 @@ public class ApiClient {
}
/**
* Set the read timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
* {@link Integer#MAX_VALUE}.
* Set the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be
* between 1 and {@link Integer#MAX_VALUE}.
*
* @param readTimeout Read timeout in milliseconds
* @return API client
*/
@@ -402,6 +466,7 @@ public class ApiClient {
/**
* Get the date format used to parse/format date parameters.
*
* @return Date format
*/
public DateFormat getDateFormat() {
@@ -410,6 +475,7 @@ public class ApiClient {
/**
* Set the date format used to parse/format date parameters.
*
* @param dateFormat Date format
* @return API client
*/
@@ -422,6 +488,7 @@ public class ApiClient {
/**
* Parse the given string into Date object.
*
* @param str String
* @return Date
*/
@@ -435,6 +502,7 @@ public class ApiClient {
/**
* Format the given Date object into string.
*
* @param date Date
* @return Date in string format
*/
@@ -444,6 +512,7 @@ public class ApiClient {
/**
* Format the given parameter object into string.
*
* @param param Object
* @return Object in string format
*/
@@ -492,7 +561,8 @@ public class ApiClient {
}
// get the collection format (default: csv)
String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
String format =
(collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format
if ("multi".equals(format)) {
@@ -527,13 +597,9 @@ public class ApiClient {
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* "* / *" is also default to JSON
* Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json;
* charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also default to JSON
*
* @param mime MIME
* @return True if the MIME type is JSON
*/
@@ -543,13 +609,12 @@ public class ApiClient {
}
/**
* Select the Accept header's value from the given accepts array:
* if JSON exists in the given array, use it;
* otherwise use all of them (joining into a string)
* Select the Accept header's value from the given accepts array: if JSON exists in the given
* array, use it; otherwise use all of them (joining into a string)
*
* @param accepts The accepts array to select from
* @return The Accept header to use. If the given array is empty,
* null will be returned (not to set the Accept header explicitly).
* @return The Accept header to use. If the given array is empty, null will be returned (not to
* set the Accept header explicitly).
*/
public String selectHeaderAccept(String[] accepts) {
if (accepts.length == 0) {
@@ -564,13 +629,11 @@ public class ApiClient {
}
/**
* Select the Content-Type header's value from the given array:
* if JSON exists in the given array, use it;
* otherwise use the first one of the array.
* Select the Content-Type header's value from the given array: if JSON exists in the given array,
* use it; otherwise use the first one of the array.
*
* @param contentTypes The Content-Type array to select from
* @return The Content-Type header to use. If the given array is empty,
* JSON will be used.
* @return The Content-Type header to use. If the given array is empty, JSON will be used.
*/
public String selectHeaderContentType(String[] contentTypes) {
if (contentTypes.length == 0) {
@@ -586,6 +649,7 @@ public class ApiClient {
/**
* Escape the given string to be used as URL query value.
*
* @param str String
* @return Escaped string
*/
@@ -598,27 +662,35 @@ public class ApiClient {
}
/**
* Serialize the given Java object into string entity according the given
* Content-Type (only JSON is supported for now).
* Serialize the given Java object into string entity according the given Content-Type (only JSON
* is supported for now).
*
* @param obj Object
* @param formParams Form parameters
* @param contentType Context type
* @return Entity
* @throws ApiException API exception
*/
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType)
throws ApiException {
Entity<?> entity;
if (contentType.startsWith("multipart/form-data")) {
MultiPart multiPart = new MultiPart();
for (Entry<String, Object> param : formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey())
.fileName(file.getName()).size(file.length()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
FormDataContentDisposition contentDisp =
FormDataContentDisposition.name(param.getKey())
.fileName(file.getName())
.size(file.length())
.build();
multiPart.bodyPart(
new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
} else {
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));
FormDataContentDisposition contentDisp =
FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(
new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));
}
}
entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE);
@@ -635,7 +707,47 @@ public class ApiClient {
return entity;
}
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{
/**
* Serialize the given Java object into string according the given Content-Type (only JSON, HTTP
* form is supported for now).
*
* @param obj Object
* @param formParams Form parameters
* @param contentType Context type
* @return String
* @throws ApiException API exception
*/
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType)
throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException(
"multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString =
param.getKey()
+ "="
+ URLEncoder.encode(parameterToString(param.getValue()), "UTF-8")
+ "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
return json.getMapper().writeValueAsString(obj);
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema)
throws ApiException {
Object result = null;
int matchCounter = 0;
@@ -657,35 +769,44 @@ public class ApiClient {
} else if ("oneOf".equals(schema.getSchemaType())) {
matchSchemas.add(schemaName);
} else {
throw new ApiException("Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType());
throw new ApiException(
"Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType());
}
} else {
// failed to deserialize the response in the schema provided, proceed to the next one if any
// failed to deserialize the response in the schema provided, proceed to the next one if
// any
}
} catch (Exception ex) {
// failed to deserialize, do nothing and try next one (schema)
}
} else { // unknown type
throw new ApiException(schemaType.getClass() + " is not a GenericType and cannot be handled properly in deserialization.");
throw new ApiException(
schemaType.getClass()
+ " is not a GenericType and cannot be handled properly in deserialization.");
}
}
if (matchCounter > 1 && "oneOf".equals(schema.getSchemaType())) { // more than 1 match for oneOf
throw new ApiException("Response body is invalid as it matches more than one schema (" + String.join(", ", matchSchemas) + ") defined in the oneOf model: " + schema.getClass().getName());
throw new ApiException(
"Response body is invalid as it matches more than one schema ("
+ String.join(", ", matchSchemas)
+ ") defined in the oneOf model: "
+ schema.getClass().getName());
} else if (matchCounter == 0) { // fail to match any in oneOf/anyOf schemas
throw new ApiException("Response body is invalid as it doens't match any schemas (" + String.join(", ", schema.getSchemas().keySet()) + ") defined in the oneOf/anyOf model: " + schema.getClass().getName());
throw new ApiException(
"Response body is invalid as it doens't match any schemas ("
+ String.join(", ", schema.getSchemas().keySet())
+ ") defined in the oneOf/anyOf model: "
+ schema.getClass().getName());
} else { // only one matched
schema.setActualInstance(result);
return schema;
}
}
/**
* Deserialize response body to Java object according to the Content-Type.
*
* @param <T> Type
* @param response Response
* @param returnType Return type
@@ -720,6 +841,7 @@ public class ApiClient {
/**
* Download file from the given response.
*
* @param response Response
* @return File
* @throws ApiException If fail to read file content from response and write to disk
@@ -727,7 +849,10 @@ public class ApiClient {
public File downloadFileFromResponse(Response response) throws ApiException {
try {
File file = prepareDownloadFile(response);
Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
Files.copy(
response.readEntity(InputStream.class),
file.toPath(),
StandardCopyOption.REPLACE_EXISTING);
return file;
} catch (IOException e) {
throw new ApiException(e);
@@ -741,8 +866,7 @@ public class ApiClient {
// Get filename from the Content-Disposition header.
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
Matcher matcher = pattern.matcher(contentDisposition);
if (matcher.find())
filename = matcher.group(1);
if (matcher.find()) filename = matcher.group(1);
}
String prefix;
@@ -759,14 +883,11 @@ public class ApiClient {
suffix = filename.substring(pos);
}
// File.createTempFile requires the prefix to be at least three characters long
if (prefix.length() < 3)
prefix = "download-";
if (prefix.length() < 3) prefix = "download-";
}
if (tempFolderPath == null)
return File.createTempFile(prefix, suffix);
else
return File.createTempFile(prefix, suffix, new File(tempFolderPath));
if (tempFolderPath == null) return File.createTempFile(prefix, suffix);
else return File.createTempFile(prefix, suffix, new File(tempFolderPath));
}
/**
@@ -789,8 +910,21 @@ public class ApiClient {
* @return The response body in type of string
* @throws ApiException API exception
*/
public <T> ApiResponse<T> invokeAPI(String operation, String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
public <T> ApiResponse<T> invokeAPI(
String operation,
String path,
String method,
List<Pair> queryParams,
Object body,
Map<String, String> headerParams,
Map<String, String> cookieParams,
Map<String, Object> formParams,
String accept,
String contentType,
String[] authNames,
GenericType<T> returnType,
AbstractOpenApiSchema schema)
throws ApiException {
// Not using `.target(targetURL).path(path)` below,
// to support (constant) query string in `path`, e.g. "/posts?draft=1"
@@ -810,9 +944,10 @@ public class ApiClient {
serverConfigurations = servers;
}
if (index < 0 || index >= serverConfigurations.size()) {
throw new ArrayIndexOutOfBoundsException(String.format(
"Invalid index %d when selecting the host settings. Must be less than %d", index, serverConfigurations.size()
));
throw new ArrayIndexOutOfBoundsException(
String.format(
"Invalid index %d when selecting the host settings. Must be less than %d",
index, serverConfigurations.size()));
}
targetURL = serverConfigurations.get(index).URL(variables) + path;
} else {
@@ -863,6 +998,21 @@ public class ApiClient {
Entity<?> entity = serialize(body, formParams, contentType);
// put all headers in one place
Map<String, String> allHeaderParams = new HashMap<>();
allHeaderParams.putAll(defaultHeaderMap);
allHeaderParams.putAll(headerParams);
// update different parameters (e.g. headers) for authentication
updateParamsForAuth(
authNames,
queryParams,
allHeaderParams,
cookieParams,
serializeToString(body, formParams, contentType),
method,
target.getUri());
Response response = null;
try {
@@ -892,13 +1042,12 @@ public class ApiClient {
if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) {
return new ApiResponse<>(statusCode, responseHeaders);
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
if (returnType == null)
return new ApiResponse<>(statusCode, responseHeaders);
else
if (schema == null) {
if (returnType == null) return new ApiResponse<>(statusCode, responseHeaders);
else if (schema == null) {
return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType));
} else { // oneOf/anyOf
return new ApiResponse<>(statusCode, responseHeaders, (T)deserializeSchemas(response, schema));
return new ApiResponse<>(
statusCode, responseHeaders, (T) deserializeSchemas(response, schema));
}
} else {
String message = "error";
@@ -912,30 +1061,53 @@ public class ApiClient {
}
}
throw new ApiException(
response.getStatus(),
message,
buildResponseHeaders(response),
respBody);
response.getStatus(), message, buildResponseHeaders(response), respBody);
}
} finally {
try {
response.close();
} catch (Exception e) {
// it's not critical, since the response object is local in method invokeAPI; that's fine, just continue
// it's not critical, since the response object is local in method invokeAPI; that's fine,
// just continue
}
}
}
/**
* @deprecated Add qualified name of the operation as a first parameter.
*/
/** @deprecated Add qualified name of the operation as a first parameter. */
@Deprecated
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException {
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, schema);
public <T> ApiResponse<T> invokeAPI(
String path,
String method,
List<Pair> queryParams,
Object body,
Map<String, String> headerParams,
Map<String, String> cookieParams,
Map<String, Object> formParams,
String accept,
String contentType,
String[] authNames,
GenericType<T> returnType,
AbstractOpenApiSchema schema)
throws ApiException {
return invokeAPI(
null,
path,
method,
queryParams,
body,
headerParams,
cookieParams,
formParams,
accept,
contentType,
authNames,
returnType,
schema);
}
/**
* Build the Client used to make HTTP requests.
*
* @param debugging Debug setting
* @return Client
*/
@@ -948,13 +1120,21 @@ public class ApiClient {
// turn off compliance validation to be able to send payloads with DELETE calls
clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
if (debugging) {
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */));
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
clientConfig.register(
new LoggingFeature(
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME),
java.util.logging.Level.INFO,
LoggingFeature.Verbosity.PAYLOAD_ANY,
1024 * 50 /* Log payloads up to 50K */));
clientConfig.property(
LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
// Set logger to ALL
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL);
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME)
.setLevel(java.util.logging.Level.ALL);
} else {
// suppress warnings for payloads with DELETE calls:
java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE);
java.util.logging.Logger.getLogger("org.glassfish.jersey.client")
.setLevel(java.util.logging.Level.SEVERE);
}
performAdditionalClientConfiguration(clientConfig);
return ClientBuilder.newClient(clientConfig);
@@ -984,12 +1164,24 @@ public class ApiClient {
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
* @param method HTTP method (e.g. POST)
* @param uri HTTP URI
*/
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
protected void updateParamsForAuth(
String[] authNames,
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
auth.applyToParams(queryParams, headerParams, cookieParams);
if (auth == null) {
throw new RuntimeException("Authentication undefined: " + authName);
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
}

View File

@@ -10,12 +10,10 @@
* Do not edit the class manually.
*/
package org.openapitools.client;
import java.util.Map;
import java.util.List;
import java.util.Map;
public class ApiException extends Exception {
private int code = 0;
@@ -32,18 +30,25 @@ public class ApiException extends Exception {
super(message);
}
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) {
public ApiException(
String message,
Throwable throwable,
int code,
Map<String, List<String>> responseHeaders,
String responseBody) {
super(message, throwable);
this.code = code;
this.responseHeaders = responseHeaders;
this.responseBody = responseBody;
}
public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) {
public ApiException(
String message, int code, Map<String, List<String>> responseHeaders, String responseBody) {
this(message, (Throwable) null, code, responseHeaders, responseBody);
}
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) {
public ApiException(
String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) {
this(message, throwable, code, responseHeaders, null);
}
@@ -56,7 +61,8 @@ public class ApiException extends Exception {
this.code = code;
}
public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
public ApiException(
int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
this(code, message);
this.responseHeaders = responseHeaders;
this.responseBody = responseBody;

View File

@@ -10,7 +10,6 @@
* Do not edit the class manually.
*/
package org.openapitools.client;
import java.util.List;

View File

@@ -10,16 +10,14 @@
* Do not edit the class manually.
*/
package org.openapitools.client;
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();
/**
* Get the default API client, which would be used when creating API
* instances without providing an API client.
* Get the default API client, which would be used when creating API instances without providing
* an API client.
*
* @return Default API client
*/
@@ -28,8 +26,8 @@ public class Configuration {
}
/**
* Set the default API client, which would be used when creating API
* instances without providing an API client.
* Set the default API client, which would be used when creating API instances without providing
* an API client.
*
* @param apiClient API client
*/

View File

@@ -9,6 +9,8 @@ import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils;
import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase;
import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction;
import com.fasterxml.jackson.datatype.threetenbp.function.Function;
import java.io.IOException;
import java.math.BigDecimal;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.DateTimeUtils;
import org.threeten.bp.Instant;
@@ -19,12 +21,10 @@ import org.threeten.bp.format.DateTimeFormatter;
import org.threeten.bp.temporal.Temporal;
import org.threeten.bp.temporal.TemporalAccessor;
import java.io.IOException;
import java.math.BigDecimal;
/**
* Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s.
* Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format.
* Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link
* ZonedDateTime}s. Adapted from the jackson threetenbp InstantDeserializer to add support for
* deserializing rfc822 format.
*
* @author Nick Williams
*/
@@ -32,8 +32,10 @@ public class CustomInstantDeserializer<T extends Temporal>
extends ThreeTenDateTimeDeserializerBase<T> {
private static final long serialVersionUID = 1L;
public static final CustomInstantDeserializer<Instant> INSTANT = new CustomInstantDeserializer<Instant>(
Instant.class, DateTimeFormatter.ISO_INSTANT,
public static final CustomInstantDeserializer<Instant> INSTANT =
new CustomInstantDeserializer<Instant>(
Instant.class,
DateTimeFormatter.ISO_INSTANT,
new Function<TemporalAccessor, Instant>() {
@Override
public Instant apply(TemporalAccessor temporalAccessor) {
@@ -52,11 +54,12 @@ public class CustomInstantDeserializer<T extends Temporal>
return Instant.ofEpochSecond(a.integer, a.fraction);
}
},
null
);
null);
public static final CustomInstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME = new CustomInstantDeserializer<OffsetDateTime>(
OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
public static final CustomInstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME =
new CustomInstantDeserializer<OffsetDateTime>(
OffsetDateTime.class,
DateTimeFormatter.ISO_OFFSET_DATE_TIME,
new Function<TemporalAccessor, OffsetDateTime>() {
@Override
public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
@@ -72,7 +75,8 @@ public class CustomInstantDeserializer<T extends Temporal>
new Function<FromDecimalArguments, OffsetDateTime>() {
@Override
public OffsetDateTime apply(FromDecimalArguments a) {
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
return OffsetDateTime.ofInstant(
Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
}
},
new BiFunction<OffsetDateTime, ZoneId, OffsetDateTime>() {
@@ -80,11 +84,12 @@ public class CustomInstantDeserializer<T extends Temporal>
public OffsetDateTime apply(OffsetDateTime d, ZoneId z) {
return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime()));
}
}
);
});
public static final CustomInstantDeserializer<ZonedDateTime> ZONED_DATE_TIME = new CustomInstantDeserializer<ZonedDateTime>(
ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
public static final CustomInstantDeserializer<ZonedDateTime> ZONED_DATE_TIME =
new CustomInstantDeserializer<ZonedDateTime>(
ZonedDateTime.class,
DateTimeFormatter.ISO_ZONED_DATE_TIME,
new Function<TemporalAccessor, ZonedDateTime>() {
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
@@ -100,7 +105,8 @@ public class CustomInstantDeserializer<T extends Temporal>
new Function<FromDecimalArguments, ZonedDateTime>() {
@Override
public ZonedDateTime apply(FromDecimalArguments a) {
return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
return ZonedDateTime.ofInstant(
Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
}
},
new BiFunction<ZonedDateTime, ZoneId, ZonedDateTime>() {
@@ -108,8 +114,7 @@ public class CustomInstantDeserializer<T extends Temporal>
public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) {
return zonedDateTime.withZoneSameInstant(zoneId);
}
}
);
});
protected final Function<FromIntegerArguments, T> fromMilliseconds;
@@ -119,7 +124,8 @@ public class CustomInstantDeserializer<T extends Temporal>
protected final BiFunction<T, ZoneId, T> adjust;
protected CustomInstantDeserializer(Class<T> supportedType,
protected CustomInstantDeserializer(
Class<T> supportedType,
DateTimeFormatter parser,
Function<TemporalAccessor, T> parsedToValue,
Function<FromIntegerArguments, T> fromMilliseconds,
@@ -129,12 +135,15 @@ public class CustomInstantDeserializer<T extends Temporal>
this.parsedToValue = parsedToValue;
this.fromMilliseconds = fromMilliseconds;
this.fromNanoseconds = fromNanoseconds;
this.adjust = adjust == null ? new BiFunction<T, ZoneId, T>() {
this.adjust =
adjust == null
? new BiFunction<T, ZoneId, T>() {
@Override
public T apply(T t, ZoneId zoneId) {
return t;
}
} : adjust;
}
: adjust;
}
@SuppressWarnings("unchecked")
@@ -159,27 +168,28 @@ public class CustomInstantDeserializer<T extends Temporal>
// NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only
// string values have to be adjusted to the configured TZ.
switch (parser.getCurrentTokenId()) {
case JsonTokenId.ID_NUMBER_FLOAT: {
case JsonTokenId.ID_NUMBER_FLOAT:
{
BigDecimal value = parser.getDecimalValue();
long seconds = value.longValue();
int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
return fromNanoseconds.apply(new FromDecimalArguments(
seconds, nanoseconds, getZone(context)));
return fromNanoseconds.apply(
new FromDecimalArguments(seconds, nanoseconds, getZone(context)));
}
case JsonTokenId.ID_NUMBER_INT: {
case JsonTokenId.ID_NUMBER_INT:
{
long timestamp = parser.getLongValue();
if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) {
return this.fromNanoseconds.apply(new FromDecimalArguments(
timestamp, 0, this.getZone(context)
));
return this.fromNanoseconds.apply(
new FromDecimalArguments(timestamp, 0, this.getZone(context)));
}
return this.fromMilliseconds.apply(new FromIntegerArguments(
timestamp, this.getZone(context)
));
return this.fromMilliseconds.apply(
new FromIntegerArguments(timestamp, this.getZone(context)));
}
case JsonTokenId.ID_STRING: {
case JsonTokenId.ID_STRING:
{
String string = parser.getText().trim();
if (string.length() == 0) {
return null;

View File

@@ -1,15 +1,12 @@
package org.openapitools.client;
import org.threeten.bp.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.*;
import org.openapitools.jackson.nullable.JsonNullableModule;
import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
import java.text.DateFormat;
import javax.ws.rs.ext.ContextResolver;
import org.openapitools.jackson.nullable.JsonNullableModule;
import org.threeten.bp.*;
public class JSON implements ContextResolver<ObjectMapper> {
private ObjectMapper mapper;
@@ -34,6 +31,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
/**
* Set the date format for JSON (de)serialization with Date properties.
*
* @param dateFormat Date format
*/
public void setDateFormat(DateFormat dateFormat) {
@@ -44,4 +42,8 @@ public class JSON implements ContextResolver<ObjectMapper> {
public ObjectMapper getContext(Class<?> type) {
return mapper;
}
public ObjectMapper getMapper() {
return mapper;
}
}

View File

@@ -10,10 +10,8 @@
* Do not edit the class manually.
*/
package org.openapitools.client;
public class Pair {
private String name = "";
private String value = "";

View File

@@ -14,11 +14,9 @@ package org.openapitools.client;
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
import com.fasterxml.jackson.databind.util.ISO8601Utils;
import java.text.FieldPosition;
import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
// Same as ISO8601DateFormat but serializing milliseconds.
@@ -28,5 +26,4 @@ public class RFC3339DateFormat extends ISO8601DateFormat {
toAppendTo.append(value);
return toAppendTo;
}
}

View File

@@ -2,9 +2,7 @@ package org.openapitools.client;
import java.util.Map;
/**
* Representing a Server configuration.
*/
/** Representing a Server configuration. */
public class ServerConfiguration {
public String URL;
public String description;
@@ -13,9 +11,11 @@ public class ServerConfiguration {
/**
* @param URL A URL to the target host.
* @param description A describtion of the host designated by the URL.
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
* @param variables A map between a variable name and its value. The value is used for
* substitution in the server's URL template.
*/
public ServerConfiguration(String URL, String description, Map<String, ServerVariable> variables) {
public ServerConfiguration(
String URL, String description, Map<String, ServerVariable> variables) {
this.URL = URL;
this.description = description;
this.variables = variables;
@@ -39,7 +39,8 @@ public class ServerConfiguration {
if (variables != null && variables.containsKey(name)) {
value = variables.get(name);
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
throw new RuntimeException(
"The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);

View File

@@ -2,9 +2,7 @@ package org.openapitools.client;
import java.util.HashSet;
/**
* Representing a Server Variable for server URL template substitution.
*/
/** Representing a Server Variable for server URL template substitution. */
public class ServerVariable {
public String description;
public String defaultValue;
@@ -13,7 +11,8 @@ public class ServerVariable {
/**
* @param description A description for the server variable.
* @param defaultValue The default value to use for substitution.
* @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
* @param enumValues An enumeration of string values to be used if the substitution options are
* from a limited set.
*/
public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) {
this.description = description;

View File

@@ -10,10 +10,8 @@
* Do not edit the class manually.
*/
package org.openapitools.client;
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
@@ -36,10 +34,9 @@ public class StringUtil {
/**
* Join an array of strings with the given separator.
* <p>
* Note: This might be replaced by utility method from commons-lang or guava someday
* if one of those libraries is added as dependency.
* </p>
*
* <p>Note: This might be replaced by utility method from commons-lang or guava someday if one of
* those libraries is added as dependency.
*
* @param array The array of strings
* @param separator The separator

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.model.Client;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.Client;
public class AnotherFakeApi {
private ApiClient apiClient;
@@ -35,39 +31,40 @@ public class AnotherFakeApi {
this.apiClient = apiClient;
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param body client model (required)
* To test special tags To test special tags and operation ID starting with number
*
* @param client client model (required)
* @return Client
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public Client call123testSpecialTags(Client body) throws ApiException {
return call123testSpecialTagsWithHttpInfo(body).getData();
public Client call123testSpecialTags(Client client) throws ApiException {
return call123testSpecialTagsWithHttpInfo(client).getData();
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param body client model (required)
* To test special tags To test special tags and operation ID starting with number
*
* @param client client model (required)
* @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = client;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(
400, "Missing the required parameter 'client' when calling call123testSpecialTags");
}
// create path and map variables
@@ -79,26 +76,29 @@ public class AnotherFakeApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"AnotherFakeApi.call123testSpecialTags",
localVarPath,
"PATCH",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
}

View File

@@ -0,0 +1,94 @@
package org.openapitools.client.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.InlineResponseDefault;
public class DefaultApi {
private ApiClient apiClient;
public DefaultApi() {
this(Configuration.getDefaultApiClient());
}
public DefaultApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* @return InlineResponseDefault
* @throws ApiException if fails to make API call
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> response </td><td> - </td></tr>
* </table>
*/
public InlineResponseDefault fooGet() throws ApiException {
return fooGetWithHttpInfo().getData();
}
/**
* @return ApiResponse&lt;InlineResponseDefault&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> response </td><td> - </td></tr>
* </table>
*/
public ApiResponse<InlineResponseDefault> fooGetWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/foo";
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType<InlineResponseDefault> localVarReturnType =
new GenericType<InlineResponseDefault>() {};
return apiClient.invokeAPI(
"DefaultApi.fooGet",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
}

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.model.Client;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.Client;
public class FakeClassnameTags123Api {
private ApiClient apiClient;
@@ -35,39 +31,40 @@ public class FakeClassnameTags123Api {
this.apiClient = apiClient;
}
/**
* To test class name in snake case
* To test class name in snake case
* @param body client model (required)
* To test class name in snake case To test class name in snake case
*
* @param client client model (required)
* @return Client
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public Client testClassname(Client body) throws ApiException {
return testClassnameWithHttpInfo(body).getData();
public Client testClassname(Client client) throws ApiException {
return testClassnameWithHttpInfo(client).getData();
}
/**
* To test class name in snake case
* To test class name in snake case
* @param body client model (required)
* To test class name in snake case To test class name in snake case
*
* @param client client model (required)
* @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Client> testClassnameWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = client;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(
400, "Missing the required parameter 'client' when calling testClassname");
}
// create path and map variables
@@ -79,26 +76,29 @@ public class FakeClassnameTags123Api {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"api_key_query"};
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"FakeClassnameTags123Api.testClassname",
localVarPath,
"PATCH",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
}

View File

@@ -1,22 +1,18 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
import java.io.File;
import org.openapitools.client.model.ModelApiResponse;
import org.openapitools.client.model.Pet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.ModelApiResponse;
import org.openapitools.client.model.Pet;
public class PetApi {
private ApiClient apiClient;
@@ -39,38 +35,36 @@ public class PetApi {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (required)
* @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
* </table>
*/
public void addPet(Pet body) throws ApiException {
addPetWithHttpInfo(body);
public void addPet(Pet pet) throws ApiException {
addPetWithHttpInfo(pet);
}
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (required)
* @param pet Pet object that needs to be added to the store (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Void> addPetWithHttpInfo(Pet pet) throws ApiException {
Object localVarPostBody = pet;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
// verify the required parameter 'pet' is set
if (pet == null) {
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
}
// create path and map variables
@@ -82,25 +76,29 @@ public class PetApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String[] localVarContentTypes = {"application/json", "application/xml"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"PetApi.addPet",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Deletes a pet
@@ -109,11 +107,10 @@ public class PetApi {
* @param apiKey (optional)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid pet value </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid pet value </td><td> - </td></tr>
* </table>
*/
public void deletePet(Long petId, String apiKey) throws ApiException {
deletePetWithHttpInfo(petId, apiKey);
@@ -127,11 +124,10 @@ public class PetApi {
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid pet value </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid pet value </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
Object localVarPostBody = null;
@@ -142,7 +138,8 @@ public class PetApi {
}
// create path and map variables
String localVarPath = "/pet/{petId}"
String localVarPath =
"/pet/{petId}"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
@@ -151,64 +148,71 @@ public class PetApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"PetApi.deletePet",
localVarPath,
"DELETE",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* Finds Pets by status Multiple status values can be provided with comma separated strings
*
* @param status Status values that need to be considered for filter (required)
* @return List&lt;Pet&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid status value </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid status value </td><td> - </td></tr>
* </table>
*/
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
return findPetsByStatusWithHttpInfo(status).getData();
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* Finds Pets by status Multiple status values can be provided with comma separated strings
*
* @param status Status values that need to be considered for filter (required)
* @return ApiResponse&lt;List&lt;Pet&gt;&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid status value </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid status value </td><td> - </td></tr>
* </table>
*/
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status)
throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'status' is set
if (status == null) {
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
throw new ApiException(
400, "Missing the required parameter 'status' when calling findPetsByStatus");
}
// create path and map variables
@@ -222,39 +226,46 @@ public class PetApi {
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"PetApi.findPetsByStatus",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2,
* tag3 for testing.
*
* @param tags Tags to filter by (required)
* @return List&lt;Pet&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid tag value </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid tag value </td><td> - </td></tr>
* </table>
*
* @deprecated
*/
@Deprecated
@@ -263,17 +274,19 @@ public class PetApi {
}
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2,
* tag3 for testing.
*
* @param tags Tags to filter by (required)
* @return ApiResponse&lt;List&lt;Pet&gt;&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid tag value </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid tag value </td><td> - </td></tr>
* </table>
*
* @deprecated
*/
@Deprecated
@@ -282,7 +295,8 @@ public class PetApi {
// verify the required parameter 'tags' is set
if (tags == null) {
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
throw new ApiException(
400, "Missing the required parameter 'tags' when calling findPetsByTags");
}
// create path and map variables
@@ -296,58 +310,63 @@ public class PetApi {
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"PetApi.findPetsByTags",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Find pet by ID
* Returns a single pet
* Find pet by ID Returns a single pet
*
* @param petId ID of pet to return (required)
* @return Pet
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
* </table>
*/
public Pet getPetById(Long petId) throws ApiException {
return getPetByIdWithHttpInfo(petId).getData();
}
/**
* Find pet by ID
* Returns a single pet
* Find pet by ID Returns a single pet
*
* @param petId ID of pet to return (required)
* @return ApiResponse&lt;Pet&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
Object localVarPostBody = null;
@@ -358,7 +377,8 @@ public class PetApi {
}
// create path and map variables
String localVarPath = "/pet/{petId}"
String localVarPath =
"/pet/{petId}"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
@@ -367,67 +387,69 @@ public class PetApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"api_key"};
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"PetApi.getPetById",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
* @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
* <tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
* </table>
*/
public void updatePet(Pet body) throws ApiException {
updatePetWithHttpInfo(body);
public void updatePet(Pet pet) throws ApiException {
updatePetWithHttpInfo(pet);
}
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
* @param pet Pet object that needs to be added to the store (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
* <tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Void> updatePetWithHttpInfo(Pet pet) throws ApiException {
Object localVarPostBody = pet;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
// verify the required parameter 'pet' is set
if (pet == null) {
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
}
// create path and map variables
@@ -439,25 +461,29 @@ public class PetApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String[] localVarContentTypes = {"application/json", "application/xml"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"PetApi.updatePet",
localVarPath,
"PUT",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Updates a pet in the store with form data
@@ -467,10 +493,10 @@ public class PetApi {
* @param status Updated status of the pet (optional)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
* </table>
*/
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
updatePetWithFormWithHttpInfo(petId, name, status);
@@ -485,21 +511,24 @@ public class PetApi {
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status)
throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
throw new ApiException(
400, "Missing the required parameter 'petId' when calling updatePetWithForm");
}
// create path and map variables
String localVarPath = "/pet/{petId}"
String localVarPath =
"/pet/{petId}"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
@@ -508,29 +537,32 @@ public class PetApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (name != null) localVarFormParams.put("name", name);
if (status != null) localVarFormParams.put("status", status);
final String[] localVarAccepts = {};
if (name != null)
localVarFormParams.put("name", name);
if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/x-www-form-urlencoded"
};
final String[] localVarContentTypes = {"application/x-www-form-urlencoded"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"PetApi.updatePetWithForm",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* uploads an image
@@ -541,12 +573,13 @@ if (status != null)
* @return ModelApiResponse
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file)
throws ApiException {
return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData();
}
@@ -559,12 +592,13 @@ if (status != null)
* @return ApiResponse&lt;ModelApiResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(
Long petId, String additionalMetadata, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
@@ -573,7 +607,8 @@ if (status != null)
}
// create path and map variables
String localVarPath = "/pet/{petId}/uploadImage"
String localVarPath =
"/pet/{petId}/uploadImage"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
@@ -582,31 +617,34 @@ if (status != null)
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null)
localVarFormParams.put("file", file);
if (file != null) localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json"
};
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String[] localVarContentTypes = {"multipart/form-data"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"PetApi.uploadFile",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* uploads an image (required)
@@ -617,13 +655,15 @@ if (file != null)
* @return ModelApiResponse
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData();
public ModelApiResponse uploadFileWithRequiredFile(
Long petId, File requiredFile, String additionalMetadata) throws ApiException {
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata)
.getData();
}
/**
@@ -635,26 +675,31 @@ if (file != null)
* @return ApiResponse&lt;ModelApiResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(
Long petId, File requiredFile, String additionalMetadata) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
throw new ApiException(
400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
}
// verify the required parameter 'requiredFile' is set
if (requiredFile == null) {
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
throw new ApiException(
400,
"Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
}
// create path and map variables
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
String localVarPath =
"/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
@@ -663,30 +708,33 @@ if (file != null)
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (requiredFile != null)
localVarFormParams.put("requiredFile", requiredFile);
if (requiredFile != null) localVarFormParams.put("requiredFile", requiredFile);
final String[] localVarAccepts = {
"application/json"
};
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String[] localVarContentTypes = {"multipart/form-data"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"petstore_auth"};
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"PetApi.uploadFileWithRequiredFile",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
}

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.model.Order;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.Order;
public class StoreApi {
private ApiClient apiClient;
@@ -35,44 +31,48 @@ public class StoreApi {
this.apiClient = apiClient;
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything
* above 1000 or nonintegers will generate API errors
*
* @param orderId ID of the order that needs to be deleted (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
* </table>
*/
public void deleteOrder(String orderId) throws ApiException {
deleteOrderWithHttpInfo(orderId);
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything
* above 1000 or nonintegers will generate API errors
*
* @param orderId ID of the order that needs to be deleted (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
throw new ApiException(
400, "Missing the required parameter 'orderId' when calling deleteOrder");
}
// create path and map variables
String localVarPath = "/store/order/{order_id}"
String localVarPath =
"/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
// query params
@@ -81,51 +81,56 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"StoreApi.deleteOrder",
localVarPath,
"DELETE",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* Returns pet inventories by status Returns a map of status codes to quantities
*
* @return Map&lt;String, Integer&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public Map<String, Integer> getInventory() throws ApiException {
return getInventoryWithHttpInfo().getData();
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* Returns pet inventories by status Returns a map of status codes to quantities
*
* @return ApiResponse&lt;Map&lt;String, Integer&gt;&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
@@ -139,70 +144,79 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {"api_key"};
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
GenericType<Map<String, Integer>> localVarReturnType =
new GenericType<Map<String, Integer>>() {};
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"StoreApi.getInventory",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt;
* 10. Other values will generated exceptions
*
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
* </table>
*/
public Order getOrderById(Long orderId) throws ApiException {
return getOrderByIdWithHttpInfo(orderId).getData();
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt;
* 10. Other values will generated exceptions
*
* @param orderId ID of pet that needs to be fetched (required)
* @return ApiResponse&lt;Order&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
throw new ApiException(
400, "Missing the required parameter 'orderId' when calling getOrderById");
}
// create path and map variables
String localVarPath = "/store/order/{order_id}"
String localVarPath =
"/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
// query params
@@ -211,64 +225,68 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"StoreApi.getOrderById",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (required)
* @param order order placed for purchasing the pet (required)
* @return Order
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
* </table>
*/
public Order placeOrder(Order body) throws ApiException {
return placeOrderWithHttpInfo(body).getData();
public Order placeOrder(Order order) throws ApiException {
return placeOrderWithHttpInfo(order).getData();
}
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (required)
* @param order order placed for purchasing the pet (required)
* @return ApiResponse&lt;Order&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
Object localVarPostBody = order;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
// verify the required parameter 'order' is set
if (order == null) {
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
}
// create path and map variables
@@ -280,26 +298,29 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"StoreApi.placeOrder",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
}

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.model.User;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.User;
public class UserApi {
private ApiClient apiClient;
@@ -35,38 +31,38 @@ public class UserApi {
this.apiClient = apiClient;
}
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (required)
* Create user This can only be done by the logged in user.
*
* @param user Created user object (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public void createUser(User body) throws ApiException {
createUserWithHttpInfo(body);
public void createUser(User user) throws ApiException {
createUserWithHttpInfo(user);
}
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (required)
* Create user This can only be done by the logged in user.
*
* @param user Created user object (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
}
// create path and map variables
@@ -78,59 +74,65 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"UserApi.createUser",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Creates list of users with given input array
*
* @param body List of user object (required)
* @param user List of user object (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public void createUsersWithArrayInput(List<User> body) throws ApiException {
createUsersWithArrayInputWithHttpInfo(body);
public void createUsersWithArrayInput(List<User> user) throws ApiException {
createUsersWithArrayInputWithHttpInfo(user);
}
/**
* Creates list of users with given input array
*
* @param body List of user object (required)
* @param user List of user object (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user)
throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(
400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
// create path and map variables
@@ -142,59 +144,65 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"UserApi.createUsersWithArrayInput",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Creates list of users with given input array
*
* @param body List of user object (required)
* @param user List of user object (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public void createUsersWithListInput(List<User> body) throws ApiException {
createUsersWithListInputWithHttpInfo(body);
public void createUsersWithListInput(List<User> user) throws ApiException {
createUsersWithListInputWithHttpInfo(user);
}
/**
* Creates list of users with given input array
*
* @param body List of user object (required)
* @param user List of user object (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user)
throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(
400, "Missing the required parameter 'user' when calling createUsersWithListInput");
}
// create path and map variables
@@ -206,65 +214,71 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"UserApi.createUsersWithListInput",
localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Delete user
* This can only be done by the logged in user.
* Delete user This can only be done by the logged in user.
*
* @param username The name that needs to be deleted (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
* </table>
*/
public void deleteUser(String username) throws ApiException {
deleteUserWithHttpInfo(username);
}
/**
* Delete user
* This can only be done by the logged in user.
* Delete user This can only be done by the logged in user.
*
* @param username The name that needs to be deleted (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
throw new ApiException(
400, "Missing the required parameter 'username' when calling deleteUser");
}
// create path and map variables
String localVarPath = "/user/{username}"
String localVarPath =
"/user/{username}"
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
// query params
@@ -273,25 +287,30 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"UserApi.deleteUser",
localVarPath,
"DELETE",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Get user by user name
@@ -300,12 +319,12 @@ public class UserApi {
* @return User
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
* </table>
*/
public User getUserByName(String username) throws ApiException {
return getUserByNameWithHttpInfo(username).getData();
@@ -318,23 +337,25 @@ public class UserApi {
* @return ApiResponse&lt;User&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
* <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
* </table>
*/
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
throw new ApiException(
400, "Missing the required parameter 'username' when calling getUserByName");
}
// create path and map variables
String localVarPath = "/user/{username}"
String localVarPath =
"/user/{username}"
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
// query params
@@ -343,27 +364,31 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType<User> localVarReturnType = new GenericType<User>() {};
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"UserApi.getUserByName",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Logs user into the system
@@ -373,11 +398,11 @@ public class UserApi {
* @return String
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr>
<tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr>
* <tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
* </table>
*/
public String loginUser(String username, String password) throws ApiException {
return loginUserWithHttpInfo(username, password).getData();
@@ -391,23 +416,26 @@ public class UserApi {
* @return ApiResponse&lt;String&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr>
<tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr>
* <tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
* </table>
*/
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
public ApiResponse<String> loginUserWithHttpInfo(String username, String password)
throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
throw new ApiException(
400, "Missing the required parameter 'username' when calling loginUser");
}
// verify the required parameter 'password' is set
if (password == null) {
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
throw new ApiException(
400, "Missing the required parameter 'password' when calling loginUser");
}
// create path and map variables
@@ -422,36 +450,41 @@ public class UserApi {
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String[] localVarAccepts = {"application/xml", "application/json"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType<String> localVarReturnType = new GenericType<String>() {};
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, null);
return apiClient.invokeAPI(
"UserApi.loginUser",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
/**
* Logs out current logged in user session
*
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public void logoutUser() throws ApiException {
logoutUserWithHttpInfo();
@@ -463,10 +496,10 @@ public class UserApi {
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
@@ -480,72 +513,79 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"UserApi.logoutUser",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
/**
* Updated user
* This can only be done by the logged in user.
* Updated user This can only be done by the logged in user.
*
* @param username name that need to be deleted (required)
* @param body Updated user object (required)
* @param user Updated user object (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
* </table>
*/
public void updateUser(String username, User body) throws ApiException {
updateUserWithHttpInfo(username, body);
public void updateUser(String username, User user) throws ApiException {
updateUserWithHttpInfo(username, user);
}
/**
* Updated user
* This can only be done by the logged in user.
* Updated user This can only be done by the logged in user.
*
* @param username name that need to be deleted (required)
* @param body Updated user object (required)
* @param user Updated user object (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr>
* <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
Object localVarPostBody = body;
public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
throw new ApiException(
400, "Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
}
// create path and map variables
String localVarPath = "/user/{username}"
String localVarPath =
"/user/{username}"
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
// query params
@@ -554,24 +594,28 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String[] localVarContentTypes = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, null, null);
return apiClient.invokeAPI(
"UserApi.updateUser",
localVarPath,
"PUT",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
}
}

View File

@@ -10,14 +10,13 @@
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import org.openapitools.client.Pair;
import java.util.Map;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class ApiKeyAuth implements Authentication {
private final String location;
@@ -56,7 +55,14 @@ public class ApiKeyAuth implements Authentication {
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (apiKey == null) {
return;
}

View File

@@ -10,13 +10,13 @@
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import org.openapitools.client.Pair;
import java.util.Map;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public interface Authentication {
/**
@@ -26,5 +26,12 @@ public interface Authentication {
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
*/
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams);
void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException;
}

View File

@@ -10,18 +10,15 @@
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import org.openapitools.client.Pair;
import com.migcomponents.migbase64.Base64;
import java.util.Map;
import java.util.List;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class HttpBasicAuth implements Authentication {
private String username;
@@ -44,13 +41,21 @@ public class HttpBasicAuth implements Authentication {
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (username == null && password == null) {
return;
}
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
try {
headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false));
headerParams.put(
"Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}

View File

@@ -10,14 +10,13 @@
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import org.openapitools.client.Pair;
import java.util.Map;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class HttpBearerAuth implements Authentication {
private final String scheme;
@@ -28,7 +27,8 @@ public class HttpBearerAuth implements Authentication {
}
/**
* Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
* Gets the token, which together with the scheme, will be sent as the value of the Authorization
* header.
*
* @return The bearer token
*/
@@ -37,7 +37,8 @@ public class HttpBearerAuth implements Authentication {
}
/**
* Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
* Sets the token, which together with the scheme, will be sent as the value of the Authorization
* header.
*
* @param bearerToken The bearer token to send in the Authorization header
*/
@@ -46,12 +47,20 @@ public class HttpBearerAuth implements Authentication {
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
headerParams.put(
"Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {

View File

@@ -0,0 +1,141 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import java.net.URI;
import java.net.URLEncoder;
import java.security.Key;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
import org.tomitribe.auth.signatures.*;
public class HttpSignatureAuth implements Authentication {
private Signer signer;
private String name;
private Algorithm algorithm;
private List<String> headers;
public HttpSignatureAuth(String name, Algorithm algorithm, List<String> headers) {
this.name = name;
this.algorithm = algorithm;
this.headers = headers;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Algorithm getAlgorithm() {
return algorithm;
}
public void setAlgorithm(Algorithm algorithm) {
this.algorithm = algorithm;
}
public List<String> getHeaders() {
return headers;
}
public void setHeaders(List<String> headers) {
this.headers = headers;
}
public Signer getSigner() {
return signer;
}
public void setSigner(Signer signer) {
this.signer = signer;
}
public void setup(Key key) throws ApiException {
if (key == null) {
throw new ApiException("key (java.security.Key) cannot be null");
}
signer = new Signer(key, new Signature(name, algorithm, null, headers));
}
@Override
public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
try {
if (headers.contains("host")) {
headerParams.put("host", uri.getHost());
}
if (headers.contains("date")) {
headerParams.put(
"date",
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US).format(new Date()));
}
if (headers.contains("digest")) {
headerParams.put(
"digest",
"SHA-256="
+ new String(
Base64.getEncoder()
.encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes()))));
}
if (signer == null) {
throw new ApiException(
"Signer cannot be null. Please run the method `setup` to set it up correctly");
}
// construct the path with the URL query string
String path = uri.getPath();
List<String> urlQueries = new ArrayList<String>();
for (Pair queryParam : queryParams) {
urlQueries.add(
queryParam.getName()
+ "="
+ URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20"));
}
if (!urlQueries.isEmpty()) {
path = path + "?" + String.join("&", urlQueries);
}
headerParams.put("Authorization", signer.sign(method, path, headerParams).toString());
} catch (Exception ex) {
throw new ApiException(
"Failed to create signature in the HTTP request header: " + ex.toString());
}
}
}

View File

@@ -10,14 +10,13 @@
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import org.openapitools.client.Pair;
import java.util.Map;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class OAuth implements Authentication {
private String accessToken;
@@ -31,7 +30,14 @@ public class OAuth implements Authentication {
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (accessToken != null) {
headerParams.put("Authorization", "Bearer " + accessToken);
}

View File

@@ -10,9 +10,11 @@
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
public enum OAuthFlow {
accessCode, implicit, password, application
accessCode,
implicit,
password,
application
}

View File

@@ -10,15 +10,11 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.openapitools.client.ApiException;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public abstract class AbstractOpenApiSchema {
private Object instance;
@@ -31,9 +27,13 @@ public abstract class AbstractOpenApiSchema {
public abstract Map<String, GenericType> getSchemas();
public Object getActualInstance() {return instance;}
public Object getActualInstance() {
return instance;
}
public void setActualInstance(Object instance) {this.instance = instance;}
public void setActualInstance(Object instance) {
this.instance = instance;
}
public String getSchemaType() {
return schemaType;

View File

@@ -1,107 +0,0 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesArray
*/
@JsonPropertyOrder({
AdditionalPropertiesArray.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesArray extends HashMap<String, List> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesArray name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
return Objects.equals(this.name, additionalPropertiesArray.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesArray {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,106 +0,0 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesBoolean
*/
@JsonPropertyOrder({
AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesBoolean name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesBoolean {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,414 +10,92 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* AdditionalPropertiesClass
*/
/** AdditionalPropertiesClass */
@JsonPropertyOrder({
AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY
})
public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_STRING = "map_string";
private Map<String, String> mapString = null;
public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property";
private Map<String, String> mapProperty = null;
public static final String JSON_PROPERTY_MAP_NUMBER = "map_number";
private Map<String, BigDecimal> mapNumber = null;
public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property";
private Map<String, Map<String, String>> mapOfMapProperty = null;
public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer";
private Map<String, Integer> mapInteger = null;
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean";
private Map<String, Boolean> mapBoolean = null;
public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
private Map<String, List<Integer>> mapArrayInteger = null;
public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
private Map<String, List<Object>> mapArrayAnytype = null;
public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
private Map<String, Map<String, String>> mapMapString = null;
public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
private Map<String, Map<String, Object>> mapMapAnytype = null;
public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1";
private Object anytype1;
public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2";
private Object anytype2;
public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
private Object anytype3;
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
this.mapString = mapString;
this.mapProperty = mapProperty;
return this;
}
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
this.mapString = new HashMap<String, String>();
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapString.put(key, mapStringItem);
this.mapProperty.put(key, mapPropertyItem);
return this;
}
/**
* Get mapString
* @return mapString
**/
* Get mapProperty
*
* @return mapProperty
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_STRING)
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, String> getMapString() {
return mapString;
public Map<String, String> getMapProperty() {
return mapProperty;
}
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass mapOfMapProperty(
Map<String, Map<String, String>> mapOfMapProperty) {
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
this.mapNumber = new HashMap<String, BigDecimal>();
public AdditionalPropertiesClass putMapOfMapPropertyItem(
String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapNumber.put(key, mapNumberItem);
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
/**
* Get mapNumber
* @return mapNumber
**/
* Get mapOfMapProperty
*
* @return mapOfMapProperty
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_NUMBER)
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, BigDecimal> getMapNumber() {
return mapNumber;
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
return this;
}
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
this.mapInteger = new HashMap<String, Integer>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
}
/**
* Get mapInteger
* @return mapInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Integer> getMapInteger() {
return mapInteger;
}
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
return this;
}
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
this.mapBoolean = new HashMap<String, Boolean>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
}
/**
* Get mapBoolean
* @return mapBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getMapBoolean() {
return mapBoolean;
}
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
return this;
}
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
this.mapArrayInteger = new HashMap<String, List<Integer>>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
}
/**
* Get mapArrayInteger
* @return mapArrayInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger;
}
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
return this;
}
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
if (this.mapArrayAnytype == null) {
this.mapArrayAnytype = new HashMap<String, List<Object>>();
}
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
return this;
}
/**
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype;
}
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
return this;
}
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
if (this.mapMapString == null) {
this.mapMapString = new HashMap<String, Map<String, String>>();
}
this.mapMapString.put(key, mapMapStringItem);
return this;
}
/**
* Get mapMapString
* @return mapMapString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapString() {
return mapMapString;
}
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
return this;
}
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
if (this.mapMapAnytype == null) {
this.mapMapAnytype = new HashMap<String, Map<String, Object>>();
}
this.mapMapAnytype.put(key, mapMapAnytypeItem);
return this;
}
/**
* Get mapMapAnytype
* @return mapMapAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype;
}
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
public AdditionalPropertiesClass anytype1(Object anytype1) {
this.anytype1 = anytype1;
return this;
}
/**
* Get anytype1
* @return anytype1
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype1() {
return anytype1;
}
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
public AdditionalPropertiesClass anytype2(Object anytype2) {
this.anytype2 = anytype2;
return this;
}
/**
* Get anytype2
* @return anytype2
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype2() {
return anytype2;
}
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
public AdditionalPropertiesClass anytype3(Object anytype3) {
this.anytype3 = anytype3;
return this;
}
/**
* Get anytype3
* @return anytype3
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype3() {
return anytype3;
}
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -427,47 +105,27 @@ public class AdditionalPropertiesClass {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) &&
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) &&
Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) &&
Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) &&
Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty)
&& Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\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).
* 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) {
@@ -475,6 +133,4 @@ public class AdditionalPropertiesClass {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,106 +0,0 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesInteger
*/
@JsonPropertyOrder({
AdditionalPropertiesInteger.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesInteger name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
return Objects.equals(this.name, additionalPropertiesInteger.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesInteger {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,107 +0,0 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesNumber
*/
@JsonPropertyOrder({
AdditionalPropertiesNumber.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesNumber name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
return Objects.equals(this.name, additionalPropertiesNumber.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesNumber {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,36 +10,27 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* Animal
*/
@JsonPropertyOrder({
Animal.JSON_PROPERTY_CLASS_NAME,
Animal.JSON_PROPERTY_COLOR
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
/** Animal */
@JsonPropertyOrder({Animal.JSON_PROPERTY_CLASS_NAME, Animal.JSON_PROPERTY_COLOR})
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "className",
visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
})
public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
private String className;
@@ -47,7 +38,6 @@ public class Animal {
public static final String JSON_PROPERTY_COLOR = "color";
private String color = "red";
public Animal className(String className) {
this.className = className;
@@ -56,22 +46,20 @@ public class Animal {
/**
* Get className
*
* @return className
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_CLASS_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Animal color(String color) {
this.color = color;
@@ -80,23 +68,21 @@ public class Animal {
/**
* Get color
*
* @return color
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -106,8 +92,8 @@ public class Animal {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) &&
Objects.equals(this.color, animal.color);
return Objects.equals(this.className, animal.className)
&& Objects.equals(this.color, animal.color);
}
@Override
@@ -115,7 +101,6 @@ public class Animal {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -127,8 +112,7 @@ public class Animal {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -136,6 +120,4 @@ public class Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,34 +10,23 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* ArrayOfArrayOfNumberOnly
*/
@JsonPropertyOrder({
ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER
})
import java.util.Objects;
/** ArrayOfArrayOfNumberOnly */
@JsonPropertyOrder({ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER})
public class ArrayOfArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
@@ -54,23 +43,21 @@ public class ArrayOfArrayOfNumberOnly {
/**
* Get arrayArrayNumber
*
* @return arrayArrayNumber
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -88,7 +75,6 @@ public class ArrayOfArrayOfNumberOnly {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -99,8 +85,7 @@ public class ArrayOfArrayOfNumberOnly {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -108,6 +93,4 @@ public class ArrayOfArrayOfNumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,34 +10,23 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* ArrayOfNumberOnly
*/
@JsonPropertyOrder({
ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER
})
import java.util.Objects;
/** ArrayOfNumberOnly */
@JsonPropertyOrder({ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER})
public class ArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
@@ -54,23 +43,21 @@ public class ArrayOfNumberOnly {
/**
* Get arrayNumber
*
* @return arrayNumber
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -88,7 +75,6 @@ public class ArrayOfNumberOnly {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -99,8 +85,7 @@ public class ArrayOfNumberOnly {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -108,6 +93,4 @@ public class ArrayOfNumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,31 +10,22 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.ReadOnlyFirst;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* ArrayTest
*/
/** ArrayTest */
@JsonPropertyOrder({
ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL
})
public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string";
private List<String> arrayOfString = null;
@@ -45,7 +36,6 @@ public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
@@ -62,23 +52,21 @@ public class ArrayTest {
/**
* Get arrayOfString
*
* @return arrayOfString
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
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;
@@ -95,23 +83,21 @@ public class ArrayTest {
/**
* Get arrayArrayOfInteger
*
* @return arrayArrayOfInteger
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
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;
@@ -128,23 +114,21 @@ public class ArrayTest {
/**
* Get arrayArrayOfModel
*
* @return arrayArrayOfModel
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
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) {
@@ -154,9 +138,9 @@ public class ArrayTest {
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);
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString)
&& Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger)
&& Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
@@ -164,21 +148,21 @@ public class ArrayTest {
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(" 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).
* 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) {
@@ -186,6 +170,4 @@ public class ArrayTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,145 +0,0 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.BigCatAllOf;
import org.openapitools.client.model.Cat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* BigCat
*/
@JsonPropertyOrder({
BigCat.JSON_PROPERTY_KIND
})
public class BigCat extends Cat {
/**
* Gets or Sets kind
*/
public enum KindEnum {
LIONS("lions"),
TIGERS("tigers"),
LEOPARDS("leopards"),
JAGUARS("jaguars");
private String value;
KindEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_KIND = "kind";
private KindEnum kind;
public BigCat kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public KindEnum getKind() {
return kind;
}
public void setKind(KindEnum kind) {
this.kind = kind;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCat bigCat = (BigCat) o;
return Objects.equals(this.kind, bigCat.kind) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(kind, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BigCat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).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

@@ -1,141 +0,0 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* BigCatAllOf
*/
@JsonPropertyOrder({
BigCatAllOf.JSON_PROPERTY_KIND
})
public class BigCatAllOf {
/**
* Gets or Sets kind
*/
public enum KindEnum {
LIONS("lions"),
TIGERS("tigers"),
LEOPARDS("leopards"),
JAGUARS("jaguars");
private String value;
KindEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_KIND = "kind";
private KindEnum kind;
public BigCatAllOf kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public KindEnum getKind() {
return kind;
}
public void setKind(KindEnum kind) {
this.kind = kind;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
return Objects.equals(this.kind, bigCatAllOf.kind);
}
@Override
public int hashCode() {
return Objects.hash(kind);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BigCatAllOf {\n");
sb.append(" kind: ").append(toIndentedString(kind)).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,22 +10,15 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Capitalization
*/
/** Capitalization */
@JsonPropertyOrder({
Capitalization.JSON_PROPERTY_SMALL_CAMEL,
Capitalization.JSON_PROPERTY_CAPITAL_CAMEL,
@@ -34,7 +27,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS,
Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E
})
public class Capitalization {
public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel";
private String smallCamel;
@@ -54,7 +46,6 @@ public class Capitalization {
public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME";
private String ATT_NAME;
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
@@ -63,23 +54,21 @@ public class Capitalization {
/**
* Get smallCamel
*
* @return smallCamel
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SMALL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSmallCamel() {
return smallCamel;
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
@@ -88,23 +77,21 @@ public class Capitalization {
/**
* Get capitalCamel
*
* @return capitalCamel
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCapitalCamel() {
return capitalCamel;
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
@@ -113,23 +100,21 @@ public class Capitalization {
/**
* Get smallSnake
*
* @return smallSnake
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SMALL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSmallSnake() {
return smallSnake;
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
@@ -138,23 +123,21 @@ public class Capitalization {
/**
* Get capitalSnake
*
* @return capitalSnake
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCapitalSnake() {
return capitalSnake;
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
@@ -163,23 +146,21 @@ public class Capitalization {
/**
* Get scAETHFlowPoints
*
* @return scAETHFlowPoints
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
@@ -188,23 +169,21 @@ public class Capitalization {
/**
* Name of the pet
*
* @return ATT_NAME
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
@JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getATTNAME() {
return ATT_NAME;
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -214,20 +193,20 @@ public class Capitalization {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
return Objects.equals(this.smallCamel, capitalization.smallCamel)
&& Objects.equals(this.capitalCamel, capitalization.capitalCamel)
&& Objects.equals(this.smallSnake, capitalization.smallSnake)
&& Objects.equals(this.capitalSnake, capitalization.capitalSnake)
&& Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints)
&& Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
}
@Override
public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
return Objects.hash(
smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -243,8 +222,7 @@ public class Capitalization {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -252,6 +230,4 @@ public class Capitalization {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,33 +10,20 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.CatAllOf;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Cat
*/
@JsonPropertyOrder({
Cat.JSON_PROPERTY_DECLAWED
})
/** Cat */
@JsonPropertyOrder({Cat.JSON_PROPERTY_DECLAWED})
public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
private Boolean declawed;
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
@@ -45,23 +32,21 @@ public class Cat extends Animal {
/**
* Get declawed
*
* @return declawed
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DECLAWED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -71,8 +56,7 @@ public class Cat extends Animal {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
return Objects.equals(this.declawed, cat.declawed) && super.equals(o);
}
@Override
@@ -80,7 +64,6 @@ public class Cat extends Animal {
return Objects.hash(declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -92,8 +75,7 @@ public class Cat extends Animal {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -101,6 +83,4 @@ public class Cat extends Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,31 +10,20 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* CatAllOf
*/
@JsonPropertyOrder({
CatAllOf.JSON_PROPERTY_DECLAWED
})
/** CatAllOf */
@JsonPropertyOrder({CatAllOf.JSON_PROPERTY_DECLAWED})
public class CatAllOf {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
private Boolean declawed;
public CatAllOf declawed(Boolean declawed) {
this.declawed = declawed;
@@ -43,23 +32,21 @@ public class CatAllOf {
/**
* Get declawed
*
* @return declawed
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DECLAWED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -77,7 +64,6 @@ public class CatAllOf {
return Objects.hash(declawed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -88,8 +74,7 @@ public class CatAllOf {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -97,6 +82,4 @@ public class CatAllOf {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,27 +10,16 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Category
*/
@JsonPropertyOrder({
Category.JSON_PROPERTY_ID,
Category.JSON_PROPERTY_NAME
})
/** Category */
@JsonPropertyOrder({Category.JSON_PROPERTY_ID, Category.JSON_PROPERTY_NAME})
public class Category {
public static final String JSON_PROPERTY_ID = "id";
private Long id;
@@ -38,7 +27,6 @@ public class Category {
public static final String JSON_PROPERTY_NAME = "name";
private String name = "default-name";
public Category id(Long id) {
this.id = id;
@@ -47,23 +35,21 @@ public class Category {
/**
* Get id
*
* @return id
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Category name(String name) {
this.name = name;
@@ -72,22 +58,20 @@ public class Category {
/**
* Get name
*
* @return name
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -97,8 +81,7 @@ public class Category {
return false;
}
Category category = (Category) o;
return Objects.equals(this.id, category.id) &&
Objects.equals(this.name, category.name);
return Objects.equals(this.id, category.id) && Objects.equals(this.name, category.name);
}
@Override
@@ -106,7 +89,6 @@ public class Category {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -118,8 +100,7 @@ public class Category {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -127,6 +108,4 @@ public class Category {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,32 +10,22 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* Model for testing model with \&quot;_class\&quot; property
*/
/** Model for testing model with \&quot;_class\&quot; property */
@ApiModel(description = "Model for testing model with \"_class\" property")
@JsonPropertyOrder({
ClassModel.JSON_PROPERTY_PROPERTY_CLASS
})
@JsonPropertyOrder({ClassModel.JSON_PROPERTY_PROPERTY_CLASS})
public class ClassModel {
public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
private String propertyClass;
public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
@@ -44,23 +34,21 @@ public class ClassModel {
/**
* Get propertyClass
*
* @return propertyClass
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -78,7 +66,6 @@ public class ClassModel {
return Objects.hash(propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -89,8 +76,7 @@ public class ClassModel {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -98,6 +84,4 @@ public class ClassModel {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,31 +10,20 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Client
*/
@JsonPropertyOrder({
Client.JSON_PROPERTY_CLIENT
})
/** Client */
@JsonPropertyOrder({Client.JSON_PROPERTY_CLIENT})
public class Client {
public static final String JSON_PROPERTY_CLIENT = "client";
private String client;
public Client client(String client) {
this.client = client;
@@ -43,23 +32,21 @@ public class Client {
/**
* Get client
*
* @return client
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CLIENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -77,7 +64,6 @@ public class Client {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -88,8 +74,7 @@ public class Client {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -97,6 +82,4 @@ public class Client {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,33 +10,20 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.DogAllOf;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Dog
*/
@JsonPropertyOrder({
Dog.JSON_PROPERTY_BREED
})
/** Dog */
@JsonPropertyOrder({Dog.JSON_PROPERTY_BREED})
public class Dog extends Animal {
public static final String JSON_PROPERTY_BREED = "breed";
private String breed;
public Dog breed(String breed) {
this.breed = breed;
@@ -45,23 +32,21 @@ public class Dog extends Animal {
/**
* Get breed
*
* @return breed
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BREED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -71,8 +56,7 @@ public class Dog extends Animal {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
return Objects.equals(this.breed, dog.breed) && super.equals(o);
}
@Override
@@ -80,7 +64,6 @@ public class Dog extends Animal {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -92,8 +75,7 @@ public class Dog extends Animal {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -101,6 +83,4 @@ public class Dog extends Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,31 +10,20 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* DogAllOf
*/
@JsonPropertyOrder({
DogAllOf.JSON_PROPERTY_BREED
})
/** DogAllOf */
@JsonPropertyOrder({DogAllOf.JSON_PROPERTY_BREED})
public class DogAllOf {
public static final String JSON_PROPERTY_BREED = "breed";
private String breed;
public DogAllOf breed(String breed) {
this.breed = breed;
@@ -43,23 +32,21 @@ public class DogAllOf {
/**
* Get breed
*
* @return breed
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BREED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -77,7 +64,6 @@ public class DogAllOf {
return Objects.hash(breed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -88,8 +74,7 @@ public class DogAllOf {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -97,6 +82,4 @@ public class DogAllOf {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,33 +10,22 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* EnumArrays
*/
@JsonPropertyOrder({
EnumArrays.JSON_PROPERTY_JUST_SYMBOL,
EnumArrays.JSON_PROPERTY_ARRAY_ENUM
})
import java.util.Objects;
/** EnumArrays */
@JsonPropertyOrder({EnumArrays.JSON_PROPERTY_JUST_SYMBOL, EnumArrays.JSON_PROPERTY_ARRAY_ENUM})
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
/** Gets or Sets justSymbol */
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(">="),
@@ -72,9 +61,7 @@ public class EnumArrays {
public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol";
private JustSymbolEnum justSymbol;
/**
* Gets or Sets arrayEnum
*/
/** Gets or Sets arrayEnum */
public enum ArrayEnumEnum {
FISH("fish"),
@@ -110,7 +97,6 @@ public class EnumArrays {
public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum";
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
@@ -119,23 +105,21 @@ public class EnumArrays {
/**
* Get justSymbol
*
* @return justSymbol
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_JUST_SYMBOL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JustSymbolEnum getJustSymbol() {
return justSymbol;
}
public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
@@ -152,23 +136,21 @@ public class EnumArrays {
/**
* Get arrayEnum
*
* @return arrayEnum
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum;
}
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -178,8 +160,8 @@ public class EnumArrays {
return false;
}
EnumArrays enumArrays = (EnumArrays) o;
return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
return Objects.equals(this.justSymbol, enumArrays.justSymbol)
&& Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
}
@Override
@@ -187,7 +169,6 @@ public class EnumArrays {
return Objects.hash(justSymbol, arrayEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -199,8 +180,7 @@ public class EnumArrays {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -208,6 +188,4 @@ public class EnumArrays {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,21 +10,14 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets EnumClass
*/
/** Gets or Sets EnumClass */
public enum EnumClass {
_ABC("_abc"),
_EFG("-efg"),
@@ -57,4 +50,3 @@ public enum EnumClass {
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -10,35 +10,31 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnum;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* EnumTest
*/
/** EnumTest */
@JsonPropertyOrder({
EnumTest.JSON_PROPERTY_ENUM_STRING,
EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED,
EnumTest.JSON_PROPERTY_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_ENUM_NUMBER,
EnumTest.JSON_PROPERTY_OUTER_ENUM
EnumTest.JSON_PROPERTY_OUTER_ENUM,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE
})
public class EnumTest {
/**
* Gets or Sets enumString
*/
/** Gets or Sets enumString */
public enum EnumStringEnum {
UPPER("UPPER"),
@@ -76,9 +72,7 @@ public class EnumTest {
public static final String JSON_PROPERTY_ENUM_STRING = "enum_string";
private EnumStringEnum enumString;
/**
* Gets or Sets enumStringRequired
*/
/** Gets or Sets enumStringRequired */
public enum EnumStringRequiredEnum {
UPPER("UPPER"),
@@ -116,9 +110,7 @@ public class EnumTest {
public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required";
private EnumStringRequiredEnum enumStringRequired;
/**
* Gets or Sets enumInteger
*/
/** Gets or Sets enumInteger */
public enum EnumIntegerEnum {
NUMBER_1(1),
@@ -154,9 +146,7 @@ public class EnumTest {
public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer";
private EnumIntegerEnum enumInteger;
/**
* Gets or Sets enumNumber
*/
/** Gets or Sets enumNumber */
public enum EnumNumberEnum {
NUMBER_1_DOT_1(1.1),
@@ -193,8 +183,18 @@ public class EnumTest {
private EnumNumberEnum enumNumber;
public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum";
private OuterEnum outerEnum;
private JsonNullable<OuterEnum> outerEnum = JsonNullable.<OuterEnum>undefined();
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger";
private OuterEnumInteger outerEnumInteger;
public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue";
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE =
"outerEnumIntegerDefaultValue";
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue =
OuterEnumIntegerDefaultValue.NUMBER_0;
public EnumTest enumString(EnumStringEnum enumString) {
@@ -204,23 +204,21 @@ public class EnumTest {
/**
* Get enumString
*
* @return enumString
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumStringEnum getEnumString() {
return enumString;
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
@@ -229,22 +227,20 @@ public class EnumTest {
/**
* Get enumStringRequired
*
* @return enumStringRequired
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
@@ -253,23 +249,21 @@ public class EnumTest {
/**
* Get enumInteger
*
* @return enumInteger
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
@@ -278,47 +272,124 @@ public class EnumTest {
/**
* Get enumNumber
*
* @return enumNumber
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENUM_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumNumberEnum getEnumNumber() {
return enumNumber;
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
this.outerEnum = outerEnum;
return this;
}
/**
* Get outerEnum
*
* @return outerEnum
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public OuterEnum getOuterEnum() {
return outerEnum.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnum getOuterEnum() {
public JsonNullable<OuterEnum> getOuterEnum_JsonNullable() {
return outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public void setOuterEnum_JsonNullable(JsonNullable<OuterEnum> outerEnum) {
this.outerEnum = outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
}
public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return this;
}
/**
* Get outerEnumInteger
*
* @return outerEnumInteger
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumInteger getOuterEnumInteger() {
return outerEnumInteger;
}
public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
}
public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return this;
}
/**
* Get outerEnumDefaultValue
*
* @return outerEnumDefaultValue
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumDefaultValue getOuterEnumDefaultValue() {
return outerEnumDefaultValue;
}
public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
}
public EnumTest outerEnumIntegerDefaultValue(
OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return this;
}
/**
* Get outerEnumIntegerDefaultValue
*
* @return outerEnumIntegerDefaultValue
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() {
return outerEnumIntegerDefaultValue;
}
public void setOuterEnumIntegerDefaultValue(
OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -329,19 +400,29 @@ public class EnumTest {
return false;
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
return Objects.equals(this.enumString, enumTest.enumString)
&& Objects.equals(this.enumStringRequired, enumTest.enumStringRequired)
&& Objects.equals(this.enumInteger, enumTest.enumInteger)
&& Objects.equals(this.enumNumber, enumTest.enumNumber)
&& Objects.equals(this.outerEnum, enumTest.outerEnum)
&& Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger)
&& Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue)
&& Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
}
@Override
public int hashCode() {
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
return Objects.hash(
enumString,
enumStringRequired,
enumInteger,
enumNumber,
outerEnum,
outerEnumInteger,
outerEnumDefaultValue,
outerEnumIntegerDefaultValue);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -351,13 +432,19 @@ public class EnumTest {
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n");
sb.append(" outerEnumDefaultValue: ")
.append(toIndentedString(outerEnumDefaultValue))
.append("\n");
sb.append(" outerEnumIntegerDefaultValue: ")
.append(toIndentedString(outerEnumIntegerDefaultValue))
.append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -365,6 +452,4 @@ public class EnumTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,29 +10,21 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* FileSchemaTestClass
*/
/** FileSchemaTestClass */
@JsonPropertyOrder({
FileSchemaTestClass.JSON_PROPERTY_FILE,
FileSchemaTestClass.JSON_PROPERTY_FILES
})
public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILE = "file";
private java.io.File file;
@@ -40,7 +32,6 @@ public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILES = "files";
private List<java.io.File> files = null;
public FileSchemaTestClass file(java.io.File file) {
this.file = file;
@@ -49,23 +40,21 @@ public class FileSchemaTestClass {
/**
* Get file
*
* @return file
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public java.io.File getFile() {
return file;
}
public void setFile(java.io.File file) {
this.file = file;
}
public FileSchemaTestClass files(List<java.io.File> files) {
this.files = files;
@@ -82,23 +71,21 @@ public class FileSchemaTestClass {
/**
* Get files
*
* @return files
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FILES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<java.io.File> getFiles() {
return files;
}
public void setFiles(List<java.io.File> files) {
this.files = files;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -108,8 +95,8 @@ public class FileSchemaTestClass {
return false;
}
FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o;
return Objects.equals(this.file, fileSchemaTestClass.file) &&
Objects.equals(this.files, fileSchemaTestClass.files);
return Objects.equals(this.file, fileSchemaTestClass.file)
&& Objects.equals(this.files, fileSchemaTestClass.files);
}
@Override
@@ -117,7 +104,6 @@ public class FileSchemaTestClass {
return Objects.hash(file, files);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -129,8 +115,7 @@ public class FileSchemaTestClass {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -138,6 +123,4 @@ public class FileSchemaTestClass {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,58 +10,43 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* AdditionalPropertiesString
*/
@JsonPropertyOrder({
AdditionalPropertiesString.JSON_PROPERTY_NAME
})
/** Foo */
@JsonPropertyOrder({Foo.JSON_PROPERTY_BAR})
public class Foo {
public static final String JSON_PROPERTY_BAR = "bar";
private String bar = "bar";
public class AdditionalPropertiesString extends HashMap<String, String> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public Foo bar(String bar) {
public AdditionalPropertiesString name(String name) {
this.name = name;
this.bar = bar;
return this;
}
/**
* Get name
* @return name
**/
* Get bar
*
* @return bar
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
public String getBar() {
return bar;
}
public void setName(String name) {
this.name = name;
public void setBar(String bar) {
this.bar = bar;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -70,30 +55,26 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
return Objects.equals(this.name, additionalPropertiesString.name) &&
super.equals(o);
Foo foo = (Foo) o;
return Objects.equals(this.bar, foo.bar);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
return Objects.hash(bar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesString {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("class Foo {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -101,6 +82,4 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,27 +10,21 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Objects;
import java.util.UUID;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* FormatTest
*/
/** FormatTest */
@JsonPropertyOrder({
FormatTest.JSON_PROPERTY_INTEGER,
FormatTest.JSON_PROPERTY_INT32,
@@ -45,9 +39,9 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_DATE_TIME,
FormatTest.JSON_PROPERTY_UUID,
FormatTest.JSON_PROPERTY_PASSWORD,
FormatTest.JSON_PROPERTY_BIG_DECIMAL
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS,
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER
})
public class FormatTest {
public static final String JSON_PROPERTY_INTEGER = "integer";
private Integer integer;
@@ -88,9 +82,12 @@ public class FormatTest {
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal";
private BigDecimal bigDecimal;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits";
private String patternWithDigits;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER =
"pattern_with_digits_and_delimiter";
private String patternWithDigitsAndDelimiter;
public FormatTest integer(Integer integer) {
@@ -99,26 +96,22 @@ public class FormatTest {
}
/**
* Get integer
* minimum: 10
* maximum: 100
* Get integer minimum: 10 maximum: 100
*
* @return integer
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
public FormatTest int32(Integer int32) {
this.int32 = int32;
@@ -126,26 +119,22 @@ public class FormatTest {
}
/**
* Get int32
* minimum: 20
* maximum: 200
* Get int32 minimum: 20 maximum: 200
*
* @return int32
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INT32)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
public FormatTest int64(Long int64) {
this.int64 = int64;
@@ -154,23 +143,21 @@ public class FormatTest {
/**
* Get int64
*
* @return int64
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INT64)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
public FormatTest number(BigDecimal number) {
this.number = number;
@@ -178,25 +165,21 @@ public class FormatTest {
}
/**
* Get number
* minimum: 32.1
* maximum: 543.2
* Get number minimum: 32.1 maximum: 543.2
*
* @return number
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
public FormatTest _float(Float _float) {
this._float = _float;
@@ -204,26 +187,22 @@ public class FormatTest {
}
/**
* Get _float
* minimum: 54.3
* maximum: 987.6
* Get _float minimum: 54.3 maximum: 987.6
*
* @return _float
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
public FormatTest _double(Double _double) {
this._double = _double;
@@ -231,26 +210,22 @@ public class FormatTest {
}
/**
* Get _double
* minimum: 67.8
* maximum: 123.4
* Get _double minimum: 67.8 maximum: 123.4
*
* @return _double
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
public FormatTest string(String string) {
this.string = string;
@@ -259,23 +234,21 @@ public class FormatTest {
/**
* Get string
*
* @return string
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
@@ -284,22 +257,20 @@ public class FormatTest {
/**
* Get _byte
*
* @return _byte
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
public FormatTest binary(File binary) {
this.binary = binary;
@@ -308,23 +279,21 @@ public class FormatTest {
/**
* Get binary
*
* @return binary
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BINARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getBinary() {
return binary;
}
public void setBinary(File binary) {
this.binary = binary;
}
public FormatTest date(LocalDate date) {
this.date = date;
@@ -333,22 +302,20 @@ public class FormatTest {
/**
* Get date
*
* @return date
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public FormatTest dateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
@@ -357,23 +324,21 @@ public class FormatTest {
/**
* Get dateTime
*
* @return dateTime
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() {
return dateTime;
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
@@ -382,23 +347,21 @@ public class FormatTest {
/**
* Get uuid
*
* @return uuid
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public FormatTest password(String password) {
this.password = password;
@@ -407,46 +370,68 @@ public class FormatTest {
/**
* Get password
*
* @return password
**/
*/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public FormatTest patternWithDigits(String patternWithDigits) {
public FormatTest bigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
this.patternWithDigits = patternWithDigits;
return this;
}
/**
* Get bigDecimal
* @return bigDecimal
**/
* A string that is a 10 digit number. Can have leading zeros.
*
* @return patternWithDigits
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL)
@ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getBigDecimal() {
return bigDecimal;
public String getPatternWithDigits() {
return patternWithDigits;
}
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
public void setPatternWithDigits(String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
}
public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return this;
}
/**
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following
* i.e. Image_01.
*
* @return patternWithDigitsAndDelimiter
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigitsAndDelimiter() {
return patternWithDigitsAndDelimiter;
}
public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -457,28 +442,44 @@ public class FormatTest {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password) &&
Objects.equals(this.bigDecimal, formatTest.bigDecimal);
return Objects.equals(this.integer, formatTest.integer)
&& Objects.equals(this.int32, formatTest.int32)
&& Objects.equals(this.int64, formatTest.int64)
&& Objects.equals(this.number, formatTest.number)
&& Objects.equals(this._float, formatTest._float)
&& Objects.equals(this._double, formatTest._double)
&& Objects.equals(this.string, formatTest.string)
&& Arrays.equals(this._byte, formatTest._byte)
&& Objects.equals(this.binary, formatTest.binary)
&& Objects.equals(this.date, formatTest.date)
&& Objects.equals(this.dateTime, formatTest.dateTime)
&& Objects.equals(this.uuid, formatTest.uuid)
&& Objects.equals(this.password, formatTest.password)
&& Objects.equals(this.patternWithDigits, formatTest.patternWithDigits)
&& Objects.equals(
this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
return Objects.hash(
integer,
int32,
int64,
number,
_float,
_double,
string,
Arrays.hashCode(_byte),
binary,
date,
dateTime,
uuid,
password,
patternWithDigits,
patternWithDigitsAndDelimiter);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -496,14 +497,16 @@ public class FormatTest {
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n");
sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n");
sb.append(" patternWithDigitsAndDelimiter: ")
.append(toIndentedString(patternWithDigitsAndDelimiter))
.append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -511,6 +514,4 @@ public class FormatTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,27 +10,16 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* HasOnlyReadOnly
*/
@JsonPropertyOrder({
HasOnlyReadOnly.JSON_PROPERTY_BAR,
HasOnlyReadOnly.JSON_PROPERTY_FOO
})
/** HasOnlyReadOnly */
@JsonPropertyOrder({HasOnlyReadOnly.JSON_PROPERTY_BAR, HasOnlyReadOnly.JSON_PROPERTY_FOO})
public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_BAR = "bar";
private String bar;
@@ -38,39 +27,32 @@ public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_FOO = "foo";
private String foo;
/**
* Get bar
*
* @return bar
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
return bar;
}
/**
* Get foo
*
* @return foo
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FOO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFoo() {
return foo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -80,8 +62,8 @@ public class HasOnlyReadOnly {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
return Objects.equals(this.bar, hasOnlyReadOnly.bar)
&& Objects.equals(this.foo, hasOnlyReadOnly.foo);
}
@Override
@@ -89,7 +71,6 @@ public class HasOnlyReadOnly {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -101,8 +82,7 @@ public class HasOnlyReadOnly {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -110,6 +90,4 @@ public class HasOnlyReadOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,104 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer
* in generated model.
*/
@ApiModel(
description =
"Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.")
@JsonPropertyOrder({HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE})
public class HealthCheckResult {
public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage";
private JsonNullable<String> nullableMessage = JsonNullable.<String>undefined();
public HealthCheckResult nullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
return this;
}
/**
* Get nullableMessage
*
* @return nullableMessage
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getNullableMessage() {
return nullableMessage.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getNullableMessage_JsonNullable() {
return nullableMessage;
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
public void setNullableMessage_JsonNullable(JsonNullable<String> nullableMessage) {
this.nullableMessage = nullableMessage;
}
public void setNullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HealthCheckResult healthCheckResult = (HealthCheckResult) o;
return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage);
}
@Override
public int hashCode() {
return Objects.hash(nullableMessage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HealthCheckResult {\n");
sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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,57 +10,68 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* AdditionalPropertiesAnyType
*/
@JsonPropertyOrder({
AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
/** InlineObject */
@JsonPropertyOrder({InlineObject.JSON_PROPERTY_NAME, InlineObject.JSON_PROPERTY_STATUS})
public class InlineObject {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
public AdditionalPropertiesAnyType name(String name) {
public InlineObject name(String name) {
this.name = name;
return this;
}
/**
* Get name
* Updated name of the pet
*
* @return name
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@ApiModelProperty(value = "Updated name of the pet")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public InlineObject status(String status) {
this.status = status;
return this;
}
/**
* Updated status of the pet
*
* @return status
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Updated status of the pet")
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -70,30 +81,28 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
super.equals(o);
InlineObject inlineObject = (InlineObject) o;
return Objects.equals(this.name, inlineObject.name)
&& Objects.equals(this.status, inlineObject.status);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
return Objects.hash(name, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesAnyType {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("class InlineObject {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -101,6 +110,4 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,117 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.util.Objects;
/** InlineObject1 */
@JsonPropertyOrder({
InlineObject1.JSON_PROPERTY_ADDITIONAL_METADATA,
InlineObject1.JSON_PROPERTY_FILE
})
public class InlineObject1 {
public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata";
private String additionalMetadata;
public static final String JSON_PROPERTY_FILE = "file";
private File file;
public InlineObject1 additionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
return this;
}
/**
* Additional data to pass to server
*
* @return additionalMetadata
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Additional data to pass to server")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAdditionalMetadata() {
return additionalMetadata;
}
public void setAdditionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
}
public InlineObject1 file(File file) {
this.file = file;
return this;
}
/**
* file to upload
*
* @return file
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "file to upload")
@JsonProperty(JSON_PROPERTY_FILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject1 inlineObject1 = (InlineObject1) o;
return Objects.equals(this.additionalMetadata, inlineObject1.additionalMetadata)
&& Objects.equals(this.file, inlineObject1.file);
}
@Override
public int hashCode() {
return Objects.hash(additionalMetadata, file);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject1 {\n");
sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n");
sb.append(" file: ").append(toIndentedString(file)).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

@@ -0,0 +1,198 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** InlineObject2 */
@JsonPropertyOrder({
InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING_ARRAY,
InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING
})
public class InlineObject2 {
/** Gets or Sets enumFormStringArray */
public enum EnumFormStringArrayEnum {
GREATER_THAN(">"),
DOLLAR("$");
private String value;
EnumFormStringArrayEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumFormStringArrayEnum fromValue(String value) {
for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_FORM_STRING_ARRAY = "enum_form_string_array";
private List<EnumFormStringArrayEnum> enumFormStringArray = null;
/** Form parameter enum test (string) */
public enum EnumFormStringEnum {
_ABC("_abc"),
_EFG("-efg"),
_XYZ_("(xyz)");
private String value;
EnumFormStringEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumFormStringEnum fromValue(String value) {
for (EnumFormStringEnum b : EnumFormStringEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_FORM_STRING = "enum_form_string";
private EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG;
public InlineObject2 enumFormStringArray(List<EnumFormStringArrayEnum> enumFormStringArray) {
this.enumFormStringArray = enumFormStringArray;
return this;
}
public InlineObject2 addEnumFormStringArrayItem(EnumFormStringArrayEnum enumFormStringArrayItem) {
if (this.enumFormStringArray == null) {
this.enumFormStringArray = new ArrayList<EnumFormStringArrayEnum>();
}
this.enumFormStringArray.add(enumFormStringArrayItem);
return this;
}
/**
* Form parameter enum test (string array)
*
* @return enumFormStringArray
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Form parameter enum test (string array)")
@JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING_ARRAY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<EnumFormStringArrayEnum> getEnumFormStringArray() {
return enumFormStringArray;
}
public void setEnumFormStringArray(List<EnumFormStringArrayEnum> enumFormStringArray) {
this.enumFormStringArray = enumFormStringArray;
}
public InlineObject2 enumFormString(EnumFormStringEnum enumFormString) {
this.enumFormString = enumFormString;
return this;
}
/**
* Form parameter enum test (string)
*
* @return enumFormString
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Form parameter enum test (string)")
@JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumFormStringEnum getEnumFormString() {
return enumFormString;
}
public void setEnumFormString(EnumFormStringEnum enumFormString) {
this.enumFormString = enumFormString;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject2 inlineObject2 = (InlineObject2) o;
return Objects.equals(this.enumFormStringArray, inlineObject2.enumFormStringArray)
&& Objects.equals(this.enumFormString, inlineObject2.enumFormString);
}
@Override
public int hashCode() {
return Objects.hash(enumFormStringArray, enumFormString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject2 {\n");
sb.append(" enumFormStringArray: ")
.append(toIndentedString(enumFormStringArray))
.append("\n");
sb.append(" enumFormString: ").append(toIndentedString(enumFormString)).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

@@ -0,0 +1,481 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Objects;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
/** InlineObject3 */
@JsonPropertyOrder({
InlineObject3.JSON_PROPERTY_INTEGER,
InlineObject3.JSON_PROPERTY_INT32,
InlineObject3.JSON_PROPERTY_INT64,
InlineObject3.JSON_PROPERTY_NUMBER,
InlineObject3.JSON_PROPERTY_FLOAT,
InlineObject3.JSON_PROPERTY_DOUBLE,
InlineObject3.JSON_PROPERTY_STRING,
InlineObject3.JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER,
InlineObject3.JSON_PROPERTY_BYTE,
InlineObject3.JSON_PROPERTY_BINARY,
InlineObject3.JSON_PROPERTY_DATE,
InlineObject3.JSON_PROPERTY_DATE_TIME,
InlineObject3.JSON_PROPERTY_PASSWORD,
InlineObject3.JSON_PROPERTY_CALLBACK
})
public class InlineObject3 {
public static final String JSON_PROPERTY_INTEGER = "integer";
private Integer integer;
public static final String JSON_PROPERTY_INT32 = "int32";
private Integer int32;
public static final String JSON_PROPERTY_INT64 = "int64";
private Long int64;
public static final String JSON_PROPERTY_NUMBER = "number";
private BigDecimal number;
public static final String JSON_PROPERTY_FLOAT = "float";
private Float _float;
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
public static final String JSON_PROPERTY_STRING = "string";
private String string;
public static final String JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER = "pattern_without_delimiter";
private String patternWithoutDelimiter;
public static final String JSON_PROPERTY_BYTE = "byte";
private byte[] _byte;
public static final String JSON_PROPERTY_BINARY = "binary";
private File binary;
public static final String JSON_PROPERTY_DATE = "date";
private LocalDate date;
public static final String JSON_PROPERTY_DATE_TIME = "dateTime";
private OffsetDateTime dateTime;
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
public static final String JSON_PROPERTY_CALLBACK = "callback";
private String callback;
public InlineObject3 integer(Integer integer) {
this.integer = integer;
return this;
}
/**
* None minimum: 10 maximum: 100
*
* @return integer
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
public InlineObject3 int32(Integer int32) {
this.int32 = int32;
return this;
}
/**
* None minimum: 20 maximum: 200
*
* @return int32
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_INT32)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
public InlineObject3 int64(Long int64) {
this.int64 = int64;
return this;
}
/**
* None
*
* @return int64
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_INT64)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
public InlineObject3 number(BigDecimal number) {
this.number = number;
return this;
}
/**
* None minimum: 32.1 maximum: 543.2
*
* @return number
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
public InlineObject3 _float(Float _float) {
this._float = _float;
return this;
}
/**
* None maximum: 987.6
*
* @return _float
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
public InlineObject3 _double(Double _double) {
this._double = _double;
return this;
}
/**
* None minimum: 67.8 maximum: 123.4
*
* @return _double
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
public InlineObject3 string(String string) {
this.string = string;
return this;
}
/**
* None
*
* @return string
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
public InlineObject3 patternWithoutDelimiter(String patternWithoutDelimiter) {
this.patternWithoutDelimiter = patternWithoutDelimiter;
return this;
}
/**
* None
*
* @return patternWithoutDelimiter
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPatternWithoutDelimiter() {
return patternWithoutDelimiter;
}
public void setPatternWithoutDelimiter(String patternWithoutDelimiter) {
this.patternWithoutDelimiter = patternWithoutDelimiter;
}
public InlineObject3 _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/**
* None
*
* @return _byte
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
public InlineObject3 binary(File binary) {
this.binary = binary;
return this;
}
/**
* None
*
* @return binary
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_BINARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getBinary() {
return binary;
}
public void setBinary(File binary) {
this.binary = binary;
}
public InlineObject3 date(LocalDate date) {
this.date = date;
return this;
}
/**
* None
*
* @return date
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public InlineObject3 dateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* None
*
* @return dateTime
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() {
return dateTime;
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public InlineObject3 password(String password) {
this.password = password;
return this;
}
/**
* None
*
* @return password
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public InlineObject3 callback(String callback) {
this.callback = callback;
return this;
}
/**
* None
*
* @return callback
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_CALLBACK)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCallback() {
return callback;
}
public void setCallback(String callback) {
this.callback = callback;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject3 inlineObject3 = (InlineObject3) o;
return Objects.equals(this.integer, inlineObject3.integer)
&& Objects.equals(this.int32, inlineObject3.int32)
&& Objects.equals(this.int64, inlineObject3.int64)
&& Objects.equals(this.number, inlineObject3.number)
&& Objects.equals(this._float, inlineObject3._float)
&& Objects.equals(this._double, inlineObject3._double)
&& Objects.equals(this.string, inlineObject3.string)
&& Objects.equals(this.patternWithoutDelimiter, inlineObject3.patternWithoutDelimiter)
&& Arrays.equals(this._byte, inlineObject3._byte)
&& Objects.equals(this.binary, inlineObject3.binary)
&& Objects.equals(this.date, inlineObject3.date)
&& Objects.equals(this.dateTime, inlineObject3.dateTime)
&& Objects.equals(this.password, inlineObject3.password)
&& Objects.equals(this.callback, inlineObject3.callback);
}
@Override
public int hashCode() {
return Objects.hash(
integer,
int32,
int64,
number,
_float,
_double,
string,
patternWithoutDelimiter,
Arrays.hashCode(_byte),
binary,
date,
dateTime,
password,
callback);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject3 {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" patternWithoutDelimiter: ")
.append(toIndentedString(patternWithoutDelimiter))
.append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" callback: ").append(toIndentedString(callback)).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

@@ -0,0 +1,111 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** InlineObject4 */
@JsonPropertyOrder({InlineObject4.JSON_PROPERTY_PARAM, InlineObject4.JSON_PROPERTY_PARAM2})
public class InlineObject4 {
public static final String JSON_PROPERTY_PARAM = "param";
private String param;
public static final String JSON_PROPERTY_PARAM2 = "param2";
private String param2;
public InlineObject4 param(String param) {
this.param = param;
return this;
}
/**
* field1
*
* @return param
*/
@ApiModelProperty(required = true, value = "field1")
@JsonProperty(JSON_PROPERTY_PARAM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
public InlineObject4 param2(String param2) {
this.param2 = param2;
return this;
}
/**
* field2
*
* @return param2
*/
@ApiModelProperty(required = true, value = "field2")
@JsonProperty(JSON_PROPERTY_PARAM2)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getParam2() {
return param2;
}
public void setParam2(String param2) {
this.param2 = param2;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject4 inlineObject4 = (InlineObject4) o;
return Objects.equals(this.param, inlineObject4.param)
&& Objects.equals(this.param2, inlineObject4.param2);
}
@Override
public int hashCode() {
return Objects.hash(param, param2);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject4 {\n");
sb.append(" param: ").append(toIndentedString(param)).append("\n");
sb.append(" param2: ").append(toIndentedString(param2)).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

@@ -0,0 +1,116 @@
/*
* OpenAPI 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: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.util.Objects;
/** InlineObject5 */
@JsonPropertyOrder({
InlineObject5.JSON_PROPERTY_ADDITIONAL_METADATA,
InlineObject5.JSON_PROPERTY_REQUIRED_FILE
})
public class InlineObject5 {
public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata";
private String additionalMetadata;
public static final String JSON_PROPERTY_REQUIRED_FILE = "requiredFile";
private File requiredFile;
public InlineObject5 additionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
return this;
}
/**
* Additional data to pass to server
*
* @return additionalMetadata
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Additional data to pass to server")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAdditionalMetadata() {
return additionalMetadata;
}
public void setAdditionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
}
public InlineObject5 requiredFile(File requiredFile) {
this.requiredFile = requiredFile;
return this;
}
/**
* file to upload
*
* @return requiredFile
*/
@ApiModelProperty(required = true, value = "file to upload")
@JsonProperty(JSON_PROPERTY_REQUIRED_FILE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public File getRequiredFile() {
return requiredFile;
}
public void setRequiredFile(File requiredFile) {
this.requiredFile = requiredFile;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject5 inlineObject5 = (InlineObject5) o;
return Objects.equals(this.additionalMetadata, inlineObject5.additionalMetadata)
&& Objects.equals(this.requiredFile, inlineObject5.requiredFile);
}
@Override
public int hashCode() {
return Objects.hash(additionalMetadata, requiredFile);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject5 {\n");
sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n");
sb.append(" requiredFile: ").append(toIndentedString(requiredFile)).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,58 +10,43 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* AdditionalPropertiesObject
*/
@JsonPropertyOrder({
AdditionalPropertiesObject.JSON_PROPERTY_NAME
})
/** InlineResponseDefault */
@JsonPropertyOrder({InlineResponseDefault.JSON_PROPERTY_STRING})
public class InlineResponseDefault {
public static final String JSON_PROPERTY_STRING = "string";
private Foo string;
public class AdditionalPropertiesObject extends HashMap<String, Map> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public InlineResponseDefault string(Foo string) {
public AdditionalPropertiesObject name(String name) {
this.name = name;
this.string = string;
return this;
}
/**
* Get name
* @return name
**/
* Get string
*
* @return string
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
public Foo getString() {
return string;
}
public void setName(String name) {
this.name = name;
public void setString(Foo string) {
this.string = string;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -70,30 +55,26 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
return Objects.equals(this.name, additionalPropertiesObject.name) &&
super.equals(o);
InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o;
return Objects.equals(this.string, inlineResponseDefault.string);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
return Objects.hash(string);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesObject {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("class InlineResponseDefault {\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -101,6 +82,4 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,39 +10,30 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* MapTest
*/
/** MapTest */
@JsonPropertyOrder({
MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING,
MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING,
MapTest.JSON_PROPERTY_DIRECT_MAP,
MapTest.JSON_PROPERTY_INDIRECT_MAP
})
public class MapTest {
public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string";
private Map<String, Map<String, String>> mapMapOfString = null;
/**
* Gets or Sets inner
*/
/** Gets or Sets inner */
public enum InnerEnum {
UPPER("UPPER"),
@@ -84,7 +75,6 @@ public class MapTest {
public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map";
private Map<String, Boolean> indirectMap = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
@@ -101,23 +91,21 @@ public class MapTest {
/**
* Get mapMapOfString
*
* @return mapMapOfString
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
@@ -134,23 +122,21 @@ public class MapTest {
/**
* Get mapOfEnumString
*
* @return mapOfEnumString
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
public MapTest directMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
@@ -167,23 +153,21 @@ public class MapTest {
/**
* Get directMap
*
* @return directMap
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getDirectMap() {
return directMap;
}
public void setDirectMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
}
public MapTest indirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
@@ -200,23 +184,21 @@ public class MapTest {
/**
* Get indirectMap
*
* @return indirectMap
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INDIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getIndirectMap() {
return indirectMap;
}
public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -226,10 +208,10 @@ public class MapTest {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
Objects.equals(this.directMap, mapTest.directMap) &&
Objects.equals(this.indirectMap, mapTest.indirectMap);
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString)
&& Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString)
&& Objects.equals(this.directMap, mapTest.directMap)
&& Objects.equals(this.indirectMap, mapTest.indirectMap);
}
@Override
@@ -237,7 +219,6 @@ public class MapTest {
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -251,8 +232,7 @@ public class MapTest {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -260,6 +240,4 @@ public class MapTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,34 +10,24 @@
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import org.openapitools.client.model.Animal;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
/** MixedPropertiesAndAdditionalPropertiesClass */
@JsonPropertyOrder({
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP
})
public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_UUID = "uuid";
private UUID uuid;
@@ -48,7 +38,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP = "map";
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
@@ -57,23 +46,21 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
/**
* Get uuid
*
* @return uuid
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
@@ -82,23 +69,21 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
/**
* Get dateTime
*
* @return dateTime
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() {
return dateTime;
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
@@ -115,23 +100,21 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
/**
* Get map
*
* @return map
**/
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
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) {
@@ -140,10 +123,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
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);
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass =
(MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid)
&& Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime)
&& Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
@Override
@@ -151,7 +135,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -164,8 +147,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
* 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) {
@@ -173,6 +155,4 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
return o.toString().replace("\n", "\n ");
}
}

Some files were not shown because too many files have changed in this diff Show More