From 77d6c04b2423ef2a4702ab8640d02e1f04a70d61 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sat, 2 May 2020 08:31:45 -0700 Subject: [PATCH] [Java] Enhancements for HTTP message signature (#6090) * Add code comments * Change 'setup' method to setPrivateKey * Add support for configuring digest algorithm * run script in bin directory * format generated code * Revert "format generated code" This reverts commit 3b527784375bcf86cacf75bd0142f63b91c96ff8. --- .../auth/HttpSignatureAuth.mustache | 99 +- .../org/openapitools/client/ApiClient.java | 496 +++---- .../org/openapitools/client/ApiException.java | 134 +- .../org/openapitools/client/ApiResponse.java | 91 +- .../openapitools/client/Configuration.java | 42 +- .../client/CustomInstantDeserializer.java | 272 ++-- .../java/org/openapitools/client/JSON.java | 16 +- .../java/org/openapitools/client/Pair.java | 68 +- .../client/RFC3339DateFormat.java | 7 +- .../client/ServerConfiguration.java | 99 +- .../openapitools/client/ServerVariable.java | 31 +- .../org/openapitools/client/StringUtil.java | 13 +- .../client/api/AnotherFakeApi.java | 80 +- .../openapitools/client/api/DefaultApi.java | 75 +- .../org/openapitools/client/api/FakeApi.java | 1242 +++++++---------- .../client/api/FakeClassnameTags123Api.java | 80 +- .../org/openapitools/client/api/PetApi.java | 632 ++++----- .../org/openapitools/client/api/StoreApi.java | 289 ++-- .../org/openapitools/client/api/UserApi.java | 534 ++++--- .../openapitools/client/auth/ApiKeyAuth.java | 22 +- .../client/auth/Authentication.java | 36 +- .../client/auth/HttpBasicAuth.java | 31 +- .../client/auth/HttpBearerAuth.java | 33 +- .../client/auth/HttpSignatureAuth.java | 140 +- .../org/openapitools/client/auth/OAuth.java | 22 +- .../openapitools/client/auth/OAuthFlow.java | 8 +- .../client/model/AbstractOpenApiSchema.java | 80 +- .../model/AdditionalPropertiesClass.java | 52 +- .../org/openapitools/client/model/Animal.java | 59 +- .../model/ArrayOfArrayOfNumberOnly.java | 37 +- .../client/model/ArrayOfNumberOnly.java | 37 +- .../openapitools/client/model/ArrayTest.java | 64 +- .../client/model/Capitalization.java | 100 +- .../org/openapitools/client/model/Cat.java | 42 +- .../openapitools/client/model/CatAllOf.java | 37 +- .../openapitools/client/model/Category.java | 51 +- .../openapitools/client/model/ClassModel.java | 36 +- .../org/openapitools/client/model/Client.java | 37 +- .../org/openapitools/client/model/Dog.java | 42 +- .../openapitools/client/model/DogAllOf.java | 37 +- .../openapitools/client/model/EnumArrays.java | 64 +- .../openapitools/client/model/EnumClass.java | 16 +- .../openapitools/client/model/EnumTest.java | 186 +-- .../client/model/FileSchemaTestClass.java | 47 +- .../org/openapitools/client/model/Foo.java | 37 +- .../openapitools/client/model/FormatTest.java | 256 ++-- .../client/model/HasOnlyReadOnly.java | 50 +- .../client/model/HealthCheckResult.java | 46 +- .../client/model/InlineObject.java | 52 +- .../client/model/InlineObject1.java | 47 +- .../client/model/InlineObject2.java | 65 +- .../client/model/InlineObject3.java | 231 +-- .../client/model/InlineObject4.java | 52 +- .../client/model/InlineObject5.java | 47 +- .../client/model/InlineResponseDefault.java | 38 +- .../openapitools/client/model/MapTest.java | 78 +- ...ropertiesAndAdditionalPropertiesClass.java | 64 +- .../client/model/Model200Response.java | 46 +- .../client/model/ModelApiResponse.java | 59 +- .../client/model/ModelReturn.java | 36 +- .../org/openapitools/client/model/Name.java | 68 +- .../client/model/NullableClass.java | 277 ++-- .../openapitools/client/model/NumberOnly.java | 37 +- .../org/openapitools/client/model/Order.java | 103 +- .../client/model/OuterComposite.java | 59 +- .../openapitools/client/model/OuterEnum.java | 16 +- .../client/model/OuterEnumDefaultValue.java | 16 +- .../client/model/OuterEnumInteger.java | 16 +- .../model/OuterEnumIntegerDefaultValue.java | 16 +- .../org/openapitools/client/model/Pet.java | 105 +- .../client/model/ReadOnlyFirst.java | 51 +- .../client/model/SpecialModelName.java | 41 +- .../org/openapitools/client/model/Tag.java | 51 +- .../org/openapitools/client/model/User.java | 119 +- .../openapitools/client/api/FakeApiTest.java | 2 +- 75 files changed, 4188 insertions(+), 3609 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpSignatureAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpSignatureAuth.mustache index 3a856e3bc3c..e56e0d22910 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpSignatureAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpSignatureAuth.mustache @@ -19,42 +19,110 @@ import java.util.List; import org.tomitribe.auth.signatures.*; +/** + * A Configuration object for the HTTP message signature security scheme. + */ public class HttpSignatureAuth implements Authentication { private Signer signer; - private String name; + // An opaque string that the server can use to look up the component they need to validate the signature. + private String keyId; + // The HTTP signature algorithm. private Algorithm algorithm; + // The list of HTTP headers that should be included in the HTTP signature. private List headers; - public HttpSignatureAuth(String name, Algorithm algorithm, List headers) { - this.name = name; + // The digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + private String digestAlgorithm; + + /** + * Construct a new HTTP signature auth configuration object. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + * @param algorithm The signature algorithm. + * @param headers The list of HTTP headers that should be included in the HTTP signature. + */ + public HttpSignatureAuth(String keyId, Algorithm algorithm, List headers) { + this.keyId = keyId; this.algorithm = algorithm; this.headers = headers; + this.digestAlgorithm = "SHA-256"; } - public String getName() { - return name; + /** + * Returns the opaque string that the server can use to look up the component they need to validate the signature. + * + * @return The keyId. + */ + public String getKeyId() { + return keyId; } - public void setName(String name) { - this.name = name; + /** + * Set the HTTP signature key id. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + */ + public void setKeyId(String keyId) { + this.keyId = keyId; } + /** + * Returns the HTTP signature algorithm which is used to sign HTTP requests. + */ public Algorithm getAlgorithm() { return algorithm; } + /** + * Sets the HTTP signature algorithm which is used to sign HTTP requests. + * + * @param algorithm The HTTP signature algorithm. + */ public void setAlgorithm(Algorithm algorithm) { this.algorithm = algorithm; } + /** + * Returns the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * @see java.security.MessageDigest + */ + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * The exact list of supported digest algorithms depends on the installed security providers. + * Every implementation of the Java platform is required to support "MD5", "SHA-1" and "SHA-256". + * Do not use "MD5" and "SHA-1", they are vulnerable to multiple known attacks. + * By default, "SHA-256" is used. + * + * @param digestAlgorithm The digest algorithm. + * + * @see java.security.MessageDigest + */ + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Returns the list of HTTP headers that should be included in the HTTP signature. + */ public List getHeaders() { return headers; } + /** + * Sets the list of HTTP headers that should be included in the HTTP signature. + * + * @param headers The HTTP headers. + */ public void setHeaders(List headers) { this.headers = headers; } @@ -67,12 +135,17 @@ public class HttpSignatureAuth implements Authentication { this.signer = signer; } - public void setup(Key key) throws ApiException { + /** + * Set the private key used to sign HTTP requests using the HTTP signature scheme. + * + * @param key The private key. + */ + public void setPrivateKey(Key key) throws ApiException { if (key == null) { - throw new ApiException("key (java.security.Key) cannot be null"); + throw new ApiException("Private key (java.security.Key) cannot be null"); } - signer = new Signer(key, new Signature(name, algorithm, null, headers)); + signer = new Signer(key, new Signature(keyId, algorithm, null, headers)); } @Override @@ -88,11 +161,13 @@ public class HttpSignatureAuth implements Authentication { } if (headers.contains("digest")) { - headerParams.put("digest", "SHA-256=" + new String(Base64.getEncoder().encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes())))); + headerParams.put("digest", + this.digestAlgorithm + "=" + + new String(Base64.getEncoder().encode(MessageDigest.getInstance(this.digestAlgorithm).digest(payload.getBytes())))); } if (signer == null) { - throw new ApiException("Signer cannot be null. Please run the method `setup` to set it up correctly"); + throw new ApiException("Signer cannot be null. Please call the method `setPrivateKey` to set it up correctly"); } // construct the path with the URL query string diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiClient.java index fdbba2916ec..ea977a7db5f 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiClient.java @@ -1,26 +1,5 @@ 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; @@ -31,97 +10,135 @@ 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 org.openapitools.client.auth.ApiKeyAuth; + +import java.io.IOException; +import java.io.InputStream; + +import java.net.URI; +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.Authentication; import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.HttpSignatureAuth; -import org.openapitools.client.auth.OAuth; +import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.model.AbstractOpenApiSchema; +import org.openapitools.client.auth.OAuth; + + public class ApiClient { protected Map defaultHeaderMap = new HashMap(); protected Map defaultCookieMap = new HashMap(); protected String basePath = "http://petstore.swagger.io:80/v2"; - protected List servers = - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "http://{server}.swagger.io:{port}/v2", - "petstore server", - new HashMap() { - { - put( - "server", - new ServerVariable( - "No description provided", - "petstore", - new HashSet( - Arrays.asList("petstore", "qa-petstore", "dev-petstore")))); - put( - "port", - new ServerVariable( - "No description provided", - "80", - new HashSet(Arrays.asList("80", "8080")))); - } - }), - new ServerConfiguration( - "https://localhost:8080/{version}", - "The local server", - new HashMap() { - { - put( - "version", - new ServerVariable( - "No description provided", - "v2", - new HashSet(Arrays.asList("v1", "v2")))); - } - }))); + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://{server}.swagger.io:{port}/v2", + "petstore server", + new HashMap() {{ + put("server", new ServerVariable( + "No description provided", + "petstore", + new HashSet( + Arrays.asList( + "petstore", + "qa-petstore", + "dev-petstore" + ) + ) + )); + put("port", new ServerVariable( + "No description provided", + "80", + new HashSet( + Arrays.asList( + "80", + "8080" + ) + ) + )); + }} + ), + new ServerConfiguration( + "https://localhost:8080/{version}", + "The local server", + new HashMap() {{ + put("version", new ServerVariable( + "No description provided", + "v2", + new HashSet( + Arrays.asList( + "v1", + "v2" + ) + ) + )); + }} + ) + )); protected Integer serverIndex = 0; protected Map serverVariables = null; - protected Map> operationServers = - new HashMap>() { - { - put( - "PetApi.addPet", - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "http://petstore.swagger.io/v2", - "No description provided", - new HashMap()), - new ServerConfiguration( - "http://path-server-test.petstore.local/v2", - "No description provided", - new HashMap())))); - put( - "PetApi.updatePet", - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "http://petstore.swagger.io/v2", - "No description provided", - new HashMap()), - new ServerConfiguration( - "http://path-server-test.petstore.local/v2", - "No description provided", - new HashMap())))); - } - }; + protected Map> operationServers = new HashMap>() {{ + put("PetApi.addPet", new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://petstore.swagger.io/v2", + "No description provided", + new HashMap() + ), + + new ServerConfiguration( + "http://path-server-test.petstore.local/v2", + "No description provided", + new HashMap() + ) + ))); + put("PetApi.updatePet", new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://petstore.swagger.io/v2", + "No description provided", + new HashMap() + ), + + new ServerConfiguration( + "http://path-server-test.petstore.local/v2", + "No description provided", + new HashMap() + ) + ))); + }}; protected Map operationServerIndex = new HashMap(); - protected Map> operationServerVariables = - new HashMap>(); + protected Map> operationServerVariables = new HashMap>(); protected boolean debugging = false; protected int connectionTimeout = 0; private int readTimeout = 0; @@ -150,8 +167,7 @@ public class ApiClient { 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("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); @@ -162,7 +178,6 @@ public class ApiClient { /** * Gets the JSON instance to do JSON serialization and deserialization. - * * @return JSON */ public JSON getJSON() { @@ -216,7 +231,6 @@ public class ApiClient { /** * Get authentications (key: authentication name, value: authentication). - * * @return Map of authentication object */ public Map getAuthentications() { @@ -235,7 +249,6 @@ public class ApiClient { /** * Helper method to set username for the first HTTP basic authentication. - * * @param username Username */ public void setUsername(String username) { @@ -250,7 +263,6 @@ public class ApiClient { /** * Helper method to set password for the first HTTP basic authentication. - * * @param password Password */ public void setPassword(String password) { @@ -265,7 +277,6 @@ 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) { @@ -299,7 +310,6 @@ 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) { @@ -314,7 +324,6 @@ public class ApiClient { /** * Helper method to set bearer token for the first Bearer authentication. - * * @param bearerToken Bearer token */ public void setBearerToken(String bearerToken) { @@ -329,7 +338,6 @@ public class ApiClient { /** * Helper method to set access token for the first OAuth2 authentication. - * * @param accessToken Access token */ public void setAccessToken(String accessToken) { @@ -344,7 +352,6 @@ 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 */ @@ -379,7 +386,6 @@ public class ApiClient { /** * Check that whether debugging is enabled for this API client. - * * @return True if debugging is switched on */ public boolean isDebugging() { @@ -400,8 +406,9 @@ public class ApiClient { } /** - * The path of temporary folder used to store downloaded files from endpoints with file response. - * The default value is null, 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 null, i.e. using + * the system's default tempopary folder. * * @return Temp folder path */ @@ -411,7 +418,6 @@ public class ApiClient { /** * Set temp folder path - * * @param tempFolderPath Temp folder path * @return API client */ @@ -422,7 +428,6 @@ public class ApiClient { /** * Connect timeout (in milliseconds). - * * @return Connection timeout */ public int getConnectTimeout() { @@ -430,9 +435,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 */ @@ -444,7 +449,6 @@ public class ApiClient { /** * read timeout (in milliseconds). - * * @return Read timeout */ public int getReadTimeout() { @@ -452,9 +456,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 */ @@ -466,7 +470,6 @@ public class ApiClient { /** * Get the date format used to parse/format date parameters. - * * @return Date format */ public DateFormat getDateFormat() { @@ -475,7 +478,6 @@ public class ApiClient { /** * Set the date format used to parse/format date parameters. - * * @param dateFormat Date format * @return API client */ @@ -488,7 +490,6 @@ public class ApiClient { /** * Parse the given string into Date object. - * * @param str String * @return Date */ @@ -502,7 +503,6 @@ public class ApiClient { /** * Format the given Date object into string. - * * @param date Date * @return Date in string format */ @@ -512,7 +512,6 @@ public class ApiClient { /** * Format the given parameter object into string. - * * @param param Object * @return Object in string format */ @@ -523,8 +522,8 @@ public class ApiClient { return formatDate((Date) param); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { + for(Object o : (Collection)param) { + if(b.length() > 0) { b.append(','); } b.append(String.valueOf(o)); @@ -542,7 +541,7 @@ public class ApiClient { * @param value Value * @return List of pairs */ - public List parameterToPairs(String collectionFormat, String name, Object value) { + public List parameterToPairs(String collectionFormat, String name, Object value){ List params = new ArrayList(); // preconditions @@ -556,13 +555,12 @@ public class ApiClient { return params; } - if (valueCollection.isEmpty()) { + if (valueCollection.isEmpty()){ return params; } // 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)) { @@ -585,7 +583,7 @@ public class ApiClient { delimiter = "|"; } - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new StringBuilder() ; for (Object item : valueCollection) { sb.append(delimiter); sb.append(parameterToString(item)); @@ -597,9 +595,13 @@ 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 */ @@ -609,12 +611,13 @@ 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) { @@ -629,11 +632,13 @@ 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) { @@ -649,7 +654,6 @@ public class ApiClient { /** * Escape the given string to be used as URL query value. - * * @param str String * @return Escaped string */ @@ -662,41 +666,33 @@ 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 formParams, String contentType) - throws ApiException { + public Entity serialize(Object obj, Map formParams, String contentType) throws ApiException { Entity entity; if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); - for (Entry param : formParams.entrySet()) { + for (Entry 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); } else if (contentType.startsWith("application/x-www-form-urlencoded")) { Form form = new Form(); - for (Entry param : formParams.entrySet()) { + for (Entry param: formParams.entrySet()) { form.param(param.getKey(), parameterToString(param.getValue())); } entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); @@ -708,29 +704,22 @@ public class ApiClient { } /** - * Serialize the given Java object into string according the given Content-Type (only JSON, HTTP - * form is supported for now). - * + * 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 formParams, String contentType) - throws ApiException { + public String serializeToString(Object obj, Map 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)"); + 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 param : formParams.entrySet()) { - formString = - param.getKey() - + "=" - + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") - + "&"; + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; } if (formString.length() == 0) { // empty string @@ -746,8 +735,7 @@ public class ApiClient { } } - public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) - throws ApiException { + public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{ Object result = null; int matchCounter = 0; @@ -769,44 +757,35 @@ 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."); + } else {// unknown type + 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()); + 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()); } 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 Type * @param response Response * @param returnType Return type @@ -841,7 +820,6 @@ 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 @@ -849,10 +827,7 @@ 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); @@ -866,7 +841,8 @@ 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; @@ -883,11 +859,14 @@ 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)); } /** @@ -910,21 +889,7 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public ApiResponse invokeAPI( - String operation, - String path, - String method, - List queryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String accept, - String contentType, - String[] authNames, - GenericType returnType, - AbstractOpenApiSchema schema) - throws ApiException { + public ApiResponse invokeAPI(String operation, String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType, AbstractOpenApiSchema schema) throws ApiException { // Not using `.target(targetURL).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -944,10 +909,9 @@ 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 { @@ -1002,16 +966,9 @@ public class ApiClient { Map 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()); + updateParamsForAuth(authNames, queryParams, allHeaderParams, cookieParams, serializeToString(body, formParams, contentType), method, target.getUri()); Response response = null; @@ -1042,13 +999,14 @@ 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) { - return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType)); - } else { // oneOf/anyOf - return new ApiResponse<>( - statusCode, responseHeaders, (T) deserializeSchemas(response, schema)); - } + 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)); + } } else { String message = "error"; String respBody = null; @@ -1061,53 +1019,30 @@ 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 ApiResponse invokeAPI( - String path, - String method, - List queryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String accept, - String contentType, - String[] authNames, - GenericType returnType, - AbstractOpenApiSchema schema) - throws ApiException { - return invokeAPI( - null, - path, - method, - queryParams, - body, - headerParams, - cookieParams, - formParams, - accept, - contentType, - authNames, - returnType, - schema); + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType 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 */ @@ -1120,21 +1055,13 @@ 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); @@ -1146,7 +1073,7 @@ public class ApiClient { protected Map> buildResponseHeaders(Response response) { Map> responseHeaders = new HashMap>(); - for (Entry> entry : response.getHeaders().entrySet()) { + for (Entry> entry: response.getHeaders().entrySet()) { List values = entry.getValue(); List headers = new ArrayList(); for (Object o : values) { @@ -1167,15 +1094,8 @@ public class ApiClient { * @param method HTTP method (e.g. POST) * @param uri HTTP URI */ - protected void updateParamsForAuth( - String[] authNames, - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiException.java index 3c2d12abf55..3612265bc61 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiException.java @@ -3,96 +3,92 @@ * 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; -import java.util.List; import java.util.Map; +import java.util.List; + +/** + * API Exception + */ -/** API Exception */ public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; - public ApiException() {} + public ApiException() {} - public ApiException(Throwable throwable) { - super(throwable); - } + public ApiException(Throwable throwable) { + super(throwable); + } - public ApiException(String message) { - super(message); - } + public ApiException(String message) { + super(message); + } - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders, - String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } - public ApiException( - String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } - public ApiException( - String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } - public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); - } + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } - public ApiException(int code, String message) { - super(message); - this.code = code; - } + public ApiException(int code, String message) { + super(message); + this.code = code; + } - public ApiException( - int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiResponse.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiResponse.java index 5dcb28d7a53..5f3daf26600 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiResponse.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ApiResponse.java @@ -3,13 +3,14 @@ * 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; import java.util.List; @@ -21,53 +22,53 @@ import java.util.Map; * @param The type of data that is deserialized from response body */ public class ApiResponse { - private final int statusCode; - private final Map> headers; - private final T data; + private final int statusCode; + private final Map> headers; + private final T data; - /** - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } - /** - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } - /** - * Get the status code - * - * @return status code - */ - public int getStatusCode() { - return statusCode; - } + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } - /** - * Get the headers - * - * @return map of headers - */ - public Map> getHeaders() { - return headers; - } + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } - /** - * Get the data - * - * @return data - */ - public T getData() { - return data; - } + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Configuration.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Configuration.java index 107ad039b0b..acbecda489d 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Configuration.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Configuration.java @@ -3,35 +3,37 @@ * 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; + public class Configuration { - private static ApiClient defaultApiClient = new ApiClient(); + private static ApiClient defaultApiClient = new ApiClient(); - /** - * Get the default API client, which would be used when creating API instances without providing - * an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } - /** - * Set the default API client, which would be used when creating API instances without providing - * an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; - } + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 12541a8636a..83d4514b071 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -9,8 +9,6 @@ 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; @@ -21,10 +19,12 @@ 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,89 +32,84 @@ public class CustomInstantDeserializer extends ThreeTenDateTimeDeserializerBase { private static final long serialVersionUID = 1L; - public static final CustomInstantDeserializer INSTANT = - new CustomInstantDeserializer( - Instant.class, - DateTimeFormatter.ISO_INSTANT, - new Function() { - @Override - public Instant apply(TemporalAccessor temporalAccessor) { - return Instant.from(temporalAccessor); - } - }, - new Function() { - @Override - public Instant apply(FromIntegerArguments a) { - return Instant.ofEpochMilli(a.value); - } - }, - new Function() { - @Override - public Instant apply(FromDecimalArguments a) { - return Instant.ofEpochSecond(a.integer, a.fraction); - } - }, - null); + public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( + Instant.class, DateTimeFormatter.ISO_INSTANT, + new Function() { + @Override + public Instant apply(TemporalAccessor temporalAccessor) { + return Instant.from(temporalAccessor); + } + }, + new Function() { + @Override + public Instant apply(FromIntegerArguments a) { + return Instant.ofEpochMilli(a.value); + } + }, + new Function() { + @Override + public Instant apply(FromDecimalArguments a) { + return Instant.ofEpochSecond(a.integer, a.fraction); + } + }, + null + ); - public static final CustomInstantDeserializer OFFSET_DATE_TIME = - new CustomInstantDeserializer( - OffsetDateTime.class, - DateTimeFormatter.ISO_OFFSET_DATE_TIME, - new Function() { - @Override - public OffsetDateTime apply(TemporalAccessor temporalAccessor) { - return OffsetDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromIntegerArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromDecimalArguments a) { - return OffsetDateTime.ofInstant( - Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { - return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); - } - }); + public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + new Function() { + @Override + public OffsetDateTime apply(TemporalAccessor temporalAccessor) { + return OffsetDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromIntegerArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromDecimalArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { + return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); + } + } + ); - public static final CustomInstantDeserializer ZONED_DATE_TIME = - new CustomInstantDeserializer( - ZonedDateTime.class, - DateTimeFormatter.ISO_ZONED_DATE_TIME, - new Function() { - @Override - public ZonedDateTime apply(TemporalAccessor temporalAccessor) { - return ZonedDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromIntegerArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromDecimalArguments a) { - return ZonedDateTime.ofInstant( - Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { - return zonedDateTime.withZoneSameInstant(zoneId); - } - }); + public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + new Function() { + @Override + public ZonedDateTime apply(TemporalAccessor temporalAccessor) { + return ZonedDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromIntegerArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromDecimalArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { + return zonedDateTime.withZoneSameInstant(zoneId); + } + } + ); protected final Function fromMilliseconds; @@ -124,26 +119,22 @@ public class CustomInstantDeserializer protected final BiFunction adjust; - protected CustomInstantDeserializer( - Class supportedType, - DateTimeFormatter parser, - Function parsedToValue, - Function fromMilliseconds, - Function fromNanoseconds, - BiFunction adjust) { + protected CustomInstantDeserializer(Class supportedType, + DateTimeFormatter parser, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust) { super(supportedType, parser); this.parsedToValue = parsedToValue; this.fromMilliseconds = fromMilliseconds; this.fromNanoseconds = fromNanoseconds; - this.adjust = - adjust == null - ? new BiFunction() { - @Override - public T apply(T t, ZoneId zoneId) { - return t; - } - } - : adjust; + this.adjust = adjust == null ? new BiFunction() { + @Override + public T apply(T t, ZoneId zoneId) { + return t; + } + } : adjust; } @SuppressWarnings("unchecked") @@ -165,50 +156,49 @@ public class CustomInstantDeserializer @Override public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { - // NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only - // string values have to be adjusted to the configured TZ. + //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: - { - BigDecimal value = parser.getDecimalValue(); - long seconds = value.longValue(); - int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); - return fromNanoseconds.apply( - new FromDecimalArguments(seconds, nanoseconds, getZone(context))); - } + 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))); + } - 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.fromMilliseconds.apply( - new FromIntegerArguments(timestamp, this.getZone(context))); + 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.fromMilliseconds.apply(new FromIntegerArguments( + timestamp, this.getZone(context) + )); + } - case JsonTokenId.ID_STRING: - { - String string = parser.getText().trim(); - if (string.length() == 0) { - return null; - } - if (string.endsWith("+0000")) { - string = string.substring(0, string.length() - 5) + "Z"; - } - T value; - try { - TemporalAccessor acc = _formatter.parse(string); - value = parsedToValue.apply(acc); - if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { - return adjust.apply(value, this.getZone(context)); - } - } catch (DateTimeException e) { - throw _peelDTE(e); - } - return value; + case JsonTokenId.ID_STRING: { + String string = parser.getText().trim(); + if (string.length() == 0) { + return null; } + if (string.endsWith("+0000")) { + string = string.substring(0, string.length() - 5) + "Z"; + } + T value; + try { + TemporalAccessor acc = _formatter.parse(string); + value = parsedToValue.apply(acc); + if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { + return adjust.apply(value, this.getZone(context)); + } + } catch (DateTimeException e) { + throw _peelDTE(e); + } + return value; + } } throw context.mappingException("Expected type float, integer, or string."); } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/JSON.java index 51a01470269..1887d6c8851 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/JSON.java @@ -1,12 +1,15 @@ package org.openapitools.client; +import org.threeten.bp.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; -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.*; +import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; + +import java.text.DateFormat; + +import javax.ws.rs.ext.ContextResolver; + public class JSON implements ContextResolver { private ObjectMapper mapper; @@ -31,7 +34,6 @@ public class JSON implements ContextResolver { /** * Set the date format for JSON (de)serialization with Date properties. - * * @param dateFormat Date format */ public void setDateFormat(DateFormat dateFormat) { @@ -48,7 +50,5 @@ public class JSON implements ContextResolver { * * @return object mapper */ - public ObjectMapper getMapper() { - return mapper; - } + public ObjectMapper getMapper() { return mapper; } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Pair.java index ce6aa2ef976..ae89aa61454 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/Pair.java @@ -3,57 +3,59 @@ * 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; + public class Pair { - private String name = ""; - private String value = ""; + private String name = ""; + private String value = ""; - public Pair(String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) { - return; + public Pair (String name, String value) { + setName(name); + setValue(value); } - this.name = name; - } + private void setName(String name) { + if (!isValidString(name)) { + return; + } - private void setValue(String value) { - if (!isValidString(value)) { - return; + this.name = name; } - this.value = value; - } + private void setValue(String value) { + if (!isValidString(value)) { + return; + } - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; + this.value = value; } - if (arg.trim().isEmpty()) { - return false; + public String getName() { + return this.name; } - return true; - } + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + if (arg.trim().isEmpty()) { + return false; + } + + return true; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 8b88105c762..9509fd08981 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -3,7 +3,7 @@ * 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 @@ -14,9 +14,11 @@ 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. @@ -26,4 +28,5 @@ public class RFC3339DateFormat extends ISO8601DateFormat { toAppendTo.append(value); return toAppendTo; } -} + +} \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerConfiguration.java index b307b65c571..a1107a8690e 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -2,58 +2,57 @@ 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; - public Map variables; + public String URL; + public String description; + public Map variables; - /** - * @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. - */ - public ServerConfiguration( - String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable : this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - 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 + "."); - } - } - url = url.replaceAll("\\{" + name + "\\}", value); + /** + * @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. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; } - return url; - } - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + 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 + "."); + } + } + url = url.replaceAll("\\{" + name + "\\}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerVariable.java index f5a0c96ed05..c2f13e21666 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerVariable.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/ServerVariable.java @@ -2,21 +2,22 @@ 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; - public HashSet enumValues = null; + public String description; + public String defaultValue; + public HashSet enumValues = null; - /** - * @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. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } + /** + * @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. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/StringUtil.java index 70cd91e3b29..266c26be3a5 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/StringUtil.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/StringUtil.java @@ -3,15 +3,17 @@ * 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; + public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). @@ -34,11 +36,12 @@ public class StringUtil { /** * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

* - *

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 array The array of strings * @param separator The separator * @return the resulting string */ diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f02739eb772..4d808ec6f5f 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -1,16 +1,20 @@ 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; @@ -42,42 +46,41 @@ public class AnotherFakeApi { } /** - * To test special tags To test special tags and operation ID starting with number - * + * 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 - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ 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 - * + * To test special tags + * To test special tags and operation ID starting with number * @param client client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse call123testSpecialTagsWithHttpInfo(Client client) throws ApiException { Object localVarPostBody = client; - + // verify the required parameter 'client' is set if (client == null) { - throw new ApiException( - 400, "Missing the required parameter 'client' when calling call123testSpecialTags"); + throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); } - + // create path and map variables String localVarPath = "/another-fake/dummy"; @@ -87,29 +90,26 @@ public class AnotherFakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - 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); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/DefaultApi.java index 288cccfa516..eb269e49f80 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -1,16 +1,20 @@ 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.InlineResponseDefault; + 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; @@ -42,30 +46,34 @@ public class DefaultApi { } /** + * + * * @return InlineResponseDefault * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 response -
+ + + +
Status Code Description Response Headers
0 response -
*/ public InlineResponseDefault fooGet() throws ApiException { return fooGetWithHttpInfo().getData(); } /** + * + * * @return ApiResponse<InlineResponseDefault> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 response -
+ + + +
Status Code Description Response Headers
0 response -
*/ public ApiResponse fooGetWithHttpInfo() throws ApiException { Object localVarPostBody = null; - + // create path and map variables String localVarPath = "/foo"; @@ -75,31 +83,26 @@ public class DefaultApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + String[] localVarAuthNames = new String[] { }; - GenericType localVarReturnType = - new GenericType() {}; + GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "DefaultApi.fooGet", - localVarPath, - "GET", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("DefaultApi.fooGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeApi.java index 58f30d6ffe6..54e90816eca 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1,25 +1,29 @@ package org.openapitools.client.api; -import java.io.File; +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.math.BigDecimal; +import org.openapitools.client.model.Client; +import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.Pet; +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.Client; -import org.openapitools.client.model.FileSchemaTestClass; -import org.openapitools.client.model.HealthCheckResult; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.Pet; -import org.openapitools.client.model.User; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; + public class FakeApi { private ApiClient apiClient; @@ -52,14 +56,14 @@ public class FakeApi { /** * Health check endpoint - * + * * @return HealthCheckResult * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The instance started successfully -
+ + + +
Status Code Description Response Headers
200 The instance started successfully -
*/ public HealthCheckResult fakeHealthGet() throws ApiException { return fakeHealthGetWithHttpInfo().getData(); @@ -67,18 +71,18 @@ public class FakeApi { /** * Health check endpoint - * + * * @return ApiResponse<HealthCheckResult> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The instance started successfully -
+ + + +
Status Code Description Response Headers
200 The instance started successfully -
*/ public ApiResponse fakeHealthGetWithHttpInfo() throws ApiException { Object localVarPostBody = null; - + // create path and map variables String localVarPath = "/fake/health"; @@ -88,44 +92,40 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FakeApi.fakeHealthGet", - localVarPath, - "GET", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("FakeApi.fakeHealthGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } /** * test http signature authentication - * + * * @param pet Pet object that needs to be added to the store (required) * @param query1 query parameter (optional) * @param header1 header parameter (optional) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The instance started successfully -
+ + + +
Status Code Description Response Headers
200 The instance started successfully -
*/ public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); @@ -133,28 +133,26 @@ public class FakeApi { /** * test http signature authentication - * + * * @param pet Pet object that needs to be added to the store (required) * @param query1 query parameter (optional) * @param header1 header parameter (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 The instance started successfully -
+ + + +
Status Code Description Response Headers
200 The instance started successfully -
*/ - public ApiResponse fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) - throws ApiException { + public ApiResponse fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws ApiException { Object localVarPostBody = pet; - + // verify the required parameter 'pet' is set if (pet == null) { - throw new ApiException( - 400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); + throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); } - + // create path and map variables String localVarPath = "/fake/http-signature-test"; @@ -166,64 +164,58 @@ public class FakeApi { localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_1", query1)); - if (header1 != null) localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); - - final String[] localVarAccepts = {}; + if (header1 != null) + localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); + + + 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[] {"http_signature_test"}; + String[] localVarAuthNames = new String[] { "http_signature_test" }; - return apiClient.invokeAPI( - "FakeApi.fakeHttpSignatureTest", - localVarPath, - "GET", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.fakeHttpSignatureTest", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } /** + * * Test serialization of outer boolean types - * * @param body Input boolean as post body (optional) * @return Boolean * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output boolean -
+ + + +
Status Code Description Response Headers
200 Output boolean -
*/ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); } /** + * * Test serialization of outer boolean types - * * @param body Input boolean as post body (optional) * @return ApiResponse<Boolean> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output boolean -
+ + + +
Status Code Description Response Headers
200 Output boolean -
*/ - public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) - throws ApiException { + public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { Object localVarPostBody = body; - + // create path and map variables String localVarPath = "/fake/outer/boolean"; @@ -233,64 +225,59 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"*/*"}; + + + + + final String[] localVarAccepts = { + "*/*" + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FakeApi.fakeOuterBooleanSerialize", - localVarPath, - "POST", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } /** + * * Test serialization of object with outer number type - * * @param outerComposite Input composite as post body (optional) * @return OuterComposite * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output composite -
+ + + +
Status Code Description Response Headers
200 Output composite -
*/ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) - throws ApiException { + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getData(); } /** + * * Test serialization of object with outer number type - * * @param outerComposite Input composite as post body (optional) * @return ApiResponse<OuterComposite> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output composite -
+ + + +
Status Code Description Response Headers
200 Output composite -
*/ - public ApiResponse fakeOuterCompositeSerializeWithHttpInfo( - OuterComposite outerComposite) throws ApiException { + public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException { Object localVarPostBody = outerComposite; - + // create path and map variables String localVarPath = "/fake/outer/composite"; @@ -300,63 +287,59 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"*/*"}; + + + + + final String[] localVarAccepts = { + "*/*" + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FakeApi.fakeOuterCompositeSerialize", - localVarPath, - "POST", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } /** + * * Test serialization of outer number types - * * @param body Input number as post body (optional) * @return BigDecimal * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output number -
+ + + +
Status Code Description Response Headers
200 Output number -
*/ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); } /** + * * Test serialization of outer number types - * * @param body Input number as post body (optional) * @return ApiResponse<BigDecimal> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output number -
+ + + +
Status Code Description Response Headers
200 Output number -
*/ - public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) - throws ApiException { + public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { Object localVarPostBody = body; - + // create path and map variables String localVarPath = "/fake/outer/number"; @@ -366,62 +349,59 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"*/*"}; + + + + + final String[] localVarAccepts = { + "*/*" + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FakeApi.fakeOuterNumberSerialize", - localVarPath, - "POST", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } /** + * * Test serialization of outer string types - * * @param body Input string as post body (optional) * @return String * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output string -
+ + + +
Status Code Description Response Headers
200 Output string -
*/ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); } /** + * * Test serialization of outer string types - * * @param body Input string as post body (optional) * @return ApiResponse<String> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Output string -
+ + + +
Status Code Description Response Headers
200 Output string -
*/ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { Object localVarPostBody = body; - + // create path and map variables String localVarPath = "/fake/outer/string"; @@ -431,69 +411,63 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"*/*"}; + + + + + final String[] localVarAccepts = { + "*/*" + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FakeApi.fakeOuterStringSerialize", - localVarPath, - "POST", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } /** + * * For this test, the body for this request much reference a schema named `File`. - * - * @param fileSchemaTestClass (required) + * @param fileSchemaTestClass (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Success -
+ + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } /** + * * For this test, the body for this request much reference a schema named `File`. - * - * @param fileSchemaTestClass (required) + * @param fileSchemaTestClass (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Success -
+ + + +
Status Code Description Response Headers
200 Success -
*/ - public ApiResponse testBodyWithFileSchemaWithHttpInfo( - FileSchemaTestClass fileSchemaTestClass) throws ApiException { + public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException { Object localVarPostBody = fileSchemaTestClass; - + // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) { - throw new ApiException( - 400, - "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); + throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); } - + // create path and map variables String localVarPath = "/fake/body-with-file-schema"; @@ -503,71 +477,68 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {}; + + + + final String[] localVarAccepts = { + + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI( - "FakeApi.testBodyWithFileSchema", - localVarPath, - "PUT", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } /** - * @param query (required) - * @param user (required) + * + * + * @param query (required) + * @param user (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Success -
+ + + +
Status Code Description Response Headers
200 Success -
*/ public void testBodyWithQueryParams(String query, User user) throws ApiException { testBodyWithQueryParamsWithHttpInfo(query, user); } /** - * @param query (required) - * @param user (required) + * + * + * @param query (required) + * @param user (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Success -
+ + + +
Status Code Description Response Headers
200 Success -
*/ - public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User user) - throws ApiException { + public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException { Object localVarPostBody = user; - + // verify the required parameter 'query' is set if (query == null) { - throw new ApiException( - 400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); + throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - + // verify the required parameter 'user' is set if (user == null) { - throw new ApiException( - 400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); + throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } - + // create path and map variables String localVarPath = "/fake/body-with-query-params"; @@ -579,67 +550,61 @@ public class FakeApi { localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - final String[] localVarAccepts = {}; - + + + + final String[] localVarAccepts = { + + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI( - "FakeApi.testBodyWithQueryParams", - localVarPath, - "PUT", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } /** - * To test \"client\" model To test \"client\" model - * + * To test \"client\" model + * To test \"client\" model * @param client client model (required) * @return Client * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public Client testClientModel(Client client) throws ApiException { return testClientModelWithHttpInfo(client).getData(); } /** - * To test \"client\" model To test \"client\" model - * + * To test \"client\" model + * To test \"client\" model * @param client client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClientModelWithHttpInfo(Client client) throws ApiException { Object localVarPostBody = client; - + // verify the required parameter 'client' is set if (client == null) { - throw new ApiException( - 400, "Missing the required parameter 'client' when calling testClientModel"); + throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); } - + // create path and map variables String localVarPath = "/fake"; @@ -649,35 +614,31 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FakeApi.testClientModel", - localVarPath, - "PATCH", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - null); + return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, null); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing - * various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -694,49 +655,19 @@ public class FakeApi { * @param paramCallback None (optional) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ - public void testEndpointParameters( - BigDecimal number, - Double _double, - String patternWithoutDelimiter, - byte[] _byte, - Integer integer, - Integer int32, - Long int64, - Float _float, - String string, - File binary, - LocalDate date, - OffsetDateTime dateTime, - String password, - String paramCallback) - throws ApiException { - testEndpointParametersWithHttpInfo( - number, - _double, - patternWithoutDelimiter, - _byte, - integer, - int32, - int64, - _float, - string, - binary, - date, - dateTime, - password, - paramCallback); + public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { + testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing - * various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -754,55 +685,35 @@ public class FakeApi { * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ - public ApiResponse testEndpointParametersWithHttpInfo( - BigDecimal number, - Double _double, - String patternWithoutDelimiter, - byte[] _byte, - Integer integer, - Integer int32, - Long int64, - Float _float, - String string, - File binary, - LocalDate date, - OffsetDateTime dateTime, - String password, - String paramCallback) - throws ApiException { + public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { Object localVarPostBody = null; - + // verify the required parameter 'number' is set if (number == null) { - throw new ApiException( - 400, "Missing the required parameter 'number' when calling testEndpointParameters"); + throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters"); } - + // verify the required parameter '_double' is set if (_double == null) { - throw new ApiException( - 400, "Missing the required parameter '_double' when calling testEndpointParameters"); + throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters"); } - + // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) { - throw new ApiException( - 400, - "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); + throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); } - + // verify the required parameter '_byte' is set if (_byte == null) { - throw new ApiException( - 400, "Missing the required parameter '_byte' when calling testEndpointParameters"); + throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters"); } - + // create path and map variables String localVarPath = "/fake"; @@ -812,54 +723,60 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (integer != null) localVarFormParams.put("integer", integer); - if (int32 != null) localVarFormParams.put("int32", int32); - if (int64 != null) localVarFormParams.put("int64", int64); - if (number != null) localVarFormParams.put("number", number); - if (_float != null) localVarFormParams.put("float", _float); - if (_double != null) localVarFormParams.put("double", _double); - if (string != null) localVarFormParams.put("string", string); - if (patternWithoutDelimiter != null) + + + + if (integer != null) + localVarFormParams.put("integer", integer); +if (int32 != null) + localVarFormParams.put("int32", int32); +if (int64 != null) + localVarFormParams.put("int64", int64); +if (number != null) + localVarFormParams.put("number", number); +if (_float != null) + localVarFormParams.put("float", _float); +if (_double != null) + localVarFormParams.put("double", _double); +if (string != null) + localVarFormParams.put("string", string); +if (patternWithoutDelimiter != null) localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter); - if (_byte != null) localVarFormParams.put("byte", _byte); - if (binary != null) localVarFormParams.put("binary", binary); - if (date != null) localVarFormParams.put("date", date); - if (dateTime != null) localVarFormParams.put("dateTime", dateTime); - if (password != null) localVarFormParams.put("password", password); - if (paramCallback != null) localVarFormParams.put("callback", paramCallback); - - final String[] localVarAccepts = {}; +if (_byte != null) + localVarFormParams.put("byte", _byte); +if (binary != null) + localVarFormParams.put("binary", binary); +if (date != null) + localVarFormParams.put("date", date); +if (dateTime != null) + localVarFormParams.put("dateTime", dateTime); +if (password != null) + localVarFormParams.put("password", password); +if (paramCallback != null) + localVarFormParams.put("callback", paramCallback); + final String[] localVarAccepts = { + + }; 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[] {"http_basic_test"}; + String[] localVarAuthNames = new String[] { "http_basic_test" }; - return apiClient.invokeAPI( - "FakeApi.testEndpointParameters", - localVarPath, - "POST", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } /** - * To test enum parameters To test enum parameters - * - * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to - * new ArrayList<String>()) + * To test enum parameters + * To test enum parameters + * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new - * ArrayList<String>()) + * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) @@ -867,41 +784,22 @@ public class FakeApi { * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid request -
404 Not found -
+ + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ - public void testEnumParameters( - List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) - throws ApiException { - testEnumParametersWithHttpInfo( - enumHeaderStringArray, - enumHeaderString, - enumQueryStringArray, - enumQueryString, - enumQueryInteger, - enumQueryDouble, - enumFormStringArray, - enumFormString); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } /** - * To test enum parameters To test enum parameters - * - * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to - * new ArrayList<String>()) + * To test enum parameters + * To test enum parameters + * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new - * ArrayList<String>()) + * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) @@ -910,24 +808,15 @@ public class FakeApi { * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid request -
404 Not found -
+ + + + +
Status Code Description Response Headers
400 Invalid request -
404 Not found -
*/ - public ApiResponse testEnumParametersWithHttpInfo( - List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) - throws ApiException { + public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { Object localVarPostBody = null; - + // create path and map variables String localVarPath = "/fake"; @@ -937,81 +826,57 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble)); if (enumHeaderStringArray != null) - localVarHeaderParams.put( - "enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); - if (enumHeaderString != null) + localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); +if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray); - if (enumFormString != null) localVarFormParams.put("enum_form_string", enumFormString); - - final String[] localVarAccepts = {}; +if (enumFormString != null) + localVarFormParams.put("enum_form_string", enumFormString); + 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[] {}; + String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI( - "FakeApi.testEnumParameters", - localVarPath, - "GET", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } - private ApiResponse testGroupParametersWithHttpInfo( - Integer requiredStringGroup, - Boolean requiredBooleanGroup, - Long requiredInt64Group, - Integer stringGroup, - Boolean booleanGroup, - Long int64Group) - throws ApiException { +private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = null; - + // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) { - throw new ApiException( - 400, - "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"); + throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"); } - + // verify the required parameter 'requiredBooleanGroup' is set if (requiredBooleanGroup == null) { - throw new ApiException( - 400, - "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters"); + throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters"); } - + // verify the required parameter 'requiredInt64Group' is set if (requiredInt64Group == null) { - throw new ApiException( - 400, - "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters"); + throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters"); } - + // create path and map variables String localVarPath = "/fake"; @@ -1021,43 +886,33 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); if (requiredBooleanGroup != null) - localVarHeaderParams.put( - "required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); - if (booleanGroup != null) + localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); +if (booleanGroup != null) localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); - 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[] {"bearer_test"}; + String[] localVarAuthNames = new String[] { "bearer_test" }; - return apiClient.invokeAPI( - "FakeApi.testGroupParameters", - localVarPath, - "DELETE", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } public class APItestGroupParametersRequest { @@ -1068,11 +923,11 @@ public class FakeApi { private Boolean booleanGroup; private Long int64Group; - private APItestGroupParametersRequest() {} + private APItestGroupParametersRequest() { + } /** * Set requiredStringGroup - * * @param requiredStringGroup Required String in group parameters (required) * @return APItestGroupParametersRequest */ @@ -1083,7 +938,6 @@ public class FakeApi { /** * Set requiredBooleanGroup - * * @param requiredBooleanGroup Required Boolean in group parameters (required) * @return APItestGroupParametersRequest */ @@ -1094,7 +948,6 @@ public class FakeApi { /** * Set requiredInt64Group - * * @param requiredInt64Group Required Integer in group parameters (required) * @return APItestGroupParametersRequest */ @@ -1105,7 +958,6 @@ public class FakeApi { /** * Set stringGroup - * * @param stringGroup String in group parameters (optional) * @return APItestGroupParametersRequest */ @@ -1116,7 +968,6 @@ public class FakeApi { /** * Set booleanGroup - * * @param booleanGroup Boolean in group parameters (optional) * @return APItestGroupParametersRequest */ @@ -1127,7 +978,6 @@ public class FakeApi { /** * Set int64Group - * * @param int64Group Integer in group parameters (optional) * @return APItestGroupParametersRequest */ @@ -1138,60 +988,57 @@ public class FakeApi { /** * Execute testGroupParameters request - * + * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
400 Someting wrong -
+ + + +
Status Code Description Response Headers
400 Someting wrong -
+ */ + public void execute() throws ApiException { this.executeWithHttpInfo().getData(); } /** * Execute testGroupParameters request with HTTP info returned - * * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
400 Someting wrong -
+ + + +
Status Code Description Response Headers
400 Someting wrong -
+ */ public ApiResponse executeWithHttpInfo() throws ApiException { - return testGroupParametersWithHttpInfo( - requiredStringGroup, - requiredBooleanGroup, - requiredInt64Group, - stringGroup, - booleanGroup, - int64Group); + return testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } } /** - * Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters - * (optional) - * + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) * @return testGroupParametersRequest * @throws ApiException if fails to make API call + + */ public APItestGroupParametersRequest testGroupParameters() throws ApiException { return new APItestGroupParametersRequest(); } /** * test inline additionalProperties - * + * * @param requestBody request body (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testInlineAdditionalProperties(Map requestBody) throws ApiException { testInlineAdditionalPropertiesWithHttpInfo(requestBody); @@ -1199,27 +1046,24 @@ public class FakeApi { /** * test inline additionalProperties - * + * * @param requestBody request body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ - public ApiResponse testInlineAdditionalPropertiesWithHttpInfo( - Map requestBody) throws ApiException { + public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws ApiException { Object localVarPostBody = requestBody; - + // verify the required parameter 'requestBody' is set if (requestBody == null) { - throw new ApiException( - 400, - "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } - + // create path and map variables String localVarPath = "/fake/inline-additionalProperties"; @@ -1229,41 +1073,37 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {}; + + + + final String[] localVarAccepts = { + + }; 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[] {}; + String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI( - "FakeApi.testInlineAdditionalProperties", - localVarPath, - "POST", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } /** * test json serialization of form data - * + * * @param param field1 (required) * @param param2 field2 (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public void testJsonFormData(String param, String param2) throws ApiException { testJsonFormDataWithHttpInfo(param, param2); @@ -1271,33 +1111,30 @@ public class FakeApi { /** * test json serialization of form data - * + * * @param param field1 (required) * @param param2 field2 (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ - public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) - throws ApiException { + public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { Object localVarPostBody = null; - + // verify the required parameter 'param' is set if (param == null) { - throw new ApiException( - 400, "Missing the required parameter 'param' when calling testJsonFormData"); + throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData"); } - + // verify the required parameter 'param2' is set if (param2 == null) { - throw new ApiException( - 400, "Missing the required parameter 'param2' when calling testJsonFormData"); + throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData"); } - + // create path and map variables String localVarPath = "/fake/jsonFormData"; @@ -1307,118 +1144,93 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (param != null) localVarFormParams.put("param", param); - if (param2 != null) localVarFormParams.put("param2", param2); - final String[] localVarAccepts = {}; + + + if (param != null) + localVarFormParams.put("param", param); +if (param2 != null) + localVarFormParams.put("param2", param2); + 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[] {}; + String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI( - "FakeApi.testJsonFormData", - localVarPath, - "GET", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } /** + * * To test the collection format in query parameters - * - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Success -
+ + + +
Status Code Description Response Headers
200 Success -
*/ - public void testQueryParameterCollectionFormat( - List pipe, - List ioutil, - List http, - List url, - List context) - throws ApiException { + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } /** + * * To test the collection format in query parameters - * - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) + * @param pipe (required) + * @param ioutil (required) + * @param http (required) + * @param url (required) + * @param context (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 Success -
+ + + +
Status Code Description Response Headers
200 Success -
*/ - public ApiResponse testQueryParameterCollectionFormatWithHttpInfo( - List pipe, - List ioutil, - List http, - List url, - List context) - throws ApiException { + public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { Object localVarPostBody = null; - + // verify the required parameter 'pipe' is set if (pipe == null) { - throw new ApiException( - 400, - "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); + throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); } - + // verify the required parameter 'ioutil' is set if (ioutil == null) { - throw new ApiException( - 400, - "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat"); + throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat"); } - + // verify the required parameter 'http' is set if (http == null) { - throw new ApiException( - 400, - "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat"); + throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat"); } - + // verify the required parameter 'url' is set if (url == null) { - throw new ApiException( - 400, - "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat"); + throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat"); } - + // verify the required parameter 'context' is set if (context == null) { - throw new ApiException( - 400, - "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); + throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } - + // create path and map variables String localVarPath = "/fake/test-query-paramters"; @@ -1434,29 +1246,23 @@ public class FakeApi { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); - 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[] {}; + String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI( - "FakeApi.testQueryParameterCollectionFormat", - localVarPath, - "PUT", - localVarQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - null); + return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, null); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index ca4b0f507d5..339851556a5 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -1,16 +1,20 @@ 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; @@ -42,42 +46,41 @@ public class FakeClassnameTags123Api { } /** - * To test class name in snake case To test class name in snake case - * + * 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 - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ 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 - * + * To test class name in snake case + * To test class name in snake case * @param client client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse testClassnameWithHttpInfo(Client client) throws ApiException { Object localVarPostBody = client; - + // verify the required parameter 'client' is set if (client == null) { - throw new ApiException( - 400, "Missing the required parameter 'client' when calling testClassname"); + throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); } - + // create path and map variables String localVarPath = "/fake_classname_test"; @@ -87,29 +90,26 @@ public class FakeClassnameTags123Api { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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"}; + String[] localVarAuthNames = new String[] { "api_key_query" }; GenericType localVarReturnType = new GenericType() {}; - 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); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/PetApi.java index af6e041847b..84447c1f19b 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/PetApi.java @@ -1,18 +1,22 @@ 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; @@ -45,14 +49,14 @@ public class PetApi { /** * Add a new pet to the store - * + * * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
405 Invalid input -
+ + + +
Status Code Description Response Headers
405 Invalid input -
*/ public void addPet(Pet pet) throws ApiException { addPetWithHttpInfo(pet); @@ -60,24 +64,24 @@ public class PetApi { /** * Add a new pet to the store - * + * * @param pet Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
405 Invalid input -
+ + + +
Status Code Description Response Headers
405 Invalid input -
*/ public ApiResponse addPetWithHttpInfo(Pet pet) throws ApiException { Object localVarPostBody = pet; - + // 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 String localVarPath = "/pet"; @@ -87,41 +91,37 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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"}; + 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 - * + * * @param petId Pet id to delete (required) - * @param apiKey (optional) + * @param apiKey (optional) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
400 Invalid pet value -
+ + + +
Status Code Description Response Headers
400 Invalid pet value -
*/ public void deletePet(Long petId, String apiKey) throws ApiException { deletePetWithHttpInfo(petId, apiKey); @@ -129,29 +129,28 @@ public class PetApi { /** * Deletes a pet - * + * * @param petId Pet id to delete (required) - * @param apiKey (optional) + * @param apiKey (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
400 Invalid pet value -
+ + + +
Status Code Description Response Headers
400 Invalid pet value -
*/ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) 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 deletePet"); } - + // create path and map variables - String localVarPath = - "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -159,73 +158,66 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = {}; + if (apiKey != null) + localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + + + 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"}; + 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<Pet> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
+ + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ public List findPetsByStatus(List 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<List<Pet>> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
+ + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
*/ - public ApiResponse> findPetsByStatusWithHttpInfo(List status) - throws ApiException { + public ApiResponse> findPetsByStatusWithHttpInfo(List 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 String localVarPath = "/pet/findByStatus"; @@ -237,46 +229,39 @@ 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"}; + String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - 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<Pet> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
- * + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated @@ -285,31 +270,28 @@ 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<List<Pet>> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
- * + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
* @deprecated */ @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { Object localVarPostBody = null; - + // 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 String localVarPath = "/pet/findByTags"; @@ -321,76 +303,70 @@ 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"}; + String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - 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 - * - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
+ + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ 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<Pet> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
+ + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
*/ public ApiResponse getPetByIdWithHttpInfo(Long petId) 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 getPetById"); } - + // create path and map variables - String localVarPath = - "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -398,44 +374,40 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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"}; + String[] localVarAuthNames = new String[] { "api_key" }; GenericType localVarReturnType = new GenericType() {}; - 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 pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
+ + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public void updatePet(Pet pet) throws ApiException { updatePetWithHttpInfo(pet); @@ -443,26 +415,26 @@ public class PetApi { /** * Update an existing pet - * + * * @param pet Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
+ + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { Object localVarPostBody = pet; - + // 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 String localVarPath = "/pet"; @@ -472,42 +444,38 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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"}; + 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 - * + * * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
405 Invalid input -
+ + + +
Status Code Description Response Headers
405 Invalid input -
*/ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { updatePetWithFormWithHttpInfo(petId, name, status); @@ -515,32 +483,29 @@ public class PetApi { /** * Updates a pet in the store with form data - * + * * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
405 Invalid input -
+ + + +
Status Code Description Response Headers
405 Invalid input -
*/ - public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) - throws ApiException { + public ApiResponse 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}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -548,79 +513,73 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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"}; + 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 - * + * * @param petId ID of pet to update (required) * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ - 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(); } /** * uploads an image - * + * * @param petId ID of pet to update (required) * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ - public ApiResponse uploadFileWithHttpInfo( - Long petId, String additionalMetadata, File file) throws ApiException { + public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) 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 uploadFile"); } - + // create path and map variables - String localVarPath = - "/pet/{petId}/uploadImage" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}/uploadImage" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -628,90 +587,80 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + + + 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"}; + String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - 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) - * + * * @param petId ID of pet to update (required) * @param requiredFile file to upload (required) * @param additionalMetadata Additional data to pass to server (optional) * @return ModelApiResponse * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ - 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(); } /** * uploads an image (required) - * + * * @param petId ID of pet to update (required) * @param requiredFile file to upload (required) * @param additionalMetadata Additional data to pass to server (optional) * @return ApiResponse<ModelApiResponse> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ - public ApiResponse uploadFileWithRequiredFileWithHttpInfo( - Long petId, File requiredFile, String additionalMetadata) throws ApiException { + public ApiResponse 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" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -719,33 +668,30 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + + + 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"}; + String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - 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); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/StoreApi.java index 8bb02d79038..0e29deb7564 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/StoreApi.java @@ -1,16 +1,20 @@ 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; @@ -42,49 +46,45 @@ public class StoreApi { } /** - * Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything - * above 1000 or nonintegers will generate API errors - * + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
+ + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public void deleteOrder(String orderId) throws ApiException { deleteOrderWithHttpInfo(orderId); } /** - * Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything - * above 1000 or nonintegers will generate API errors - * + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
+ + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse 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}" - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -92,60 +92,55 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + 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<String, Integer> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public Map 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<Map<String, Integer>> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
200 successful operation -
+ + + +
Status Code Description Response Headers
200 successful operation -
*/ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { Object localVarPostBody = null; - + // create path and map variables String localVarPath = "/store/inventory"; @@ -155,80 +150,71 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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"}; + String[] localVarAuthNames = new String[] { "api_key" }; - GenericType> localVarReturnType = - new GenericType>() {}; + GenericType> localVarReturnType = new GenericType>() {}; - 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 <= 5 or > - * 10. Other values will generated exceptions - * + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
+ + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); } /** - * Find purchase order by ID For valid response try integer IDs with value <= 5 or > - * 10. Other values will generated exceptions - * + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
+ + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
*/ public ApiResponse 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}" - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -236,44 +222,40 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - 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 order order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
+ + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public Order placeOrder(Order order) throws ApiException { return placeOrderWithHttpInfo(order).getData(); @@ -281,25 +263,25 @@ public class StoreApi { /** * Place an order for a pet - * + * * @param order order placed for purchasing the pet (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
+ + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
*/ public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiException { Object localVarPostBody = order; - + // 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 String localVarPath = "/store/order"; @@ -309,29 +291,26 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/xml", "application/json"}; + + + + + final String[] localVarAccepts = { + "application/xml", "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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - 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); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/UserApi.java index dda3ad6bdf3..9b6250da568 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/UserApi.java @@ -1,16 +1,20 @@ 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; @@ -42,40 +46,40 @@ public class UserApi { } /** - * Create user This can only be done by the logged in user. - * + * 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 - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUser(User user) throws ApiException { createUserWithHttpInfo(user); } /** - * Create user This can only be done by the logged in user. - * + * Create user + * This can only be done by the logged in user. * @param user Created user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse createUserWithHttpInfo(User user) throws ApiException { Object localVarPostBody = user; - + // 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 String localVarPath = "/user"; @@ -85,40 +89,36 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {}; + + + + final String[] localVarAccepts = { + + }; 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[] {}; + 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 user List of user object (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithArrayInput(List user) throws ApiException { createUsersWithArrayInputWithHttpInfo(user); @@ -126,26 +126,24 @@ public class UserApi { /** * Creates list of users with given input array - * + * * @param user List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ - public ApiResponse createUsersWithArrayInputWithHttpInfo(List user) - throws ApiException { + public ApiResponse createUsersWithArrayInputWithHttpInfo(List user) throws ApiException { Object localVarPostBody = user; - + // verify the required parameter 'user' is set if (user == null) { - throw new ApiException( - 400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } - + // create path and map variables String localVarPath = "/user/createWithArray"; @@ -155,40 +153,36 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {}; + + + + final String[] localVarAccepts = { + + }; 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[] {}; + 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 user List of user object (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ public void createUsersWithListInput(List user) throws ApiException { createUsersWithListInputWithHttpInfo(user); @@ -196,26 +190,24 @@ public class UserApi { /** * Creates list of users with given input array - * + * * @param user List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ - public ApiResponse createUsersWithListInputWithHttpInfo(List user) - throws ApiException { + public ApiResponse createUsersWithListInputWithHttpInfo(List user) throws ApiException { Object localVarPostBody = user; - + // verify the required parameter 'user' is set if (user == null) { - throw new ApiException( - 400, "Missing the required parameter 'user' when calling createUsersWithListInput"); + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); } - + // create path and map variables String localVarPath = "/user/createWithList"; @@ -225,72 +217,66 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {}; + + + + final String[] localVarAccepts = { + + }; 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[] {}; + 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 - * - * - * - * - *
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ 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<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse 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}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -298,44 +284,39 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + 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 - * + * * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
+ + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); @@ -343,31 +324,29 @@ public class UserApi { /** * Get user by user name - * + * * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return ApiResponse<User> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - * - *
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
+ + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
*/ public ApiResponse 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}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -375,45 +354,41 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - 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 - * + * * @param username The user name for login (required) * @param password The password for login in clear text (required) * @return String * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
+ + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); @@ -421,34 +396,31 @@ public class UserApi { /** * Logs user into the system - * + * * @param username The user name for login (required) * @param password The password for login in clear text (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
+ + + + +
Status Code Description Response Headers
200 successful operation * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
*/ - public ApiResponse loginUserWithHttpInfo(String username, String password) - throws ApiException { + public ApiResponse 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 String localVarPath = "/user/login"; @@ -461,41 +433,36 @@ 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[] {}; + String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - 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 - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ public void logoutUser() throws ApiException { logoutUserWithHttpInfo(); @@ -503,18 +470,18 @@ public class UserApi { /** * Logs out current logged in user session - * + * * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - *
Status Code Description Response Headers
0 successful operation -
+ + + +
Status Code Description Response Headers
0 successful operation -
*/ public ApiResponse logoutUserWithHttpInfo() throws ApiException { Object localVarPostBody = null; - + // create path and map variables String localVarPath = "/user/logout"; @@ -524,80 +491,73 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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[] {}; + 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 user Updated user object (required) * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
+ + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ 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 user Updated user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
+ + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
*/ public ApiResponse 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 '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}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -605,28 +565,24 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {}; + + + + final String[] localVarAccepts = { + + }; 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[] {}; + 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); } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index e77ca74a38f..c1b2e484070 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -3,20 +3,23 @@ * 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.util.List; -import java.util.Map; -import org.openapitools.client.ApiException; import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + public class ApiKeyAuth implements Authentication { private final String location; @@ -55,14 +58,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { if (apiKey == null) { return; } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/Authentication.java index b2f568ccf5c..579b5e0d6d5 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/Authentication.java @@ -3,35 +3,31 @@ * 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.util.List; -import java.util.Map; -import org.openapitools.client.ApiException; import org.openapitools.client.Pair; +import org.openapitools.client.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 queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException; + /** + * 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 queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 208509bfe86..bf1b68d5a31 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -3,22 +3,27 @@ * 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 com.migcomponents.migbase64.Base64; -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; +import org.openapitools.client.ApiException; + +import com.migcomponents.migbase64.Base64; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + public class HttpBasicAuth implements Authentication { private String username; @@ -41,21 +46,13 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map 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); } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index c932a745662..1b46b4c6839 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -3,20 +3,23 @@ * 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.util.List; -import java.util.Map; -import org.openapitools.client.ApiException; import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + public class HttpBearerAuth implements Authentication { private final String scheme; @@ -27,8 +30,7 @@ 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,8 +39,7 @@ 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 */ @@ -47,20 +48,12 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (bearerToken == null) { + public void applyToParams(List queryParams, Map headerParams, Map 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) { diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java index c98091bad01..336d1593468 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java @@ -3,66 +3,137 @@ * 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 org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + import java.net.URI; import java.net.URLEncoder; -import java.security.Key; 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.List; import java.util.Locale; import java.util.Map; -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; +import java.util.List; + import org.tomitribe.auth.signatures.*; +/** + * A Configuration object for the HTTP message signature security scheme. + */ public class HttpSignatureAuth implements Authentication { private Signer signer; - private String name; + // An opaque string that the server can use to look up the component they need to validate the signature. + private String keyId; + // The HTTP signature algorithm. private Algorithm algorithm; + // The list of HTTP headers that should be included in the HTTP signature. private List headers; - public HttpSignatureAuth(String name, Algorithm algorithm, List headers) { - this.name = name; + // The digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + private String digestAlgorithm; + + /** + * Construct a new HTTP signature auth configuration object. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + * @param algorithm The signature algorithm. + * @param headers The list of HTTP headers that should be included in the HTTP signature. + */ + public HttpSignatureAuth(String keyId, Algorithm algorithm, List headers) { + this.keyId = keyId; this.algorithm = algorithm; this.headers = headers; + this.digestAlgorithm = "SHA-256"; } - public String getName() { - return name; + /** + * Returns the opaque string that the server can use to look up the component they need to validate the signature. + * + * @return The keyId. + */ + public String getKeyId() { + return keyId; } - public void setName(String name) { - this.name = name; + /** + * Set the HTTP signature key id. + * + * @param keyId An opaque string that the server can use to look up the component they need to validate the signature. + */ + public void setKeyId(String keyId) { + this.keyId = keyId; } + /** + * Returns the HTTP signature algorithm which is used to sign HTTP requests. + */ public Algorithm getAlgorithm() { return algorithm; } + /** + * Sets the HTTP signature algorithm which is used to sign HTTP requests. + * + * @param algorithm The HTTP signature algorithm. + */ public void setAlgorithm(Algorithm algorithm) { this.algorithm = algorithm; } + /** + * Returns the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * @see java.security.MessageDigest + */ + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * Sets the digest algorithm which is used to calculate a cryptographic digest of the HTTP request body. + * + * The exact list of supported digest algorithms depends on the installed security providers. + * Every implementation of the Java platform is required to support "MD5", "SHA-1" and "SHA-256". + * Do not use "MD5" and "SHA-1", they are vulnerable to multiple known attacks. + * By default, "SHA-256" is used. + * + * @param digestAlgorithm The digest algorithm. + * + * @see java.security.MessageDigest + */ + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Returns the list of HTTP headers that should be included in the HTTP signature. + */ public List getHeaders() { return headers; } + /** + * Sets the list of HTTP headers that should be included in the HTTP signature. + * + * @param headers The HTTP headers. + */ public void setHeaders(List headers) { this.headers = headers; } @@ -75,46 +146,39 @@ public class HttpSignatureAuth implements Authentication { this.signer = signer; } - public void setup(Key key) throws ApiException { + /** + * Set the private key used to sign HTTP requests using the HTTP signature scheme. + * + * @param key The private key. + */ + public void setPrivateKey(Key key) throws ApiException { if (key == null) { - throw new ApiException("key (java.security.Key) cannot be null"); + throw new ApiException("Private key (java.security.Key) cannot be null"); } - signer = new Signer(key, new Signature(name, algorithm, null, headers)); + signer = new Signer(key, new Signature(keyId, algorithm, null, headers)); } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map 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())); + 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())))); + headerParams.put("digest", + this.digestAlgorithm + "=" + + new String(Base64.getEncoder().encode(MessageDigest.getInstance(this.digestAlgorithm).digest(payload.getBytes())))); } if (signer == null) { - throw new ApiException( - "Signer cannot be null. Please run the method `setup` to set it up correctly"); + throw new ApiException("Signer cannot be null. Please call the method `setPrivateKey` to set it up correctly"); } // construct the path with the URL query string @@ -122,10 +186,7 @@ public class HttpSignatureAuth implements Authentication { List urlQueries = new ArrayList(); for (Pair queryParam : queryParams) { - urlQueries.add( - queryParam.getName() - + "=" - + URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20")); + urlQueries.add(queryParam.getName() + "=" + URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20")); } if (!urlQueries.isEmpty()) { @@ -134,8 +195,7 @@ public class HttpSignatureAuth implements Authentication { 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()); + throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString()); } } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuth.java index c7302cbcbd4..77061fb4ac8 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuth.java @@ -3,20 +3,23 @@ * 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.util.List; -import java.util.Map; -import org.openapitools.client.ApiException; import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + public class OAuth implements Authentication { private String accessToken; @@ -30,14 +33,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 1e09cd99afc..b2d11ff0c4f 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -3,18 +3,16 @@ * 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; public enum OAuthFlow { - accessCode, - implicit, - password, - application + accessCode, implicit, password, application } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index d7bae11f126..1f7ba023586 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -3,62 +3,64 @@ * 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 org.openapitools.client.ApiException; +import java.lang.reflect.Type; import java.util.Map; import javax.ws.rs.core.GenericType; -/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ + public abstract class AbstractOpenApiSchema { - // store the actual instance of the schema/object - private Object instance; + // store the actual instance of the schema/object + private Object instance; - // schema type (e.g. oneOf, anyOf) - private final String schemaType; + // schema type (e.g. oneOf, anyOf) + private final String schemaType; - public AbstractOpenApiSchema(String schemaType) { - this.schemaType = schemaType; - } + public AbstractOpenApiSchema(String schemaType) { + this.schemaType = schemaType; + } - /** - * * Get the list of schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map getSchemas(); + /*** + * Get the list of schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); - /** - * * Get the actual instance - * - * @return an instance of the actual schema/object - */ - public Object getActualInstance() { - return instance; - } + /*** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + public Object getActualInstance() {return instance;} - /** - * * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) { - this.instance = instance; - } + /*** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} - /** - * * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } + /*** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 7d984f4458d..67520d4d699 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -3,28 +3,37 @@ * 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.JsonPropertyOrder; +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 java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** AdditionalPropertiesClass */ +/** + * AdditionalPropertiesClass + */ @JsonPropertyOrder({ AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) + public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; private Map mapProperty = null; @@ -32,8 +41,9 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; private Map> mapOfMapProperty = null; - public AdditionalPropertiesClass mapProperty(Map mapProperty) { + public AdditionalPropertiesClass mapProperty(Map mapProperty) { + this.mapProperty = mapProperty; return this; } @@ -46,32 +56,32 @@ public class AdditionalPropertiesClass { return this; } - /** + /** * Get mapProperty - * * @return mapProperty - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapProperty() { return mapProperty; } + public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty( - Map> mapOfMapProperty) { + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapOfMapPropertyItem( - String key, Map mapOfMapPropertyItem) { + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { this.mapOfMapProperty = new HashMap>(); } @@ -79,23 +89,25 @@ public class AdditionalPropertiesClass { return this; } - /** + /** * Get mapOfMapProperty - * * @return mapOfMapProperty - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getMapOfMapProperty() { return mapOfMapProperty; } + public void setMapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -105,8 +117,8 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) - && Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override @@ -114,6 +126,7 @@ public class AdditionalPropertiesClass { return Objects.hash(mapProperty, mapOfMapProperty); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -125,7 +138,8 @@ public class AdditionalPropertiesClass { } /** - * 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) { @@ -133,4 +147,6 @@ public class AdditionalPropertiesClass { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Animal.java index 0be31d514fe..67dd4c036fc 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Animal.java @@ -3,34 +3,42 @@ * 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.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonCreator; 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 java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** 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"), }) + public class Animal { public static final String JSON_PROPERTY_CLASS_NAME = "className"; private String className; @@ -38,51 +46,56 @@ public class Animal { public static final String JSON_PROPERTY_COLOR = "color"; private String color = "red"; - public Animal className(String className) { + public Animal className(String className) { + this.className = className; return this; } - /** + /** * 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) { + public Animal color(String color) { + this.color = color; return this; } - /** + /** * 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) { @@ -92,8 +105,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 @@ -101,6 +114,7 @@ public class Animal { return Objects.hash(className, color); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -112,7 +126,8 @@ 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) { @@ -120,4 +135,6 @@ public class Animal { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index fc5cfed2907..96f829bc648 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -3,32 +3,43 @@ * 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.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * ArrayOfArrayOfNumberOnly + */ +@JsonPropertyOrder({ + ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER +}) -/** ArrayOfArrayOfNumberOnly */ -@JsonPropertyOrder({ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER}) public class ArrayOfArrayOfNumberOnly { public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; private List> arrayArrayNumber = null; - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; return this; } @@ -41,23 +52,25 @@ public class ArrayOfArrayOfNumberOnly { return this; } - /** + /** * Get arrayArrayNumber - * * @return arrayArrayNumber - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getArrayArrayNumber() { return arrayArrayNumber; } + public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -75,6 +88,7 @@ public class ArrayOfArrayOfNumberOnly { return Objects.hash(arrayArrayNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -85,7 +99,8 @@ 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) { @@ -93,4 +108,6 @@ public class ArrayOfArrayOfNumberOnly { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 6d4b1ba077e..37e40dbd3ec 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -3,32 +3,43 @@ * 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.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * ArrayOfNumberOnly + */ +@JsonPropertyOrder({ + ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER +}) -/** ArrayOfNumberOnly */ -@JsonPropertyOrder({ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER}) public class ArrayOfNumberOnly { public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; private List arrayNumber = null; - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; return this; } @@ -41,23 +52,25 @@ public class ArrayOfNumberOnly { return this; } - /** + /** * Get arrayNumber - * * @return arrayNumber - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayNumber() { return arrayNumber; } + public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -75,6 +88,7 @@ public class ArrayOfNumberOnly { return Objects.hash(arrayNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -85,7 +99,8 @@ 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) { @@ -93,4 +108,6 @@ public class ArrayOfNumberOnly { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayTest.java index b7b468f33ed..de7c895ac93 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -3,29 +3,38 @@ * 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.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import org.openapitools.client.model.ReadOnlyFirst; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** 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 arrayOfString = null; @@ -36,8 +45,9 @@ public class ArrayTest { public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; private List> arrayArrayOfModel = null; - public ArrayTest arrayOfString(List arrayOfString) { + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; return this; } @@ -50,25 +60,27 @@ public class ArrayTest { return this; } - /** + /** * Get arrayOfString - * * @return arrayOfString - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayOfString() { return arrayOfString; } + public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; return this; } @@ -81,25 +93,27 @@ public class ArrayTest { return this; } - /** + /** * Get arrayArrayOfInteger - * * @return arrayArrayOfInteger - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -112,23 +126,25 @@ public class ArrayTest { return this; } - /** + /** * Get arrayArrayOfModel - * * @return arrayArrayOfModel - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -138,9 +154,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 @@ -148,21 +164,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) { @@ -170,4 +186,6 @@ public class ArrayTest { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Capitalization.java index a152526a20d..033e9788110 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Capitalization.java @@ -3,22 +3,29 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Capitalization */ +/** + * Capitalization + */ @JsonPropertyOrder({ Capitalization.JSON_PROPERTY_SMALL_CAMEL, Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, @@ -27,6 +34,7 @@ import java.util.Objects; 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; @@ -46,144 +54,157 @@ 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) { + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; return this; } - /** + /** * 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) { + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; return this; } - /** + /** * 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) { + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; return this; } - /** + /** * 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) { + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; return this; } - /** + /** * 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) { + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; return this; } - /** + /** * 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) { + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; return this; } - /** - * Name of the pet - * + /** + * 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) { @@ -193,20 +214,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(); @@ -222,7 +243,8 @@ 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) { @@ -230,4 +252,6 @@ public class Capitalization { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Cat.java index ac0b84d82e4..484725c76fe 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Cat.java @@ -3,50 +3,65 @@ * 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.JsonPropertyOrder; +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.Objects; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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) { + public Cat declawed(Boolean declawed) { + this.declawed = declawed; return this; } - /** + /** * 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) { @@ -56,7 +71,8 @@ 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 @@ -64,6 +80,7 @@ public class Cat extends Animal { return Objects.hash(declawed, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -75,7 +92,8 @@ 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) { @@ -83,4 +101,6 @@ public class Cat extends Animal { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/CatAllOf.java index a7e4beaad66..3e7b991436a 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -3,50 +3,63 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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) { + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; return this; } - /** + /** * 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) { @@ -64,6 +77,7 @@ public class CatAllOf { return Objects.hash(declawed); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -74,7 +88,8 @@ 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) { @@ -82,4 +97,6 @@ public class CatAllOf { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Category.java index 617b395ecfa..868ba875074 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Category.java @@ -3,23 +3,34 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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; @@ -27,51 +38,56 @@ public class Category { public static final String JSON_PROPERTY_NAME = "name"; private String name = "default-name"; - public Category id(Long id) { + public Category id(Long id) { + this.id = id; return this; } - /** + /** * 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) { + public Category name(String name) { + this.name = name; return this; } - /** + /** * 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) { @@ -81,7 +97,8 @@ 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 @@ -89,6 +106,7 @@ public class Category { return Objects.hash(id, name); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -100,7 +118,8 @@ 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) { @@ -108,4 +127,6 @@ public class Category { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ClassModel.java index 13bf74694c8..4de7664b26a 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ClassModel.java @@ -3,52 +3,64 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Model for testing model with \"_class\" property */ +/** + * Model for testing model with \"_class\" 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) { + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; return this; } - /** + /** * 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) { @@ -66,6 +78,7 @@ public class ClassModel { return Objects.hash(propertyClass); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -76,7 +89,8 @@ 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) { @@ -84,4 +98,6 @@ public class ClassModel { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Client.java index 8aeda7b92c7..02b0aac2247 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Client.java @@ -3,50 +3,63 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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) { + public Client client(String client) { + this.client = client; return this; } - /** + /** * 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) { @@ -64,6 +77,7 @@ public class Client { return Objects.hash(client); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -74,7 +88,8 @@ 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) { @@ -82,4 +97,6 @@ public class Client { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Dog.java index 7c8b535861c..78044654d50 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Dog.java @@ -3,50 +3,65 @@ * 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.JsonPropertyOrder; +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.Objects; +import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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) { + public Dog breed(String breed) { + this.breed = breed; return this; } - /** + /** * 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) { @@ -56,7 +71,8 @@ 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 @@ -64,6 +80,7 @@ public class Dog extends Animal { return Objects.hash(breed, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -75,7 +92,8 @@ 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) { @@ -83,4 +101,6 @@ public class Dog extends Animal { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/DogAllOf.java index d474f9b5b1b..dd42595cf20 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -3,50 +3,63 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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) { + public DogAllOf breed(String breed) { + this.breed = breed; return this; } - /** + /** * 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) { @@ -64,6 +77,7 @@ public class DogAllOf { return Objects.hash(breed); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -74,7 +88,8 @@ 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) { @@ -82,4 +97,6 @@ public class DogAllOf { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumArrays.java index 8e72331cc30..aff182cd498 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -3,32 +3,43 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * EnumArrays + */ +@JsonPropertyOrder({ + EnumArrays.JSON_PROPERTY_JUST_SYMBOL, + EnumArrays.JSON_PROPERTY_ARRAY_ENUM +}) -/** 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(">="), - + DOLLAR("$"); private String value; @@ -61,10 +72,12 @@ 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"), - + CRAB("crab"); private String value; @@ -97,31 +110,34 @@ public class EnumArrays { public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; private List arrayEnum = null; - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; return this; } - /** + /** * 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 arrayEnum) { + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; return this; } @@ -134,23 +150,25 @@ public class EnumArrays { return this; } - /** + /** * Get arrayEnum - * * @return arrayEnum - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayEnum() { return arrayEnum; } + public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,8 +178,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 @@ -169,6 +187,7 @@ public class EnumArrays { return Objects.hash(justSymbol, arrayEnum); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -180,7 +199,8 @@ 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) { @@ -188,4 +208,6 @@ public class EnumArrays { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumClass.java index f1f1c4348c9..e9102d97427 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumClass.java @@ -3,25 +3,32 @@ * 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.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"), - + _XYZ_("(xyz)"); private String value; @@ -50,3 +57,4 @@ public enum EnumClass { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumTest.java index f58b5a2d335..cf6d574a5f9 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/EnumTest.java @@ -3,26 +3,36 @@ * 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.JsonIgnore; +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.JsonPropertyOrder; +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.Objects; +import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** EnumTest */ +/** + * EnumTest + */ @JsonPropertyOrder({ EnumTest.JSON_PROPERTY_ENUM_STRING, EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, @@ -33,13 +43,16 @@ import org.openapitools.jackson.nullable.JsonNullable; 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"), - + LOWER("lower"), - + EMPTY(""); private String value; @@ -72,12 +85,14 @@ 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"), - + LOWER("lower"), - + EMPTY(""); private String value; @@ -110,10 +125,12 @@ 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), - + NUMBER_MINUS_1(-1); private Integer value; @@ -146,10 +163,12 @@ 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), - + NUMBER_MINUS_1_DOT_2(-1.2); private Double value; @@ -191,126 +210,134 @@ public class EnumTest { 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 static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; + public EnumTest enumString(EnumStringEnum enumString) { - + this.enumString = enumString; return this; } - /** + /** * 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) { + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; return this; } - /** + /** * 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) { + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; return this; } - /** + /** * 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) { + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; return this; } - /** + /** * 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.of(outerEnum); - + return this; } - /** + /** * Get outerEnum - * * @return outerEnum - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public OuterEnum getOuterEnum() { - return outerEnum.orElse(null); + return outerEnum.orElse(null); } @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } - + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { this.outerEnum = outerEnum; @@ -320,77 +347,82 @@ public class EnumTest { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + 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) { + 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) { + 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) { + + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -400,29 +432,22 @@ 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) - && Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) - && Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) - && Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + 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, - outerEnumInteger, - outerEnumDefaultValue, - outerEnumIntegerDefaultValue); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -433,18 +458,15 @@ public class EnumTest { 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(" 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) { @@ -452,4 +474,6 @@ public class EnumTest { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index e596551a771..8166597792d 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -3,28 +3,36 @@ * 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.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** 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; @@ -32,31 +40,34 @@ public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILES = "files"; private List files = null; - public FileSchemaTestClass file(java.io.File file) { + public FileSchemaTestClass file(java.io.File file) { + this.file = file; return this; } - /** + /** * 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 files) { + public FileSchemaTestClass files(List files) { + this.files = files; return this; } @@ -69,23 +80,25 @@ public class FileSchemaTestClass { return this; } - /** + /** * Get files - * * @return files - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFiles() { return files; } + public void setFiles(List files) { this.files = files; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,8 +108,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 @@ -104,6 +117,7 @@ public class FileSchemaTestClass { return Objects.hash(file, files); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -115,7 +129,8 @@ 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) { @@ -123,4 +138,6 @@ public class FileSchemaTestClass { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java index 8dddfe49d02..e531ce87dbf 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java @@ -3,50 +3,63 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) -/** Foo */ -@JsonPropertyOrder({Foo.JSON_PROPERTY_BAR}) public class Foo { public static final String JSON_PROPERTY_BAR = "bar"; private String bar = "bar"; - public Foo bar(String bar) { + public Foo bar(String bar) { + this.bar = bar; return this; } - /** + /** * Get bar - * * @return bar - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBar() { return bar; } + public void setBar(String bar) { this.bar = bar; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -64,6 +77,7 @@ public class Foo { return Objects.hash(bar); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -74,7 +88,8 @@ public class Foo { } /** - * 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) { @@ -82,4 +97,6 @@ public class Foo { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FormatTest.java index bbecfc09272..35cfcebf434 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/FormatTest.java @@ -3,28 +3,34 @@ * 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.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; 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, @@ -42,6 +48,7 @@ import org.threeten.bp.OffsetDateTime; 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; @@ -85,354 +92,391 @@ public class FormatTest { 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"; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; private String patternWithDigitsAndDelimiter; - public FormatTest integer(Integer integer) { + public FormatTest integer(Integer integer) { + this.integer = integer; return this; } - /** - * 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) { + public FormatTest int32(Integer int32) { + this.int32 = int32; return this; } - /** - * 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) { + public FormatTest int64(Long int64) { + this.int64 = int64; return this; } - /** + /** * 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) { + public FormatTest number(BigDecimal number) { + this.number = number; return this; } - /** - * 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) { + public FormatTest _float(Float _float) { + this._float = _float; return this; } - /** - * 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) { + public FormatTest _double(Double _double) { + this._double = _double; return this; } - /** - * 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) { + public FormatTest string(String string) { + this.string = string; return this; } - /** + /** * 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) { + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; return this; } - /** + /** * 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) { + public FormatTest binary(File binary) { + this.binary = binary; return this; } - /** + /** * 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) { + public FormatTest date(LocalDate date) { + this.date = date; return this; } - /** + /** * 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) { + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; return this; } - /** + /** * 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) { + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; return this; } - /** + /** * 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) { + public FormatTest password(String password) { + this.password = password; return this; } - /** + /** * 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 patternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; return this; } - /** + /** * A string that is a 10 digit number. Can have leading zeros. - * * @return patternWithDigits - */ + **/ @javax.annotation.Nullable @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 String getPatternWithDigits() { return patternWithDigits; } + public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } - /** - * A string starting with 'image_' (case insensitive) and one to three digits following - * i.e. Image_01. - * + /** + * A string starting with 'image_' (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.") + @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) { if (this == o) { @@ -442,44 +486,29 @@ 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.patternWithDigits, formatTest.patternWithDigits) - && Objects.equals( - this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); + 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, - patternWithDigits, - patternWithDigitsAndDelimiter); + 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(); @@ -498,15 +527,14 @@ public class FormatTest { sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); - sb.append(" patternWithDigitsAndDelimiter: ") - .append(toIndentedString(patternWithDigitsAndDelimiter)) - .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) { @@ -514,4 +542,6 @@ public class FormatTest { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 24bbe4252c5..0a3f0d46436 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -3,23 +3,34 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * 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; @@ -27,32 +38,39 @@ 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) { @@ -62,8 +80,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 @@ -71,6 +89,7 @@ public class HasOnlyReadOnly { return Objects.hash(bar, foo); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -82,7 +101,8 @@ 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) { @@ -90,4 +110,6 @@ public class HasOnlyReadOnly { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HealthCheckResult.java index acaf6793dc2..efb77061df1 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -3,60 +3,67 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; /** - * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer - * in generated model. + * 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}) +@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 nullableMessage = JsonNullable.undefined(); + public HealthCheckResult nullableMessage(String nullableMessage) { this.nullableMessage = JsonNullable.of(nullableMessage); - + return this; } - /** + /** * Get nullableMessage - * * @return nullableMessage - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public String getNullableMessage() { - return nullableMessage.orElse(null); + return nullableMessage.orElse(null); } @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNullableMessage_JsonNullable() { return nullableMessage; } - + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { this.nullableMessage = nullableMessage; @@ -66,6 +73,7 @@ public class HealthCheckResult { this.nullableMessage = JsonNullable.of(nullableMessage); } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -83,6 +91,7 @@ public class HealthCheckResult { return Objects.hash(nullableMessage); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -93,7 +102,8 @@ public class HealthCheckResult { } /** - * 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,4 +111,6 @@ public class HealthCheckResult { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java index 1141c663485..bb0804c5240 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java @@ -3,23 +3,34 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * InlineObject + */ +@JsonPropertyOrder({ + InlineObject.JSON_PROPERTY_NAME, + InlineObject.JSON_PROPERTY_STATUS +}) -/** InlineObject */ -@JsonPropertyOrder({InlineObject.JSON_PROPERTY_NAME, InlineObject.JSON_PROPERTY_STATUS}) public class InlineObject { public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -27,52 +38,57 @@ public class InlineObject { public static final String JSON_PROPERTY_STATUS = "status"; private String status; - public InlineObject name(String name) { + public InlineObject name(String name) { + this.name = name; return this; } - /** + /** * Updated name of the pet - * * @return name - */ + **/ @javax.annotation.Nullable @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) { + 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) { if (this == o) { @@ -82,8 +98,8 @@ public class InlineObject { return false; } InlineObject inlineObject = (InlineObject) o; - return Objects.equals(this.name, inlineObject.name) - && Objects.equals(this.status, inlineObject.status); + return Objects.equals(this.name, inlineObject.name) && + Objects.equals(this.status, inlineObject.status); } @Override @@ -91,6 +107,7 @@ public class InlineObject { return Objects.hash(name, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -102,7 +119,8 @@ public class InlineObject { } /** - * 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,4 +128,6 @@ public class InlineObject { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject1.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject1.java index 2bf1fade373..99b98f4c848 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject1.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject1.java @@ -3,27 +3,35 @@ * 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.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.File; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** InlineObject1 */ +/** + * 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; @@ -31,52 +39,57 @@ public class InlineObject1 { public static final String JSON_PROPERTY_FILE = "file"; private File file; - public InlineObject1 additionalMetadata(String additionalMetadata) { + 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) { + 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) { @@ -86,8 +99,8 @@ public class InlineObject1 { return false; } InlineObject1 inlineObject1 = (InlineObject1) o; - return Objects.equals(this.additionalMetadata, inlineObject1.additionalMetadata) - && Objects.equals(this.file, inlineObject1.file); + return Objects.equals(this.additionalMetadata, inlineObject1.additionalMetadata) && + Objects.equals(this.file, inlineObject1.file); } @Override @@ -95,6 +108,7 @@ public class InlineObject1 { return Objects.hash(additionalMetadata, file); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -106,7 +120,8 @@ public class InlineObject1 { } /** - * 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) { @@ -114,4 +129,6 @@ public class InlineObject1 { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject2.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject2.java index 92639fccaef..e3031fbd564 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject2.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject2.java @@ -3,35 +3,43 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** InlineObject2 */ +/** + * InlineObject2 + */ @JsonPropertyOrder({ InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING_ARRAY, InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING }) + public class InlineObject2 { - /** Gets or Sets enumFormStringArray */ + /** + * Gets or Sets enumFormStringArray + */ public enum EnumFormStringArrayEnum { GREATER_THAN(">"), - + DOLLAR("$"); private String value; @@ -64,12 +72,14 @@ public class InlineObject2 { public static final String JSON_PROPERTY_ENUM_FORM_STRING_ARRAY = "enum_form_string_array"; private List enumFormStringArray = null; - /** Form parameter enum test (string) */ + /** + * Form parameter enum test (string) + */ public enum EnumFormStringEnum { _ABC("_abc"), - + _EFG("-efg"), - + _XYZ_("(xyz)"); private String value; @@ -102,8 +112,9 @@ public class InlineObject2 { public static final String JSON_PROPERTY_ENUM_FORM_STRING = "enum_form_string"; private EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG; - public InlineObject2 enumFormStringArray(List enumFormStringArray) { + public InlineObject2 enumFormStringArray(List enumFormStringArray) { + this.enumFormStringArray = enumFormStringArray; return this; } @@ -116,46 +127,50 @@ public class InlineObject2 { 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 getEnumFormStringArray() { return enumFormStringArray; } + public void setEnumFormStringArray(List enumFormStringArray) { this.enumFormStringArray = enumFormStringArray; } - public InlineObject2 enumFormString(EnumFormStringEnum enumFormString) { + 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) { @@ -165,8 +180,8 @@ public class InlineObject2 { return false; } InlineObject2 inlineObject2 = (InlineObject2) o; - return Objects.equals(this.enumFormStringArray, inlineObject2.enumFormStringArray) - && Objects.equals(this.enumFormString, inlineObject2.enumFormString); + return Objects.equals(this.enumFormStringArray, inlineObject2.enumFormStringArray) && + Objects.equals(this.enumFormString, inlineObject2.enumFormString); } @Override @@ -174,20 +189,20 @@ public class InlineObject2 { 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(" 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). + * 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) { @@ -195,4 +210,6 @@ public class InlineObject2 { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject3.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject3.java index e95a6cbf369..29978813614 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject3.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject3.java @@ -3,27 +3,33 @@ * 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.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; 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; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** InlineObject3 */ +/** + * InlineObject3 + */ @JsonPropertyOrder({ InlineObject3.JSON_PROPERTY_INTEGER, InlineObject3.JSON_PROPERTY_INT32, @@ -40,6 +46,7 @@ import org.threeten.bp.OffsetDateTime; InlineObject3.JSON_PROPERTY_PASSWORD, InlineObject3.JSON_PROPERTY_CALLBACK }) + public class InlineObject3 { public static final String JSON_PROPERTY_INTEGER = "integer"; private Integer integer; @@ -83,324 +90,362 @@ public class InlineObject3 { public static final String JSON_PROPERTY_CALLBACK = "callback"; private String callback; - public InlineObject3 integer(Integer integer) { + public InlineObject3 integer(Integer integer) { + this.integer = integer; return this; } - /** - * None minimum: 10 maximum: 100 - * + /** + * 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) { + public InlineObject3 int32(Integer int32) { + this.int32 = int32; return this; } - /** - * None minimum: 20 maximum: 200 - * + /** + * 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) { + 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) { + public InlineObject3 number(BigDecimal number) { + this.number = number; return this; } - /** - * None minimum: 32.1 maximum: 543.2 - * + /** + * 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) { + public InlineObject3 _float(Float _float) { + this._float = _float; return this; } - /** - * None maximum: 987.6 - * + /** + * 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) { + public InlineObject3 _double(Double _double) { + this._double = _double; return this; } - /** - * None minimum: 67.8 maximum: 123.4 - * + /** + * 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { + 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) { @@ -410,41 +455,28 @@ public class InlineObject3 { 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); + 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); + 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(); @@ -456,9 +488,7 @@ public class InlineObject3 { 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(" 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"); @@ -470,7 +500,8 @@ public class InlineObject3 { } /** - * 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) { @@ -478,4 +509,6 @@ public class InlineObject3 { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject4.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject4.java index 8704fc9a4b1..953ca1d5b2b 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject4.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject4.java @@ -3,23 +3,34 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * InlineObject4 + */ +@JsonPropertyOrder({ + InlineObject4.JSON_PROPERTY_PARAM, + InlineObject4.JSON_PROPERTY_PARAM2 +}) -/** InlineObject4 */ -@JsonPropertyOrder({InlineObject4.JSON_PROPERTY_PARAM, InlineObject4.JSON_PROPERTY_PARAM2}) public class InlineObject4 { public static final String JSON_PROPERTY_PARAM = "param"; private String param; @@ -27,50 +38,55 @@ public class InlineObject4 { public static final String JSON_PROPERTY_PARAM2 = "param2"; private String param2; - public InlineObject4 param(String param) { + 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) { + 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) { @@ -80,8 +96,8 @@ public class InlineObject4 { return false; } InlineObject4 inlineObject4 = (InlineObject4) o; - return Objects.equals(this.param, inlineObject4.param) - && Objects.equals(this.param2, inlineObject4.param2); + return Objects.equals(this.param, inlineObject4.param) && + Objects.equals(this.param2, inlineObject4.param2); } @Override @@ -89,6 +105,7 @@ public class InlineObject4 { return Objects.hash(param, param2); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -100,7 +117,8 @@ public class InlineObject4 { } /** - * 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,4 +126,6 @@ public class InlineObject4 { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject5.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject5.java index d5426d00c12..1b079adfcf9 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject5.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject5.java @@ -3,27 +3,35 @@ * 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.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.File; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** InlineObject5 */ +/** + * 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; @@ -31,51 +39,56 @@ public class InlineObject5 { public static final String JSON_PROPERTY_REQUIRED_FILE = "requiredFile"; private File requiredFile; - public InlineObject5 additionalMetadata(String additionalMetadata) { + 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) { + 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) { @@ -85,8 +98,8 @@ public class InlineObject5 { return false; } InlineObject5 inlineObject5 = (InlineObject5) o; - return Objects.equals(this.additionalMetadata, inlineObject5.additionalMetadata) - && Objects.equals(this.requiredFile, inlineObject5.requiredFile); + return Objects.equals(this.additionalMetadata, inlineObject5.additionalMetadata) && + Objects.equals(this.requiredFile, inlineObject5.requiredFile); } @Override @@ -94,6 +107,7 @@ public class InlineObject5 { return Objects.hash(additionalMetadata, requiredFile); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -105,7 +119,8 @@ public class InlineObject5 { } /** - * 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) { @@ -113,4 +128,6 @@ public class InlineObject5 { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java index f9e010ddc70..6b90bf2a18f 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java @@ -3,50 +3,64 @@ * 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.JsonPropertyOrder; +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.Objects; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * InlineResponseDefault + */ +@JsonPropertyOrder({ + InlineResponseDefault.JSON_PROPERTY_STRING +}) -/** InlineResponseDefault */ -@JsonPropertyOrder({InlineResponseDefault.JSON_PROPERTY_STRING}) public class InlineResponseDefault { public static final String JSON_PROPERTY_STRING = "string"; private Foo string; - public InlineResponseDefault string(Foo string) { + public InlineResponseDefault string(Foo string) { + this.string = string; return this; } - /** + /** * Get string - * * @return string - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Foo getString() { return string; } + public void setString(Foo string) { this.string = string; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -64,6 +78,7 @@ public class InlineResponseDefault { return Objects.hash(string); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -74,7 +89,8 @@ public class InlineResponseDefault { } /** - * 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) { @@ -82,4 +98,6 @@ public class InlineResponseDefault { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MapTest.java index d5d3dfe599d..113f92dd9cb 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MapTest.java @@ -3,40 +3,49 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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 java.util.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** 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> mapMapOfString = null; - /** Gets or Sets inner */ + /** + * Gets or Sets inner + */ public enum InnerEnum { UPPER("UPPER"), - + LOWER("lower"); private String value; @@ -75,8 +84,9 @@ public class MapTest { public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; private Map indirectMap = null; - public MapTest mapMapOfString(Map> mapMapOfString) { + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; return this; } @@ -89,25 +99,27 @@ public class MapTest { return this; } - /** + /** * Get mapMapOfString - * * @return mapMapOfString - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getMapMapOfString() { return mapMapOfString; } + public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; return this; } @@ -120,25 +132,27 @@ public class MapTest { return this; } - /** + /** * Get mapOfEnumString - * * @return mapOfEnumString - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapOfEnumString() { return mapOfEnumString; } + public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { + public MapTest directMap(Map directMap) { + this.directMap = directMap; return this; } @@ -151,25 +165,27 @@ public class MapTest { return this; } - /** + /** * Get directMap - * * @return directMap - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getDirectMap() { return directMap; } + public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; return this; } @@ -182,23 +198,25 @@ public class MapTest { return this; } - /** + /** * Get indirectMap - * * @return indirectMap - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getIndirectMap() { return indirectMap; } + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -208,10 +226,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 @@ -219,6 +237,7 @@ public class MapTest { return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -232,7 +251,8 @@ 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) { @@ -240,4 +260,6 @@ public class MapTest { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9a30d1299f9..d483d69700f 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -3,31 +3,41 @@ * 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.JsonPropertyOrder; +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 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; @@ -38,54 +48,59 @@ public class MixedPropertiesAndAdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP = "map"; private Map map = null; - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; return this; } - /** + /** * 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) { + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; return this; } - /** + /** * 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 map) { + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; return this; } @@ -98,23 +113,25 @@ public class MixedPropertiesAndAdditionalPropertiesClass { return this; } - /** + /** * Get map - * * @return map - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMap() { return map; } + public void setMap(Map map) { this.map = map; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -123,11 +140,10 @@ 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 @@ -135,6 +151,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { return Objects.hash(uuid, dateTime, map); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -147,7 +164,8 @@ 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) { @@ -155,4 +173,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Model200Response.java index b3972c06031..dd99468a005 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Model200Response.java @@ -3,28 +3,35 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Model for testing model name starting with number */ +/** + * Model for testing model name starting with number + */ @ApiModel(description = "Model for testing model name starting with number") @JsonPropertyOrder({ Model200Response.JSON_PROPERTY_NAME, Model200Response.JSON_PROPERTY_PROPERTY_CLASS }) + public class Model200Response { public static final String JSON_PROPERTY_NAME = "name"; private Integer name; @@ -32,52 +39,57 @@ public class Model200Response { public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; private String propertyClass; - public Model200Response name(Integer name) { + public Model200Response name(Integer 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 Integer getName() { return name; } + public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; return this; } - /** + /** * 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) { @@ -87,8 +99,8 @@ public class Model200Response { return false; } Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) - && Objects.equals(this.propertyClass, _200response.propertyClass); + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); } @Override @@ -96,6 +108,7 @@ public class Model200Response { return Objects.hash(name, propertyClass); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -107,7 +120,8 @@ public class Model200Response { } /** - * 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) { @@ -115,4 +129,6 @@ public class Model200Response { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 2efca6f97bd..383cafdd3a5 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -3,27 +3,35 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** ModelApiResponse */ +/** + * ModelApiResponse + */ @JsonPropertyOrder({ ModelApiResponse.JSON_PROPERTY_CODE, ModelApiResponse.JSON_PROPERTY_TYPE, ModelApiResponse.JSON_PROPERTY_MESSAGE }) + public class ModelApiResponse { public static final String JSON_PROPERTY_CODE = "code"; private Integer code; @@ -34,75 +42,82 @@ public class ModelApiResponse { public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; - public ModelApiResponse code(Integer code) { + public ModelApiResponse code(Integer code) { + this.code = code; return this; } - /** + /** * Get code - * * @return code - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCode() { return code; } + public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { + public ModelApiResponse type(String type) { + this.type = type; return this; } - /** + /** * Get type - * * @return type - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { return type; } + public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { + public ModelApiResponse message(String message) { + this.message = message; return this; } - /** + /** * Get message - * * @return message - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { return message; } + public void setMessage(String message) { this.message = message; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -112,9 +127,9 @@ public class ModelApiResponse { return false; } ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) - && Objects.equals(this.type, _apiResponse.type) - && Objects.equals(this.message, _apiResponse.message); + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); } @Override @@ -122,6 +137,7 @@ public class ModelApiResponse { return Objects.hash(code, type, message); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -134,7 +150,8 @@ public class ModelApiResponse { } /** - * 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) { @@ -142,4 +159,6 @@ public class ModelApiResponse { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelReturn.java index 374989b521c..b62e13a90a0 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -3,52 +3,64 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Model for testing reserved words */ +/** + * Model for testing reserved words + */ @ApiModel(description = "Model for testing reserved words") -@JsonPropertyOrder({ModelReturn.JSON_PROPERTY_RETURN}) +@JsonPropertyOrder({ + ModelReturn.JSON_PROPERTY_RETURN +}) + public class ModelReturn { public static final String JSON_PROPERTY_RETURN = "return"; private Integer _return; - public ModelReturn _return(Integer _return) { + public ModelReturn _return(Integer _return) { + this._return = _return; return this; } - /** + /** * Get _return - * * @return _return - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_RETURN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getReturn() { return _return; } + public void setReturn(Integer _return) { this._return = _return; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -66,6 +78,7 @@ public class ModelReturn { return Objects.hash(_return); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -76,7 +89,8 @@ public class ModelReturn { } /** - * 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) { @@ -84,4 +98,6 @@ public class ModelReturn { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Name.java index 918eb738e28..bd625c5f66f 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Name.java @@ -3,23 +3,29 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Model for testing model name same as property name */ +/** + * Model for testing model name same as property name + */ @ApiModel(description = "Model for testing model name same as property name") @JsonPropertyOrder({ Name.JSON_PROPERTY_NAME, @@ -27,6 +33,7 @@ import java.util.Objects; Name.JSON_PROPERTY_PROPERTY, Name.JSON_PROPERTY_123NUMBER }) + public class Name { public static final String JSON_PROPERTY_NAME = "name"; private Integer name; @@ -40,77 +47,88 @@ public class Name { public static final String JSON_PROPERTY_123NUMBER = "123Number"; private Integer _123number; - public Name name(Integer name) { + public Name name(Integer name) { + this.name = name; return this; } - /** + /** * Get name - * * @return name - */ + **/ @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getName() { return name; } + public void setName(Integer name) { this.name = name; } - /** + + /** * Get snakeCase - * * @return snakeCase - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SNAKE_CASE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSnakeCase() { return snakeCase; } - public Name property(String property) { + + + public Name property(String property) { + this.property = property; return this; } - /** + /** * Get property - * * @return property - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { return property; } + public void setProperty(String property) { this.property = property; } - /** + + /** * Get _123number - * * @return _123number - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer get123number() { return _123number; } + + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -120,10 +138,10 @@ public class Name { return false; } Name name = (Name) o; - return Objects.equals(this.name, name.name) - && Objects.equals(this.snakeCase, name.snakeCase) - && Objects.equals(this.property, name.property) - && Objects.equals(this._123number, name._123number); + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); } @Override @@ -131,6 +149,7 @@ public class Name { return Objects.hash(name, snakeCase, property, _123number); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -144,7 +163,8 @@ public class Name { } /** - * 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) { @@ -152,4 +172,6 @@ public class Name { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NullableClass.java index 1c74f6e2158..31e6e1b2dd0 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NullableClass.java @@ -3,31 +3,39 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; -import org.openapitools.jackson.nullable.JsonNullable; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** NullableClass */ +/** + * NullableClass + */ @JsonPropertyOrder({ NullableClass.JSON_PROPERTY_INTEGER_PROP, NullableClass.JSON_PROPERTY_NUMBER_PROP, @@ -42,6 +50,7 @@ import org.threeten.bp.OffsetDateTime; NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE }) + public class NullableClass extends HashMap { public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; private JsonNullable integerProp = JsonNullable.undefined(); @@ -64,50 +73,47 @@ public class NullableClass extends HashMap { public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); - public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = - "array_and_items_nullable_prop"; - private JsonNullable> arrayAndItemsNullableProp = - JsonNullable.>undefined(); + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; private List arrayItemsNullable = null; public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; - private JsonNullable> objectNullableProp = - JsonNullable.>undefined(); + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); - public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = - "object_and_items_nullable_prop"; - private JsonNullable> objectAndItemsNullableProp = - JsonNullable.>undefined(); + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; private Map objectItemsNullable = null; + public NullableClass integerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); - + return this; } - /** + /** * Get integerProp - * * @return integerProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public Integer getIntegerProp() { - return integerProp.orElse(null); + return integerProp.orElse(null); } @JsonProperty(JSON_PROPERTY_INTEGER_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIntegerProp_JsonNullable() { return integerProp; } - + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) public void setIntegerProp_JsonNullable(JsonNullable integerProp) { this.integerProp = integerProp; @@ -117,30 +123,32 @@ public class NullableClass extends HashMap { this.integerProp = JsonNullable.of(integerProp); } + public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); - + return this; } - /** + /** * Get numberProp - * * @return numberProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public BigDecimal getNumberProp() { - return numberProp.orElse(null); + return numberProp.orElse(null); } @JsonProperty(JSON_PROPERTY_NUMBER_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNumberProp_JsonNullable() { return numberProp; } - + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) public void setNumberProp_JsonNullable(JsonNullable numberProp) { this.numberProp = numberProp; @@ -150,30 +158,32 @@ public class NullableClass extends HashMap { this.numberProp = JsonNullable.of(numberProp); } + public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); - + return this; } - /** + /** * Get booleanProp - * * @return booleanProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public Boolean getBooleanProp() { - return booleanProp.orElse(null); + return booleanProp.orElse(null); } @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getBooleanProp_JsonNullable() { return booleanProp; } - + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { this.booleanProp = booleanProp; @@ -183,30 +193,32 @@ public class NullableClass extends HashMap { this.booleanProp = JsonNullable.of(booleanProp); } + public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); - + return this; } - /** + /** * Get stringProp - * * @return stringProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public String getStringProp() { - return stringProp.orElse(null); + return stringProp.orElse(null); } @JsonProperty(JSON_PROPERTY_STRING_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getStringProp_JsonNullable() { return stringProp; } - + @JsonProperty(JSON_PROPERTY_STRING_PROP) public void setStringProp_JsonNullable(JsonNullable stringProp) { this.stringProp = stringProp; @@ -216,30 +228,32 @@ public class NullableClass extends HashMap { this.stringProp = JsonNullable.of(stringProp); } + public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); - + return this; } - /** + /** * Get dateProp - * * @return dateProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public LocalDate getDateProp() { - return dateProp.orElse(null); + return dateProp.orElse(null); } @JsonProperty(JSON_PROPERTY_DATE_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDateProp_JsonNullable() { return dateProp; } - + @JsonProperty(JSON_PROPERTY_DATE_PROP) public void setDateProp_JsonNullable(JsonNullable dateProp) { this.dateProp = dateProp; @@ -249,30 +263,32 @@ public class NullableClass extends HashMap { this.dateProp = JsonNullable.of(dateProp); } + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); - + return this; } - /** + /** * Get datetimeProp - * * @return datetimeProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public OffsetDateTime getDatetimeProp() { - return datetimeProp.orElse(null); + return datetimeProp.orElse(null); } @JsonProperty(JSON_PROPERTY_DATETIME_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDatetimeProp_JsonNullable() { return datetimeProp; } - + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { this.datetimeProp = datetimeProp; @@ -282,9 +298,10 @@ public class NullableClass extends HashMap { this.datetimeProp = JsonNullable.of(datetimeProp); } + public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); - + return this; } @@ -300,24 +317,25 @@ public class NullableClass extends HashMap { return this; } - /** + /** * Get arrayNullableProp - * * @return arrayNullableProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public List getArrayNullableProp() { - return arrayNullableProp.orElse(null); + return arrayNullableProp.orElse(null); } @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getArrayNullableProp_JsonNullable() { return arrayNullableProp; } - + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { this.arrayNullableProp = arrayNullableProp; @@ -327,9 +345,10 @@ public class NullableClass extends HashMap { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); - + return this; } @@ -345,27 +364,27 @@ public class NullableClass extends HashMap { return this; } - /** + /** * Get arrayAndItemsNullableProp - * * @return arrayAndItemsNullableProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public List getArrayAndItemsNullableProp() { - return arrayAndItemsNullableProp.orElse(null); + return arrayAndItemsNullableProp.orElse(null); } @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { return arrayAndItemsNullableProp; } - + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) - public void setArrayAndItemsNullableProp_JsonNullable( - JsonNullable> arrayAndItemsNullableProp) { + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; } @@ -373,8 +392,9 @@ public class NullableClass extends HashMap { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; return this; } @@ -387,26 +407,28 @@ public class NullableClass extends HashMap { return this; } - /** + /** * Get arrayItemsNullable - * * @return arrayItemsNullable - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getArrayItemsNullable() { return arrayItemsNullable; } + public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } + public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); - + return this; } @@ -422,27 +444,27 @@ public class NullableClass extends HashMap { return this; } - /** + /** * Get objectNullableProp - * * @return objectNullableProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public Map getObjectNullableProp() { - return objectNullableProp.orElse(null); + return objectNullableProp.orElse(null); } @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getObjectNullableProp_JsonNullable() { return objectNullableProp; } - + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) - public void setObjectNullableProp_JsonNullable( - JsonNullable> objectNullableProp) { + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { this.objectNullableProp = objectNullableProp; } @@ -450,18 +472,16 @@ public class NullableClass extends HashMap { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = - JsonNullable.>of(objectAndItemsNullableProp); + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + return this; } - public NullableClass putObjectAndItemsNullablePropItem( - String key, Object objectAndItemsNullablePropItem) { + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { - this.objectAndItemsNullableProp = - JsonNullable.>of(new HashMap()); + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap()); } try { this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); @@ -471,37 +491,37 @@ public class NullableClass extends HashMap { return this; } - /** + /** * Get objectAndItemsNullableProp - * * @return objectAndItemsNullableProp - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonIgnore + public Map getObjectAndItemsNullableProp() { - return objectAndItemsNullableProp.orElse(null); + return objectAndItemsNullableProp.orElse(null); } @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { return objectAndItemsNullableProp; } - + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) - public void setObjectAndItemsNullableProp_JsonNullable( - JsonNullable> objectAndItemsNullableProp) { + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { this.objectAndItemsNullableProp = objectAndItemsNullableProp; } public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = - JsonNullable.>of(objectAndItemsNullableProp); + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { + public NullableClass objectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; return this; } @@ -514,23 +534,25 @@ public class NullableClass extends HashMap { return this; } - /** + /** * Get objectItemsNullable - * * @return objectItemsNullable - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getObjectItemsNullable() { return objectItemsNullable; } + public void setObjectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -540,39 +562,27 @@ public class NullableClass extends HashMap { return false; } NullableClass nullableClass = (NullableClass) o; - return Objects.equals(this.integerProp, nullableClass.integerProp) - && Objects.equals(this.numberProp, nullableClass.numberProp) - && Objects.equals(this.booleanProp, nullableClass.booleanProp) - && Objects.equals(this.stringProp, nullableClass.stringProp) - && Objects.equals(this.dateProp, nullableClass.dateProp) - && Objects.equals(this.datetimeProp, nullableClass.datetimeProp) - && Objects.equals(this.arrayNullableProp, nullableClass.arrayNullableProp) - && Objects.equals(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) - && Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) - && Objects.equals(this.objectNullableProp, nullableClass.objectNullableProp) - && Objects.equals(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) - && Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) - && super.equals(o); + return Objects.equals(this.integerProp, nullableClass.integerProp) && + Objects.equals(this.numberProp, nullableClass.numberProp) && + Objects.equals(this.booleanProp, nullableClass.booleanProp) && + Objects.equals(this.stringProp, nullableClass.stringProp) && + Objects.equals(this.dateProp, nullableClass.dateProp) && + Objects.equals(this.datetimeProp, nullableClass.datetimeProp) && + Objects.equals(this.arrayNullableProp, nullableClass.arrayNullableProp) && + Objects.equals(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + Objects.equals(this.objectNullableProp, nullableClass.objectNullableProp) && + Objects.equals(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash( - integerProp, - numberProp, - booleanProp, - stringProp, - dateProp, - datetimeProp, - arrayNullableProp, - arrayAndItemsNullableProp, - arrayItemsNullable, - objectNullableProp, - objectAndItemsNullableProp, - objectItemsNullable, - super.hashCode()); + return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -585,23 +595,18 @@ public class NullableClass extends HashMap { sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); - sb.append(" arrayAndItemsNullableProp: ") - .append(toIndentedString(arrayAndItemsNullableProp)) - .append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); - sb.append(" objectAndItemsNullableProp: ") - .append(toIndentedString(objectAndItemsNullableProp)) - .append("\n"); - sb.append(" objectItemsNullable: ") - .append(toIndentedString(objectItemsNullable)) - .append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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) { @@ -609,4 +614,6 @@ public class NullableClass extends HashMap { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NumberOnly.java index 04ea549f07c..5ca72a169fe 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -3,51 +3,64 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * NumberOnly + */ +@JsonPropertyOrder({ + NumberOnly.JSON_PROPERTY_JUST_NUMBER +}) -/** NumberOnly */ -@JsonPropertyOrder({NumberOnly.JSON_PROPERTY_JUST_NUMBER}) public class NumberOnly { public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; private BigDecimal justNumber; - public NumberOnly justNumber(BigDecimal justNumber) { + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; return this; } - /** + /** * Get justNumber - * * @return justNumber - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getJustNumber() { return justNumber; } + public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -65,6 +78,7 @@ public class NumberOnly { return Objects.hash(justNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -75,7 +89,8 @@ public class NumberOnly { } /** - * 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) { @@ -83,4 +98,6 @@ public class NumberOnly { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Order.java index b78b7482b4e..6e281630216 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Order.java @@ -3,25 +3,30 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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.Objects; import org.threeten.bp.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Order */ +/** + * Order + */ @JsonPropertyOrder({ Order.JSON_PROPERTY_ID, Order.JSON_PROPERTY_PET_ID, @@ -30,6 +35,7 @@ import org.threeten.bp.OffsetDateTime; Order.JSON_PROPERTY_STATUS, Order.JSON_PROPERTY_COMPLETE }) + public class Order { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -43,12 +49,14 @@ public class Order { public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; private OffsetDateTime shipDate; - /** Order Status */ + /** + * Order Status + */ public enum StatusEnum { PLACED("placed"), - + APPROVED("approved"), - + DELIVERED("delivered"); private String value; @@ -84,144 +92,157 @@ public class Order { public static final String JSON_PROPERTY_COMPLETE = "complete"; private Boolean complete = false; - public Order id(Long id) { + public Order id(Long id) { + this.id = id; return this; } - /** + /** * 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 Order petId(Long petId) { + public Order petId(Long petId) { + this.petId = petId; return this; } - /** + /** * Get petId - * * @return petId - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPetId() { return petId; } + public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { + public Order quantity(Integer quantity) { + this.quantity = quantity; return this; } - /** + /** * Get quantity - * * @return quantity - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getQuantity() { return quantity; } + public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; return this; } - /** + /** * Get shipDate - * * @return shipDate - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getShipDate() { return shipDate; } + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { + public Order status(StatusEnum status) { + this.status = status; return this; } - /** + /** * Order Status - * * @return status - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "Order Status") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { return status; } + public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { + public Order complete(Boolean complete) { + this.complete = complete; return this; } - /** + /** * Get complete - * * @return complete - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getComplete() { return complete; } + public void setComplete(Boolean complete) { this.complete = complete; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -231,12 +252,12 @@ public class Order { return false; } Order order = (Order) o; - return Objects.equals(this.id, order.id) - && Objects.equals(this.petId, order.petId) - && Objects.equals(this.quantity, order.quantity) - && Objects.equals(this.shipDate, order.shipDate) - && Objects.equals(this.status, order.status) - && Objects.equals(this.complete, order.complete); + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); } @Override @@ -244,6 +265,7 @@ public class Order { return Objects.hash(id, petId, quantity, shipDate, status, complete); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -259,7 +281,8 @@ public class Order { } /** - * 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) { @@ -267,4 +290,6 @@ public class Order { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterComposite.java index 1fd74d7906f..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -3,28 +3,36 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** OuterComposite */ +/** + * OuterComposite + */ @JsonPropertyOrder({ OuterComposite.JSON_PROPERTY_MY_NUMBER, OuterComposite.JSON_PROPERTY_MY_STRING, OuterComposite.JSON_PROPERTY_MY_BOOLEAN }) + public class OuterComposite { public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; private BigDecimal myNumber; @@ -35,75 +43,82 @@ public class OuterComposite { public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; private Boolean myBoolean; - public OuterComposite myNumber(BigDecimal myNumber) { + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; return this; } - /** + /** * Get myNumber - * * @return myNumber - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMyNumber() { return myNumber; } + public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { + public OuterComposite myString(String myString) { + this.myString = myString; return this; } - /** + /** * Get myString - * * @return myString - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMyString() { return myString; } + public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; return this; } - /** + /** * Get myBoolean - * * @return myBoolean - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMyBoolean() { return myBoolean; } + public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -113,9 +128,9 @@ public class OuterComposite { return false; } OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) - && Objects.equals(this.myString, outerComposite.myString) - && Objects.equals(this.myBoolean, outerComposite.myBoolean); + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); } @Override @@ -123,6 +138,7 @@ public class OuterComposite { return Objects.hash(myNumber, myString, myBoolean); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -135,7 +151,8 @@ public class OuterComposite { } /** - * 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) { @@ -143,4 +160,6 @@ public class OuterComposite { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnum.java index 6d7255bbe62..d0c0bc3c9d2 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -3,25 +3,32 @@ * 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.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets OuterEnum */ +/** + * Gets or Sets OuterEnum + */ public enum OuterEnum { + PLACED("placed"), - + APPROVED("approved"), - + DELIVERED("delivered"); private String value; @@ -50,3 +57,4 @@ public enum OuterEnum { return null; } } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java index 109be684331..7f6c2c73aa2 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -3,25 +3,32 @@ * 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.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets OuterEnumDefaultValue */ +/** + * Gets or Sets OuterEnumDefaultValue + */ public enum OuterEnumDefaultValue { + PLACED("placed"), - + APPROVED("approved"), - + DELIVERED("delivered"); private String value; @@ -50,3 +57,4 @@ public enum OuterEnumDefaultValue { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumInteger.java index 277107e0103..c747a2e6dae 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -3,25 +3,32 @@ * 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.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets OuterEnumInteger */ +/** + * Gets or Sets OuterEnumInteger + */ public enum OuterEnumInteger { + NUMBER_0(0), - + NUMBER_1(1), - + NUMBER_2(2); private Integer value; @@ -50,3 +57,4 @@ public enum OuterEnumInteger { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java index 91c11e7b4aa..4f5fcd1cd95 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -3,25 +3,32 @@ * 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.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets OuterEnumIntegerDefaultValue */ +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ public enum OuterEnumIntegerDefaultValue { + NUMBER_0(0), - + NUMBER_1(1), - + NUMBER_2(2); private Integer value; @@ -50,3 +57,4 @@ public enum OuterEnumIntegerDefaultValue { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Pet.java index 7690da073c1..be74dd5ca08 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Pet.java @@ -3,26 +3,33 @@ * 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 java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +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.ArrayList; import java.util.List; -import java.util.Objects; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** Pet */ +/** + * Pet + */ @JsonPropertyOrder({ Pet.JSON_PROPERTY_ID, Pet.JSON_PROPERTY_CATEGORY, @@ -31,6 +38,7 @@ import java.util.Objects; Pet.JSON_PROPERTY_TAGS, Pet.JSON_PROPERTY_STATUS }) + public class Pet { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -47,12 +55,14 @@ public class Pet { public static final String JSON_PROPERTY_TAGS = "tags"; private List tags = null; - /** pet status in the store */ + /** + * pet status in the store + */ public enum StatusEnum { AVAILABLE("available"), - + PENDING("pending"), - + SOLD("sold"); private String value; @@ -85,76 +95,83 @@ public class Pet { public static final String JSON_PROPERTY_STATUS = "status"; private StatusEnum status; - public Pet id(Long id) { + public Pet id(Long id) { + this.id = id; return this; } - /** + /** * 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 Pet category(Category category) { + public Pet category(Category category) { + this.category = category; return this; } - /** + /** * Get category - * * @return category - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Category getCategory() { return category; } + public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { + public Pet name(String name) { + this.name = name; return this; } - /** + /** * Get name - * * @return name - */ + **/ @ApiModelProperty(example = "doggie", 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; } - public Pet photoUrls(List photoUrls) { + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; return this; } @@ -164,24 +181,26 @@ public class Pet { return this; } - /** + /** * Get photoUrls - * * @return photoUrls - */ + **/ @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPhotoUrls() { return photoUrls; } + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List tags) { + this.tags = tags; return this; } @@ -194,46 +213,50 @@ public class Pet { return this; } - /** + /** * Get tags - * * @return tags - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { return tags; } + public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { + public Pet status(StatusEnum status) { + this.status = status; return this; } - /** + /** * pet status in the store - * * @return status - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "pet status in the store") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { return status; } + public void setStatus(StatusEnum status) { this.status = status; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -243,12 +266,12 @@ public class Pet { return false; } Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) - && Objects.equals(this.category, pet.category) - && Objects.equals(this.name, pet.name) - && Objects.equals(this.photoUrls, pet.photoUrls) - && Objects.equals(this.tags, pet.tags) - && Objects.equals(this.status, pet.status); + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); } @Override @@ -256,6 +279,7 @@ public class Pet { return Objects.hash(id, category, name, photoUrls, tags, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -271,7 +295,8 @@ public class Pet { } /** - * 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) { @@ -279,4 +304,6 @@ public class Pet { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 11ad89b4d01..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -3,23 +3,34 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * ReadOnlyFirst + */ +@JsonPropertyOrder({ + ReadOnlyFirst.JSON_PROPERTY_BAR, + ReadOnlyFirst.JSON_PROPERTY_BAZ +}) -/** ReadOnlyFirst */ -@JsonPropertyOrder({ReadOnlyFirst.JSON_PROPERTY_BAR, ReadOnlyFirst.JSON_PROPERTY_BAZ}) public class ReadOnlyFirst { public static final String JSON_PROPERTY_BAR = "bar"; private String bar; @@ -27,42 +38,48 @@ public class ReadOnlyFirst { public static final String JSON_PROPERTY_BAZ = "baz"; private String baz; - /** + + /** * Get bar - * * @return bar - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBar() { return bar; } - public ReadOnlyFirst baz(String baz) { + + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; return this; } - /** + /** * Get baz - * * @return baz - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAZ) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaz() { return baz; } + public void setBaz(String baz) { this.baz = baz; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,8 +89,8 @@ public class ReadOnlyFirst { return false; } ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) - && Objects.equals(this.baz, readOnlyFirst.baz); + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); } @Override @@ -81,6 +98,7 @@ public class ReadOnlyFirst { return Objects.hash(bar, baz); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -92,7 +110,8 @@ public class ReadOnlyFirst { } /** - * 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) { @@ -100,4 +119,6 @@ public class ReadOnlyFirst { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/SpecialModelName.java index 2749ec0c7b4..b588ef95226 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -3,50 +3,63 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * SpecialModelName + */ +@JsonPropertyOrder({ + SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME +}) -/** SpecialModelName */ -@JsonPropertyOrder({SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME}) public class SpecialModelName { public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; private Long $specialPropertyName; - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; return this; } - /** + /** * Get $specialPropertyName - * * @return $specialPropertyName - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long get$SpecialPropertyName() { return $specialPropertyName; } + public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -64,19 +77,19 @@ public class SpecialModelName { return Objects.hash($specialPropertyName); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ") - .append(toIndentedString($specialPropertyName)) - .append("\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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) { @@ -84,4 +97,6 @@ public class SpecialModelName { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Tag.java index f2155a9a7e7..a3ecb398faa 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Tag.java @@ -3,23 +3,34 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * Tag + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) -/** Tag */ -@JsonPropertyOrder({Tag.JSON_PROPERTY_ID, Tag.JSON_PROPERTY_NAME}) public class Tag { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -27,52 +38,57 @@ public class Tag { public static final String JSON_PROPERTY_NAME = "name"; private String name; - public Tag id(Long id) { + public Tag id(Long id) { + this.id = id; return this; } - /** + /** * 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 Tag name(String name) { + public Tag 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) { @@ -82,7 +98,8 @@ public class Tag { return false; } Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && Objects.equals(this.name, tag.name); + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); } @Override @@ -90,6 +107,7 @@ public class Tag { return Objects.hash(id, name); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -101,7 +119,8 @@ public class Tag { } /** - * 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) { @@ -109,4 +128,6 @@ public class Tag { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/User.java index 637c9625657..b7e74643dab 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/User.java @@ -3,22 +3,29 @@ * 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.JsonPropertyOrder; +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.Objects; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** User */ +/** + * User + */ @JsonPropertyOrder({ User.JSON_PROPERTY_ID, User.JSON_PROPERTY_USERNAME, @@ -29,6 +36,7 @@ import java.util.Objects; User.JSON_PROPERTY_PHONE, User.JSON_PROPERTY_USER_STATUS }) + public class User { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -54,190 +62,207 @@ public class User { public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; private Integer userStatus; - public User id(Long id) { + public User id(Long id) { + this.id = id; return this; } - /** + /** * 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 User username(String username) { + public User username(String username) { + this.username = username; return this; } - /** + /** * Get username - * * @return username - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUsername() { return username; } + public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { + public User firstName(String firstName) { + this.firstName = firstName; return this; } - /** + /** * Get firstName - * * @return firstName - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFirstName() { return firstName; } + public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { + public User lastName(String lastName) { + this.lastName = lastName; return this; } - /** + /** * Get lastName - * * @return lastName - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastName() { return lastName; } + public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { + public User email(String email) { + this.email = email; return this; } - /** + /** * Get email - * * @return email - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { return email; } + public void setEmail(String email) { this.email = email; } - public User password(String password) { + public User password(String password) { + this.password = password; return this; } - /** + /** * Get password - * * @return password - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } - public User phone(String phone) { + public User phone(String phone) { + this.phone = phone; return this; } - /** + /** * Get phone - * * @return phone - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPhone() { return phone; } + public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; return this; } - /** + /** * User Status - * * @return userStatus - */ + **/ @javax.annotation.Nullable @ApiModelProperty(value = "User Status") @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getUserStatus() { return userStatus; } + public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -247,14 +272,14 @@ public class User { return false; } User user = (User) o; - return Objects.equals(this.id, user.id) - && Objects.equals(this.username, user.username) - && Objects.equals(this.firstName, user.firstName) - && Objects.equals(this.lastName, user.lastName) - && Objects.equals(this.email, user.email) - && Objects.equals(this.password, user.password) - && Objects.equals(this.phone, user.phone) - && Objects.equals(this.userStatus, user.userStatus); + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); } @Override @@ -262,6 +287,7 @@ public class User { return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -279,7 +305,8 @@ public class User { } /** - * 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) { @@ -287,4 +314,6 @@ public class User { } return o.toString().replace("\n", "\n "); } + } + diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeApiTest.java index 6426c753cad..2847096c224 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -70,7 +70,7 @@ public class FakeApiTest { HttpSignatureAuth auth = (HttpSignatureAuth) client.getAuthentication("http_signature_test"); auth.setAlgorithm(Algorithm.RSA_SHA512); auth.setHeaders(Arrays.asList("(request-target)", "host", "date")); - auth.setup(privateKey); + auth.setPrivateKey(privateKey); Pet pet = new Pet(); pet.setId(10l);