diff --git a/bin/java-petstore-jersey2-experimental.sh b/bin/java-petstore-jersey2-experimental.sh index a4ab8a13a843..2bd023c97b47 100755 --- a/bin/java-petstore-jersey2-experimental.sh +++ b/bin/java-petstore-jersey2-experimental.sh @@ -27,13 +27,15 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-experimental.json -o samples/client/petstore/java/jersey2-experimental -t modules/openapi-generator/src/main/resources/Java --additional-properties hideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-experimental.json -o samples/client/petstore/java/jersey2-experimental -t modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental --additional-properties hideGenerationTimestamp=true $@" echo "Removing files and folders under samples/client/petstore/java/jersey2-experimental/src/main" rm -rf samples/client/petstore/java/jersey2-experimental/src/main find samples/client/petstore/java/jersey2-experimental -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags +#mvn com.coveo:fmt-maven-plugin:format -f samples/client/petstore/java/jersey2-experimental/pom.xml + # copy additional manually written unit-tests #mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client #mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index 5caf5c0b679f..e708b1f7e624 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -373,6 +373,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java")); if (JERSEY2_EXPERIMENTAL.equals(getLibrary())) { + supportingFiles.add(new SupportingFile("auth/HttpSignatureAuth.mustache", authFolder, "HttpSignatureAuth.java")); supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java")); } forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/ApiClient.mustache index 618264dc90c0..10a976f6d760 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/ApiClient.mustache @@ -23,6 +23,7 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature; import java.io.IOException; import java.io.InputStream; +import java.net.URI; {{^supportJava6}} import java.nio.file.Files; import java.nio.file.StandardCopyOption; @@ -56,6 +57,7 @@ import java.util.regex.Pattern; import {{invokerPackage}}.auth.Authentication; import {{invokerPackage}}.auth.HttpBasicAuth; import {{invokerPackage}}.auth.HttpBearerAuth; +import {{invokerPackage}}.auth.HttpSignatureAuth; import {{invokerPackage}}.auth.ApiKeyAuth; import {{invokerPackage}}.model.AbstractOpenApiSchema; @@ -159,11 +161,26 @@ public class ApiClient { setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); // Setup authentications (key: authentication name, value: authentication). - authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} - authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} - authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} - authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} + authentications = new HashMap(); + {{#authMethods}} + {{#isBasic}} + {{#isBasicBasic}} + authentications.put("{{name}}", new HttpBasicAuth()); + {{/isBasicBasic}} + {{#isBasicBearer}} + authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}")); + {{/isBasicBearer}} + {{#isHttpSignature}} + authentications.put("{{name}}", new HttpSignatureAuth("{{name}}", null, null)); + {{/isHttpSignature}} + {{/isBasic}} + {{#isApiKey}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}")); + {{/isApiKey}} + {{#isOAuth}} + authentications.put("{{name}}", new OAuth()); + {{/isOAuth}} + {{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -701,6 +718,38 @@ public class ApiClient { return entity; } + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON, HTTP form is supported for now). + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType) throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + return json.getMapper().writeValueAsString(obj); + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{ Object result = null; @@ -862,7 +911,6 @@ public class ApiClient { * @throws ApiException API exception */ public 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 { - updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(targetURL).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -935,6 +983,14 @@ public class ApiClient { Entity entity = serialize(body, formParams, contentType); + // put all headers in one place + Map allHeaderParams = new HashMap<>(); + allHeaderParams.putAll(defaultHeaderMap); + allHeaderParams.putAll(headerParams); + + // update different parameters (e.g. headers) for authentication + updateParamsForAuth(authNames, queryParams, allHeaderParams, cookieParams, serializeToString(body, formParams, contentType), method, target.getUri()); + Response response = null; try { @@ -1061,12 +1117,17 @@ public class ApiClient { * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI */ - protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + 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) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams, cookieParams); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/JSON.mustache index b442f0836da8..e25b307f7d0c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/JSON.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/JSON.mustache @@ -62,4 +62,6 @@ public class JSON implements ContextResolver { public ObjectMapper getContext(Class type) { return mapper; } + + public ObjectMapper getMapper() { return mapper; } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/ApiKeyAuth.mustache new file mode 100644 index 000000000000..1731f936fb87 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/ApiKeyAuth.mustache @@ -0,0 +1,68 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/Authentication.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/Authentication.mustache new file mode 100644 index 000000000000..46d9c1ab6ace --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/Authentication.mustache @@ -0,0 +1,22 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpBasicAuth.mustache new file mode 100644 index 000000000000..898bb97ee782 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpBasicAuth.mustache @@ -0,0 +1,62 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +{{^java8}} +import com.migcomponents.migbase64.Base64; +{{/java8}} +{{#java8}} +import java.util.Base64; +import java.nio.charset.StandardCharsets; +{{/java8}} + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{^java8}} +import java.io.UnsupportedEncodingException; +{{/java8}} + +{{>generatedAnnotation}} +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List 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); +{{^java8}} + try { + headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false)); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } +{{/java8}} +{{#java8}} + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); +{{/java8}} + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpBearerAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpBearerAuth.mustache new file mode 100644 index 000000000000..110a11ea7798 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpBearerAuth.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List 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); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} 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 new file mode 100644 index 000000000000..3a856e3bc3c5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/HttpSignatureAuth.mustache @@ -0,0 +1,115 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.Key; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.List; + +import org.tomitribe.auth.signatures.*; + +public class HttpSignatureAuth implements Authentication { + + private Signer signer; + + private String name; + + private Algorithm algorithm; + + private List headers; + + public HttpSignatureAuth(String name, Algorithm algorithm, List headers) { + this.name = name; + this.algorithm = algorithm; + this.headers = headers; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Algorithm getAlgorithm() { + return algorithm; + } + + public void setAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + } + + public List getHeaders() { + return headers; + } + + public void setHeaders(List headers) { + this.headers = headers; + } + + public Signer getSigner() { + return signer; + } + + public void setSigner(Signer signer) { + this.signer = signer; + } + + public void setup(Key key) throws ApiException { + if (key == null) { + throw new ApiException("key (java.security.Key) cannot be null"); + } + + signer = new Signer(key, new Signature(name, algorithm, null, headers)); + } + + @Override + public void applyToParams(List 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())); + } + + if (headers.contains("digest")) { + headerParams.put("digest", "SHA-256=" + new String(Base64.getEncoder().encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes())))); + } + + if (signer == null) { + throw new ApiException("Signer cannot be null. Please run the method `setup` to set it up correctly"); + } + + // construct the path with the URL query string + String path = uri.getPath(); + + List urlQueries = new ArrayList(); + for (Pair queryParam : queryParams) { + urlQueries.add(queryParam.getName() + "=" + URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20")); + } + + if (!urlQueries.isEmpty()) { + path = path + "?" + String.join("&", urlQueries); + } + + headerParams.put("Authorization", signer.sign(method, path, headerParams).toString()); + } catch (Exception ex) { + throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString()); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/OAuth.mustache new file mode 100644 index 000000000000..8622798ad378 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/OAuth.mustache @@ -0,0 +1,30 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.Pair; +import {{invokerPackage}}.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +{{>generatedAnnotation}} +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/OAuthFlow.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/OAuthFlow.mustache new file mode 100644 index 000000000000..002e9572f33f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/auth/OAuthFlow.mustache @@ -0,0 +1,7 @@ +{{>licenseInfo}} + +package {{invokerPackage}}.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/pom.mustache index bf1c3648c20e..a71ab2638633 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental/pom.mustache @@ -63,7 +63,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 3.0.0-M4 @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + 10 @@ -142,7 +142,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + 3.8.1 {{#supportJava6}} 1.6 @@ -158,6 +158,13 @@ 1.7 {{/java8}} {{/supportJava6}} + true + 128m + 512m + + -Xlint:all + -J-Xss4m + @@ -283,64 +290,67 @@ ${jackson-databind-nullable-version} {{#withXml}} - - - - org.glassfish.jersey.media - jersey-media-jaxb - ${jersey-version} - - + + + org.glassfish.jersey.media + jersey-media-jaxb + ${jersey-version} + {{/withXml}} {{#joda}} - - com.fasterxml.jackson.datatype - jackson-datatype-joda - ${jackson-version} - + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + {{/joda}} {{#java8}} - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-version} - + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + {{/java8}} {{#threetenbp}} - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${threetenbp-version} - + + com.github.joschi.jackson + jackson-datatype-threetenbp + ${threetenbp-version} + {{/threetenbp}} {{^java8}} - - - com.brsanthu - migbase64 - 2.2 - + + + com.brsanthu + migbase64 + 2.2 + {{/java8}} {{#supportJava6}} - - org.apache.commons - commons-lang3 - ${commons_lang3_version} - - - commons-io - commons-io - ${commons_io_version} - + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + commons-io + commons-io + ${commons-io-version} + {{/supportJava6}} + + org.tomitribe + tomitribe-http-signatures + ${http-signature-version} + {{#useBeanValidation}} - - - javax.validation - validation-api - 1.1.0.Final - provided - + + + javax.validation + validation-api + 1.1.0.Final + provided + {{/useBeanValidation}} @@ -358,8 +368,8 @@ {{/supportJava6}} {{#supportJava6}} 2.6 - 2.5 - 3.6 + 2.5 + 3.6 {{/supportJava6}} 2.10.3 2.10.3 @@ -368,5 +378,6 @@ 2.9.10 {{/threetenbp}} 4.13 + 1.3 diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 87f547a24b2c..5ee649052b29 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1113,7 +1113,7 @@ paths: schema: type: string security: - - http_signature_test + - http_signature_test: [] requestBody: $ref: '#/components/requestBodies/Pet' responses: diff --git a/samples/client/petstore/java/jersey2-experimental/api/openapi.yaml b/samples/client/petstore/java/jersey2-experimental/api/openapi.yaml index 30aad25824c8..755ea4c03013 100644 --- a/samples/client/petstore/java/jersey2-experimental/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-experimental/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: @@ -9,7 +9,28 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: http://{server}.swagger.io:{port}/v2 + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: https://localhost:8080/{version} + variables: + version: + default: v2 + enum: + - v1 + - v2 tags: - description: Everything about your Pets name: pet @@ -18,25 +39,23 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_default' + description: response + x-accepts: application/json /pet: post: operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: - "200": - content: {} - description: successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +64,18 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json put: operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: - "200": - content: {} - description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,9 +84,11 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -118,7 +124,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -160,7 +165,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -174,23 +178,24 @@ paths: delete: operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: - "200": - content: {} - description: successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -205,12 +210,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -222,10 +229,8 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] @@ -237,13 +242,16 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -254,9 +262,9 @@ paths: status: description: Updated status of the pet type: string + type: object responses: "405": - content: {} description: Invalid input security: - petstore_auth: @@ -272,13 +280,16 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -290,6 +301,7 @@ paths: description: file to upload format: binary type: string + type: object responses: "200": content: @@ -331,7 +343,7 @@ paths: operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -347,13 +359,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -362,17 +372,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -384,6 +394,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -392,6 +403,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -403,10 +415,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -418,81 +428,65 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /user/createWithArray: post: operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /user/createWithList: post: operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /user/login: get: operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -506,16 +500,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -526,7 +523,6 @@ paths: operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -538,17 +534,17 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: @@ -558,11 +554,13 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -574,10 +572,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -588,42 +584,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -636,7 +626,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json /fake: @@ -645,44 +634,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Someting wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -696,6 +701,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -706,8 +712,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -715,10 +723,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -729,8 +739,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -738,25 +750,33 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form requestBody: + $ref: '#/components/requestBodies/inline_object_2' content: application/x-www-form-urlencoded: schema: @@ -778,12 +798,11 @@ paths: - -efg - (xyz) type: string + type: object responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -794,12 +813,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -810,24 +824,23 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: + $ref: '#/components/requestBodies/inline_object_3' content: application/x-www-form-urlencoded: schema: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -895,21 +908,19 @@ paths: - double - number - pattern_without_delimiter - required: true + type: object responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-contentType: application/x-www-form-urlencoded @@ -920,11 +931,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -934,8 +944,7 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -943,11 +952,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -957,8 +965,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -966,11 +973,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -980,8 +986,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -989,11 +994,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -1003,13 +1007,13 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: '*/*' /fake/jsonFormData: get: operationId: testJsonFormData requestBody: + $ref: '#/components/requestBodies/inline_object_4' content: application/x-www-form-urlencoded: schema: @@ -1023,10 +1027,9 @@ paths: required: - param - param2 - required: true + type: object responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -1047,23 +1050,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-contentType: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -1072,60 +1075,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-contentType: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1136,7 +1096,6 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json /fake/body-with-file-schema: @@ -1152,11 +1111,9 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json /fake/test-query-paramters: @@ -1164,7 +1121,7 @@ paths: description: To test the collection format in query parameters operationId: testQueryParameterCollectionFormat parameters: - - explode: false + - explode: true in: query name: pipe required: true @@ -1173,14 +1130,17 @@ paths: type: string type: array style: form - - in: query + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1208,7 +1168,6 @@ paths: style: form responses: "200": - content: {} description: Success tags: - fake @@ -1218,13 +1177,16 @@ paths: operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_5' content: multipart/form-data: schema: @@ -1238,7 +1200,7 @@ paths: type: string required: - requiredFile - required: true + type: object responses: "200": content: @@ -1255,8 +1217,121 @@ paths: - pet x-contentType: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-contentType: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' + inline_object_2: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object_2' + inline_object_3: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object_3' + inline_object_4: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object_4' + inline_object_5: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_5' schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1421,21 +1496,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: $special[model.name] Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1455,7 +1521,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1466,7 +1531,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1474,7 +1538,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1483,10 +1546,6 @@ components: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Cat_allOf' - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' Animal: discriminator: propertyName: className @@ -1506,13 +1565,13 @@ components: format_test: properties: integer: - maximum: 1E+2 - minimum: 1E+1 + maximum: 100 + minimum: 10 type: integer int32: format: int32 - maximum: 2E+2 - minimum: 2E+1 + maximum: 200 + minimum: 20 type: integer int64: format: int64 @@ -1536,7 +1595,6 @@ components: type: string byte: format: byte - pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ type: string binary: format: binary @@ -1556,8 +1614,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: ^\d{10}$ + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: /^image_\d{1,3}$/i type: string required: - byte @@ -1600,117 +1664,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1856,7 +1830,28 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1906,243 +1901,223 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: + xml: + name: $special[model.name] + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage properties: - string_item: - example: what + NullableMessage: + nullable: true type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item type: object - XmlItem: + NullableClass: + additionalProperties: + nullable: true + type: object properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 + integer_prop: + nullable: true type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 + number_prop: + nullable: true type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true + boolean_prop: + nullable: true type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string + string_prop: + nullable: true type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: items: - type: integer - xml: - prefix: ij + type: object + nullable: true type: array - prefix_wrapped_array: + array_and_items_nullable_prop: items: - type: integer - xml: - prefix: mn + nullable: true + type: object + nullable: true type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: + array_items_nullable: items: - type: integer - xml: - namespace: http://e.com/schema + nullable: true + type: object type: array - namespace_wrapped_array: + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + inline_response_default: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + inline_object_2: + properties: + enum_form_string_array: + description: Form parameter enum test (string array) items: - type: integer - xml: - namespace: http://g.com/schema + default: $ + enum: + - '>' + - $ + type: string type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 + type: object + inline_object_3: + properties: + integer: + description: None + maximum: 100 + minimum: 10 type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + type: object + inline_object_4: + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + type: object + inline_object_5: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + format: binary + type: string + required: + - requiredFile type: object - xml: - namespace: http://a.com/schema - prefix: pre Dog_allOf: properties: breed: @@ -2151,15 +2126,6 @@ components: properties: declawed: type: boolean - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string securitySchemes: petstore_auth: flows: @@ -2180,4 +2146,11 @@ components: http_basic_test: scheme: basic type: http + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/jersey2-experimental/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-experimental/docs/AdditionalPropertiesClass.md index 36e181620016..0d9dbd055b6d 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/AdditionalPropertiesClass.md @@ -6,17 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mapString** | **Map<String, String>** | | [optional] -**mapNumber** | [**Map<String, BigDecimal>**](BigDecimal.md) | | [optional] -**mapInteger** | **Map<String, Integer>** | | [optional] -**mapBoolean** | **Map<String, Boolean>** | | [optional] -**mapArrayInteger** | [**Map<String, List<Integer>>**](List.md) | | [optional] -**mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] -**mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] -**mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**anytype1** | [**Object**](.md) | | [optional] -**anytype2** | [**Object**](.md) | | [optional] -**anytype3** | [**Object**](.md) | | [optional] +**mapProperty** | **Map<String, String>** | | [optional] +**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-experimental/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-experimental/docs/AnotherFakeApi.md index 059616ec6baa..6740d5770dae 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(client) To test special tags @@ -32,9 +32,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,7 +52,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/java/jersey2-experimental/docs/DefaultApi.md b/samples/client/petstore/java/jersey2-experimental/docs/DefaultApi.md new file mode 100644 index 000000000000..afb01fb82916 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/DefaultApi.md @@ -0,0 +1,68 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | + + + +## fooGet + +> InlineResponseDefault fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + InlineResponseDefault result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**InlineResponseDefault**](InlineResponseDefault.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/EnumTest.md b/samples/client/petstore/java/jersey2-experimental/docs/EnumTest.md index 61eb95f22fe9..1692bd664d04 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/EnumTest.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/EnumTest.md @@ -11,6 +11,9 @@ Name | Type | Description | Notes **enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] **enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] **outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-experimental/docs/FakeApi.md b/samples/client/petstore/java/jersey2-experimental/docs/FakeApi.md index 543c51f066c5..ec633273558a 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/FakeApi.md @@ -4,7 +4,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | @@ -12,7 +13,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -21,13 +22,70 @@ Method | HTTP request | Description -## createXmlItem +## fakeHealthGet -> createXmlItem(xmlItem) +> HealthCheckResult fakeHealthGet() -creates an XmlItem +Health check endpoint -this route creates an XmlItem +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication ### Example @@ -36,6 +94,7 @@ this route creates an XmlItem import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -43,13 +102,16 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter try { - apiInstance.createXmlItem(xmlItem); + apiInstance.fakeHttpSignatureTest(pet, query1, header1); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,7 +126,9 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **query1** | **String**| query parameter | [optional] + **header1** | **String**| header parameter | [optional] ### Return type @@ -72,17 +136,17 @@ null (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -141,7 +205,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -152,7 +216,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -174,9 +238,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -194,7 +258,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -206,7 +270,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -271,7 +335,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -336,7 +400,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -347,7 +411,7 @@ No authorization required ## testBodyWithFileSchema -> testBodyWithFileSchema(body) +> testBodyWithFileSchema(fileSchemaTestClass) @@ -369,9 +433,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | try { - apiInstance.testBodyWithFileSchema(body); + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -388,7 +452,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -411,7 +475,7 @@ No authorization required ## testBodyWithQueryParams -> testBodyWithQueryParams(query, body) +> testBodyWithQueryParams(query, user) @@ -432,9 +496,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -452,7 +516,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **query** | **String**| | - **body** | [**User**](User.md)| | + **user** | [**User**](User.md)| | ### Return type @@ -475,7 +539,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -497,9 +561,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -517,7 +581,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type @@ -542,12 +606,13 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 +假端點 +偽のエンドポイント +가짜 엔드 포인트 + ### Example @@ -732,6 +797,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -739,6 +805,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -785,7 +855,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -800,7 +870,7 @@ No authorization required ## testInlineAdditionalProperties -> testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(requestBody) test inline additionalProperties @@ -820,9 +890,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -839,7 +909,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **param** | [**Map<String, String>**](String.md)| request body | + **requestBody** | [**Map<String, String>**](String.md)| request body | ### Return type diff --git a/samples/client/petstore/java/jersey2-experimental/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-experimental/docs/FakeClassnameTags123Api.md index 14a74a37a4e2..db98afa721ec 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/FakeClassnameTags123Api.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -39,9 +39,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -59,7 +59,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/java/jersey2-experimental/docs/Foo.md b/samples/client/petstore/java/jersey2-experimental/docs/Foo.md new file mode 100644 index 000000000000..02c7ef53f5fa --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/Foo.md @@ -0,0 +1,12 @@ + + +# Foo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/FormatTest.md b/samples/client/petstore/java/jersey2-experimental/docs/FormatTest.md index d138e921902a..742bccb77e98 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/FormatTest.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/FormatTest.md @@ -19,7 +19,8 @@ Name | Type | Description | Notes **dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **uuid** | [**UUID**](UUID.md) | | [optional] **password** | **String** | | -**bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional] +**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] diff --git a/samples/client/petstore/java/jersey2-experimental/docs/HealthCheckResult.md b/samples/client/petstore/java/jersey2-experimental/docs/HealthCheckResult.md new file mode 100644 index 000000000000..11bb9026e461 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/HealthCheckResult.md @@ -0,0 +1,13 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nullableMessage** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineObject.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject.md new file mode 100644 index 000000000000..999fe3ef00ad --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject.md @@ -0,0 +1,13 @@ + + +# InlineObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Updated name of the pet | [optional] +**status** | **String** | Updated status of the pet | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineObject1.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject1.md new file mode 100644 index 000000000000..b3828dfae456 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject1.md @@ -0,0 +1,13 @@ + + +# InlineObject1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **String** | Additional data to pass to server | [optional] +**file** | [**File**](File.md) | file to upload | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineObject2.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject2.md new file mode 100644 index 000000000000..7e4ed7591c2a --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject2.md @@ -0,0 +1,32 @@ + + +# InlineObject2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumFormStringArray** | [**List<EnumFormStringArrayEnum>**](#List<EnumFormStringArrayEnum>) | Form parameter enum test (string array) | [optional] +**enumFormString** | [**EnumFormStringEnum**](#EnumFormStringEnum) | Form parameter enum test (string) | [optional] + + + +## Enum: List<EnumFormStringArrayEnum> + +Name | Value +---- | ----- +GREATER_THAN | ">" +DOLLAR | "$" + + + +## Enum: EnumFormStringEnum + +Name | Value +---- | ----- +_ABC | "_abc" +_EFG | "-efg" +_XYZ_ | "(xyz)" + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineObject3.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject3.md new file mode 100644 index 000000000000..c1ebfe2578d6 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject3.md @@ -0,0 +1,25 @@ + + +# InlineObject3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | None | [optional] +**int32** | **Integer** | None | [optional] +**int64** | **Long** | None | [optional] +**number** | [**BigDecimal**](BigDecimal.md) | None | +**_float** | **Float** | None | [optional] +**_double** | **Double** | None | +**string** | **String** | None | [optional] +**patternWithoutDelimiter** | **String** | None | +**_byte** | **byte[]** | None | +**binary** | [**File**](File.md) | None | [optional] +**date** | [**LocalDate**](LocalDate.md) | None | [optional] +**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | None | [optional] +**password** | **String** | None | [optional] +**callback** | **String** | None | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineObject4.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject4.md new file mode 100644 index 000000000000..5ebef872403a --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject4.md @@ -0,0 +1,13 @@ + + +# InlineObject4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**param** | **String** | field1 | +**param2** | **String** | field2 | + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineObject5.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject5.md new file mode 100644 index 000000000000..42d2673574b7 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineObject5.md @@ -0,0 +1,13 @@ + + +# InlineObject5 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **String** | Additional data to pass to server | [optional] +**requiredFile** | [**File**](File.md) | file to upload | + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/InlineResponseDefault.md b/samples/client/petstore/java/jersey2-experimental/docs/InlineResponseDefault.md new file mode 100644 index 000000000000..63c30c2b7334 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/InlineResponseDefault.md @@ -0,0 +1,12 @@ + + +# InlineResponseDefault + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.md) | | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/NullableClass.md b/samples/client/petstore/java/jersey2-experimental/docs/NullableClass.md new file mode 100644 index 000000000000..7567ec0c0579 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/NullableClass.md @@ -0,0 +1,23 @@ + + +# NullableClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integerProp** | **Integer** | | [optional] +**numberProp** | [**BigDecimal**](BigDecimal.md) | | [optional] +**booleanProp** | **Boolean** | | [optional] +**stringProp** | **String** | | [optional] +**dateProp** | [**LocalDate**](LocalDate.md) | | [optional] +**datetimeProp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**arrayNullableProp** | **List<Object>** | | [optional] +**arrayAndItemsNullableProp** | **List<Object>** | | [optional] +**arrayItemsNullable** | **List<Object>** | | [optional] +**objectNullableProp** | **Map<String, Object>** | | [optional] +**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] +**objectItemsNullable** | **Map<String, Object>** | | [optional] + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumDefaultValue.md new file mode 100644 index 000000000000..cbc7f4ba54d2 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumInteger.md b/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumInteger.md new file mode 100644 index 000000000000..f71dea30ad00 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 000000000000..99e6389f4278 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/jersey2-experimental/docs/PetApi.md b/samples/client/petstore/java/jersey2-experimental/docs/PetApi.md index 875a8e6783e9..0c3b8e70e3b5 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/PetApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store @@ -43,9 +43,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -62,7 +62,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -80,7 +80,6 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | | **405** | Invalid input | - | @@ -150,7 +149,6 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | | **400** | Invalid pet value | - | @@ -372,7 +370,7 @@ Name | Type | Description | Notes ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet @@ -397,9 +395,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -416,7 +414,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -434,7 +432,6 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | diff --git a/samples/client/petstore/java/jersey2-experimental/docs/StoreApi.md b/samples/client/petstore/java/jersey2-experimental/docs/StoreApi.md index 6625d5969ee4..5d2d7ad5118b 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/StoreApi.md @@ -213,7 +213,7 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet @@ -233,9 +233,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -253,7 +253,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -265,7 +265,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json ### HTTP response details diff --git a/samples/client/petstore/java/jersey2-experimental/docs/UserApi.md b/samples/client/petstore/java/jersey2-experimental/docs/UserApi.md index ca9f550c3167..d7e613c24af5 100644 --- a/samples/client/petstore/java/jersey2-experimental/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-experimental/docs/UserApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description ## createUser -> createUser(body) +> createUser(user) Create user @@ -39,9 +39,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -58,7 +58,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md)| Created user object | ### Return type @@ -70,7 +70,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -81,7 +81,7 @@ No authorization required ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array @@ -101,9 +101,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -120,7 +120,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | + **user** | [**List<User>**](User.md)| List of user object | ### Return type @@ -132,7 +132,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -143,7 +143,7 @@ No authorization required ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array @@ -163,9 +163,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -182,7 +182,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | + **user** | [**List<User>**](User.md)| List of user object | ### Return type @@ -194,7 +194,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -459,7 +459,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -482,9 +482,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -502,7 +502,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | + **user** | [**User**](User.md)| Updated user object | ### Return type @@ -514,7 +514,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details diff --git a/samples/client/petstore/java/jersey2-experimental/pom.xml b/samples/client/petstore/java/jersey2-experimental/pom.xml index 3affc56f001f..84d5d5ce1801 100644 --- a/samples/client/petstore/java/jersey2-experimental/pom.xml +++ b/samples/client/petstore/java/jersey2-experimental/pom.xml @@ -56,7 +56,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 3.0.0-M4 @@ -66,7 +66,7 @@ -Xms512m -Xmx1500m methods - pertest + 10 @@ -135,10 +135,17 @@ org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + 3.8.1 1.7 1.7 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + @@ -261,17 +268,22 @@ jackson-databind-nullable ${jackson-databind-nullable-version} - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${threetenbp-version} - - - - com.brsanthu - migbase64 - 2.2 - + + com.github.joschi.jackson + jackson-datatype-threetenbp + ${threetenbp-version} + + + + com.brsanthu + migbase64 + 2.2 + + + org.tomitribe + tomitribe-http-signatures + ${http-signature-version} + junit @@ -289,5 +301,6 @@ 0.2.1 2.9.10 4.13 + 1.3 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 30609a4a8e40..fdbba2916ec9 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,5 +1,26 @@ package org.openapitools.client; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; @@ -10,69 +31,97 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; - import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; import org.glassfish.jersey.media.multipart.MultiPartFeature; - -import java.io.IOException; -import java.io.InputStream; - -import java.nio.file.Files; -import java.nio.file.StandardCopyOption; -import org.glassfish.jersey.logging.LoggingFeature; -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.Map.Entry; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.Date; -import java.util.TimeZone; - -import java.net.URLEncoder; - -import java.io.File; -import java.io.UnsupportedEncodingException; - -import java.text.DateFormat; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - +import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBearerAuth; -import org.openapitools.client.auth.ApiKeyAuth; -import org.openapitools.client.model.AbstractOpenApiSchema; - +import org.openapitools.client.auth.HttpSignatureAuth; import org.openapitools.client.auth.OAuth; - +import org.openapitools.client.model.AbstractOpenApiSchema; public class ApiClient { protected Map 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://petstore.swagger.io:80/v2", - "No description provided", - new HashMap() - ) - )); + 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>() {{ - }}; + 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; @@ -99,7 +148,10 @@ public ApiClient() { authentications = new HashMap(); authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); + authentications.put("bearer_test", new HttpBearerAuth("bearer")); authentications.put("http_basic_test", new HttpBasicAuth()); + authentications.put( + "http_signature_test", new HttpSignatureAuth("http_signature_test", null, null)); authentications.put("petstore_auth", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -110,6 +162,7 @@ public ApiClient() { /** * Gets the JSON instance to do JSON serialization and deserialization. + * * @return JSON */ public JSON getJSON() { @@ -163,6 +216,7 @@ public ApiClient setServerVariables(Map serverVariables) { /** * Get authentications (key: authentication name, value: authentication). + * * @return Map of authentication object */ public Map getAuthentications() { @@ -181,6 +235,7 @@ public Authentication getAuthentication(String authName) { /** * Helper method to set username for the first HTTP basic authentication. + * * @param username Username */ public void setUsername(String username) { @@ -195,6 +250,7 @@ public void setUsername(String username) { /** * Helper method to set password for the first HTTP basic authentication. + * * @param password Password */ public void setPassword(String password) { @@ -209,6 +265,7 @@ public void setPassword(String password) { /** * Helper method to set API key value for the first API key authentication. + * * @param apiKey API key */ public void setApiKey(String apiKey) { @@ -242,6 +299,7 @@ public void configureApiKeys(HashMap secrets) { /** * Helper method to set API key prefix for the first API key authentication. + * * @param apiKeyPrefix API key prefix */ public void setApiKeyPrefix(String apiKeyPrefix) { @@ -256,6 +314,7 @@ public void setApiKeyPrefix(String apiKeyPrefix) { /** * Helper method to set bearer token for the first Bearer authentication. + * * @param bearerToken Bearer token */ public void setBearerToken(String bearerToken) { @@ -270,6 +329,7 @@ public void setBearerToken(String bearerToken) { /** * Helper method to set access token for the first OAuth2 authentication. + * * @param accessToken Access token */ public void setAccessToken(String accessToken) { @@ -284,6 +344,7 @@ public void setAccessToken(String accessToken) { /** * Set the User-Agent header's value (by adding to the default header map). + * * @param userAgent Http user agent * @return API client */ @@ -318,6 +379,7 @@ public ApiClient addDefaultCookie(String key, String value) { /** * Check that whether debugging is enabled for this API client. + * * @return True if debugging is switched on */ public boolean isDebugging() { @@ -338,9 +400,8 @@ public ApiClient setDebugging(boolean debugging) { } /** - * 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 */ @@ -350,6 +411,7 @@ public String getTempFolderPath() { /** * Set temp folder path + * * @param tempFolderPath Temp folder path * @return API client */ @@ -360,6 +422,7 @@ public ApiClient setTempFolderPath(String tempFolderPath) { /** * Connect timeout (in milliseconds). + * * @return Connection timeout */ public int getConnectTimeout() { @@ -367,9 +430,9 @@ public int getConnectTimeout() { } /** - * Set the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * Set the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values must + * be between 1 and {@link Integer#MAX_VALUE}. + * * @param connectionTimeout Connection timeout in milliseconds * @return API client */ @@ -381,6 +444,7 @@ public ApiClient setConnectTimeout(int connectionTimeout) { /** * read timeout (in milliseconds). + * * @return Read timeout */ public int getReadTimeout() { @@ -388,9 +452,9 @@ public int getReadTimeout() { } /** - * Set the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * Set the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be + * between 1 and {@link Integer#MAX_VALUE}. + * * @param readTimeout Read timeout in milliseconds * @return API client */ @@ -402,6 +466,7 @@ public ApiClient setReadTimeout(int readTimeout) { /** * Get the date format used to parse/format date parameters. + * * @return Date format */ public DateFormat getDateFormat() { @@ -410,6 +475,7 @@ public DateFormat getDateFormat() { /** * Set the date format used to parse/format date parameters. + * * @param dateFormat Date format * @return API client */ @@ -422,6 +488,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) { /** * Parse the given string into Date object. + * * @param str String * @return Date */ @@ -435,6 +502,7 @@ public Date parseDate(String str) { /** * Format the given Date object into string. + * * @param date Date * @return Date in string format */ @@ -444,6 +512,7 @@ public String formatDate(Date date) { /** * Format the given parameter object into string. + * * @param param Object * @return Object in string format */ @@ -454,8 +523,8 @@ public String parameterToString(Object param) { 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)); @@ -473,7 +542,7 @@ public String parameterToString(Object param) { * @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 @@ -487,12 +556,13 @@ public List parameterToPairs(String collectionFormat, String name, Object 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)) { @@ -515,7 +585,7 @@ public List parameterToPairs(String collectionFormat, String name, Object delimiter = "|"; } - StringBuilder sb = new StringBuilder() ; + StringBuilder sb = new StringBuilder(); for (Object item : valueCollection) { sb.append(delimiter); sb.append(parameterToString(item)); @@ -527,13 +597,9 @@ public List parameterToPairs(String collectionFormat, String name, Object } /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * "* / *" is also default to JSON + * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; + * charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also default to JSON + * * @param mime MIME * @return True if the MIME type is JSON */ @@ -543,13 +609,12 @@ public boolean isJsonMime(String mime) { } /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) + * Select the Accept header's value from the given accepts array: if JSON exists in the given + * array, use it; otherwise use all of them (joining into a string) * * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). + * @return The Accept header to use. If the given array is empty, null will be returned (not to + * set the Accept header explicitly). */ public String selectHeaderAccept(String[] accepts) { if (accepts.length == 0) { @@ -564,13 +629,11 @@ public String selectHeaderAccept(String[] accepts) { } /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. + * Select the Content-Type header's value from the given array: if JSON exists in the given array, + * use it; otherwise use the first one of the array. * * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * JSON will be used. + * @return The Content-Type header to use. If the given array is empty, JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { if (contentTypes.length == 0) { @@ -586,6 +649,7 @@ public String selectHeaderContentType(String[] contentTypes) { /** * Escape the given string to be used as URL query value. + * * @param str String * @return Escaped string */ @@ -598,33 +662,41 @@ public String escapeString(String str) { } /** - * 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); @@ -635,7 +707,47 @@ public Entity serialize(Object obj, Map formParams, String co return entity; } - public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{ + /** + * Serialize the given Java object into string according the given Content-Type (only JSON, HTTP + * form is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType) + throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException( + "multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = + param.getKey() + + "=" + + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + return json.getMapper().writeValueAsString(obj); + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + + public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) + throws ApiException { Object result = null; int matchCounter = 0; @@ -657,35 +769,44 @@ public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenA } 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 @@ -720,6 +841,7 @@ public T deserialize(Response response, GenericType returnType) throws Ap /** * Download file from the given response. + * * @param response Response * @return File * @throws ApiException If fail to read file content from response and write to disk @@ -727,7 +849,10 @@ public T deserialize(Response response, GenericType returnType) throws Ap public File downloadFileFromResponse(Response response) throws ApiException { try { File file = prepareDownloadFile(response); - Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + Files.copy( + response.readEntity(InputStream.class), + file.toPath(), + StandardCopyOption.REPLACE_EXISTING); return file; } catch (IOException e) { throw new ApiException(e); @@ -741,8 +866,7 @@ public File prepareDownloadFile(Response response) throws IOException { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) - filename = matcher.group(1); + if (matcher.find()) filename = matcher.group(1); } String prefix; @@ -759,14 +883,11 @@ public File prepareDownloadFile(Response response) throws IOException { suffix = filename.substring(pos); } // File.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) - prefix = "download-"; + if (prefix.length() < 3) prefix = "download-"; } - if (tempFolderPath == null) - return File.createTempFile(prefix, suffix); - else - return File.createTempFile(prefix, suffix, new File(tempFolderPath)); + if (tempFolderPath == null) return File.createTempFile(prefix, suffix); + else return File.createTempFile(prefix, suffix, new File(tempFolderPath)); } /** @@ -789,8 +910,21 @@ public File prepareDownloadFile(Response response) throws IOException { * @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 { - updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + 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" @@ -810,9 +944,10 @@ public ApiResponse invokeAPI(String operation, String path, String method serverConfigurations = servers; } if (index < 0 || index >= serverConfigurations.size()) { - throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", index, serverConfigurations.size() - )); + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", + index, serverConfigurations.size())); } targetURL = serverConfigurations.get(index).URL(variables) + path; } else { @@ -863,6 +998,21 @@ public ApiResponse invokeAPI(String operation, String path, String method Entity entity = serialize(body, formParams, contentType); + // put all headers in one place + 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()); + Response response = null; try { @@ -892,14 +1042,13 @@ public ApiResponse invokeAPI(String operation, String path, String method 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; @@ -912,30 +1061,53 @@ public ApiResponse invokeAPI(String operation, String path, String method } } 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 */ @@ -948,13 +1120,21 @@ protected Client buildHttpClient(boolean debugging) { // 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); @@ -966,7 +1146,7 @@ protected void performAdditionalClientConfiguration(ClientConfig clientConfig) { 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) { @@ -984,12 +1164,24 @@ protected Map> buildResponseHeaders(Response response) { * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI */ - protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + 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) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams, cookieParams); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); } } } 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 6c91e35f27a9..5bdd88d576ed 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,89 +3,95 @@ * 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.Map; import java.util.List; - +import java.util.Map; public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - public ApiException() {} - - public ApiException(Throwable throwable) { - super(throwable); - } - - 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, 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(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, 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 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; - } + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + 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, 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(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, 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 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; + } } 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 4a3226d1dbb5..fd4a259e3643 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,14 +3,13 @@ * 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; @@ -22,38 +21,38 @@ * @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; - - /** - * @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; - } - - public int getStatusCode() { - return statusCode; - } - - public Map> getHeaders() { - return headers; - } - - public T getData() { - return 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 + * @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; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + 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 acbecda489dd..107ad039b0b6 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,37 +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; - 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 83d4514b071b..12541a8636a4 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,6 +9,8 @@ import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; +import java.io.IOException; +import java.math.BigDecimal; import org.threeten.bp.DateTimeException; import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; @@ -19,12 +21,10 @@ import org.threeten.bp.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,84 +32,89 @@ 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 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 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 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; @@ -119,22 +124,26 @@ public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { 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") @@ -156,49 +165,50 @@ protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { @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_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; + 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))); } - if (string.endsWith("+0000")) { - string = string.substring(0, string.length() - 5) + "Z"; + + 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))); } - 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)); + + 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); } - } catch (DateTimeException e) { - throw _peelDTE(e); + return value; } - 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 6517dc877a39..9ace1af62702 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,15 +1,12 @@ package org.openapitools.client; -import org.threeten.bp.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; -import org.openapitools.jackson.nullable.JsonNullableModule; import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; - import java.text.DateFormat; - import javax.ws.rs.ext.ContextResolver; - +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.threeten.bp.*; public class JSON implements ContextResolver { private ObjectMapper mapper; @@ -34,6 +31,7 @@ public JSON() { /** * Set the date format for JSON (de)serialization with Date properties. + * * @param dateFormat Date format */ public void setDateFormat(DateFormat dateFormat) { @@ -44,4 +42,8 @@ public void setDateFormat(DateFormat dateFormat) { public ObjectMapper getContext(Class type) { 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 ae89aa614543..ce6aa2ef976f 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,59 +3,57 @@ * 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 = ""; - - public Pair (String name, String value) { - setName(name); - setValue(value); - } + private String name = ""; + private String 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; - } + this.value = value; + } - public String getValue() { - return this.value; - } + public String getName() { + return this.name; + } - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } + public String getValue() { + return this.value; + } - if (arg.trim().isEmpty()) { - return false; - } + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } - return true; + 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 9509fd089812..8b88105c7629 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,11 +14,9 @@ import com.fasterxml.jackson.databind.util.ISO8601DateFormat; import com.fasterxml.jackson.databind.util.ISO8601Utils; - import java.text.FieldPosition; import java.util.Date; - public class RFC3339DateFormat extends ISO8601DateFormat { // Same as ISO8601DateFormat but serializing milliseconds. @@ -28,5 +26,4 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie 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 a1107a8690e4..b307b65c571e 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,57 +2,58 @@ 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; - } + /** + * @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; + /** + * 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; + // 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); + 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 + "."); } - return url; + } + url = url.replaceAll("\\{" + name + "\\}", value); } + return url; + } - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } + /** + * 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 c2f13e216662..f5a0c96ed055 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,22 +2,21 @@ 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 266c26be3a50..70cd91e3b294 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,17 +3,15 @@ * 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). @@ -36,12 +34,11 @@ public static boolean containsIgnoreCase(String[] array, String value) { /** * 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. - *

* - * @param array The array of strings + *

Note: This might be replaced by utility method from commons-lang or guava someday if one of + * those libraries is added as dependency. + * + * @param array The array of strings * @param separator The separator * @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 e06e72ecac6a..67f9b20ad791 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,21 +1,17 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +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 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; - - public class AnotherFakeApi { private ApiClient apiClient; @@ -35,41 +31,42 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** - * To test special tags - * To test special tags and operation ID starting with number - * @param body client model (required) + * To test special tags To test special tags and operation ID starting with number + * + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
+ * + * + * + *
Status Code Description Response Headers
200 successful operation -
*/ - public Client call123testSpecialTags(Client body) throws ApiException { - return call123testSpecialTagsWithHttpInfo(body).getData(); + public Client call123testSpecialTags(Client client) throws ApiException { + return call123testSpecialTagsWithHttpInfo(client).getData(); } /** - * To test special tags - * To test special tags and operation ID starting with number - * @param body client model (required) + * To test special tags To test special tags and operation ID starting with number + * + * @param client client model (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); + 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"); } - + // create path and map variables String localVarPath = "/another-fake/dummy"; @@ -79,26 +76,29 @@ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throw 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 new file mode 100644 index 000000000000..b70b363a6f27 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,94 @@ +package org.openapitools.client.api; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.model.InlineResponseDefault; + +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(Configuration.getDefaultApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + /** + * @return InlineResponseDefault + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + *
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 -
+ */ + public ApiResponse fooGetWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/foo"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = {}; + + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] {}; + + GenericType localVarReturnType = + new GenericType() {}; + + 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 d077830e35f1..ea5b240a3389 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,28 +1,25 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +import java.io.File; +import java.math.BigDecimal; +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 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.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; +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.openapitools.client.model.XmlItem; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; public class FakeApi { private ApiClient apiClient; @@ -43,42 +40,112 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * Health check endpoint + * + * @return HealthCheckResult * @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 The instance started successfully -
*/ - public void createXmlItem(XmlItem xmlItem) throws ApiException { - createXmlItemWithHttpInfo(xmlItem); + public HealthCheckResult fakeHealthGet() throws ApiException { + return fakeHealthGetWithHttpInfo().getData(); } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * 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 -
+ */ + public ApiResponse fakeHealthGetWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake/health"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = {}; + + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] {}; + + GenericType localVarReturnType = new GenericType() {}; + + 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 -
+ */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { + fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); + } + + /** + * 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 successful operation -
+ * + * + * + *
Status Code Description Response Headers
200 The instance started successfully -
*/ - public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { - Object localVarPostBody = xmlItem; - - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem"); + 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"); } - + // create path and map variables - String localVarPath = "/fake/create_xml_item"; + String localVarPath = "/fake/http-signature-test"; // query params List localVarQueryParams = new ArrayList(); @@ -86,57 +153,66 @@ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiEx Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_1", query1)); + + if (header1 != null) localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); + + final String[] localVarAccepts = {}; - - - - final String[] localVarAccepts = { - - }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" - }; + final String[] localVarContentTypes = {"application/json", "application/xml"}; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; - - return apiClient.invokeAPI("FakeApi.createXmlItem", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"http_signature_test"}; + + 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"; @@ -146,59 +222,64 @@ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) 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 = {"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 body Input composite as post body (optional) + * + * @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 body) throws ApiException { - return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) + throws ApiException { + return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getData(); } /** - * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * + * @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 body) throws ApiException { - Object localVarPostBody = body; - + public ApiResponse fakeOuterCompositeSerializeWithHttpInfo( + OuterComposite outerComposite) throws ApiException { + Object localVarPostBody = outerComposite; + // create path and map variables String localVarPath = "/fake/outer/composite"; @@ -208,59 +289,63 @@ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(Outer 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 = {"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"; @@ -270,59 +355,62 @@ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal b 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 = {"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"; @@ -332,63 +420,69 @@ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) thr 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 = {"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 body (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 body) throws ApiException { - testBodyWithFileSchemaWithHttpInfo(body); + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } /** - * * For this test, the body for this request much reference a schema named `File`. - * @param body (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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema"); + 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"); } - + // create path and map variables String localVarPath = "/fake/body-with-file-schema"; @@ -398,68 +492,71 @@ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass 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[] { }; - - return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + return apiClient.invokeAPI( + "FakeApi.testBodyWithFileSchema", + localVarPath, + "PUT", + localVarQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + null); } /** - * - * - * @param query (required) - * @param body (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 body) throws ApiException { - testBodyWithQueryParamsWithHttpInfo(query, body); + public void testBodyWithQueryParams(String query, User user) throws ApiException { + testBodyWithQueryParamsWithHttpInfo(query, user); } /** - * - * - * @param query (required) - * @param body (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 body) throws ApiException { - Object localVarPostBody = body; - + 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 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' 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"); } - + // create path and map variables String localVarPath = "/fake/body-with-query-params"; @@ -471,61 +568,67 @@ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User 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[] { }; - - return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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 - * @param body client model (required) + * 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 body) throws ApiException { - return testClientModelWithHttpInfo(body).getData(); + public Client testClientModel(Client client) throws ApiException { + return testClientModelWithHttpInfo(client).getData(); } /** - * To test \"client\" model - * To test \"client\" model - * @param body client model (required) + * 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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel"); + 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"); } - + // create path and map variables String localVarPath = "/fake"; @@ -535,31 +638,35 @@ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiEx 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) @@ -576,19 +683,49 @@ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiEx * @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) @@ -606,35 +743,55 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @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"; @@ -644,60 +801,54 @@ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, D 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" }; - - return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"http_basic_test"}; + + 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) @@ -705,22 +856,41 @@ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, D * @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) @@ -729,15 +899,24 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @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"; @@ -747,57 +926,81 @@ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderS Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "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); + if (enumFormString != null) localVarFormParams.put("enum_form_string", enumFormString); + + final String[] localVarAccepts = {}; - 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[] { }; - - return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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"; @@ -807,33 +1010,43 @@ private ApiResponse testGroupParametersWithHttpInfo(Integer requiredString 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 localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = {}; - String[] localVarAuthNames = new String[] { }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"bearer_test"}; + + return apiClient.invokeAPI( + "FakeApi.testGroupParameters", + localVarPath, + "DELETE", + localVarQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + null); } public class APItestGroupParametersRequest { @@ -844,12 +1057,11 @@ public class APItestGroupParametersRequest { private Boolean booleanGroup; private Long int64Group; - private APItestGroupParametersRequest() { - } - + private APItestGroupParametersRequest() {} /** * Set requiredStringGroup + * * @param requiredStringGroup Required String in group parameters (required) * @return APItestGroupParametersRequest */ @@ -857,10 +1069,10 @@ public APItestGroupParametersRequest requiredStringGroup(Integer requiredStringG this.requiredStringGroup = requiredStringGroup; return this; } - /** * Set requiredBooleanGroup + * * @param requiredBooleanGroup Required Boolean in group parameters (required) * @return APItestGroupParametersRequest */ @@ -868,10 +1080,10 @@ public APItestGroupParametersRequest requiredBooleanGroup(Boolean requiredBoolea this.requiredBooleanGroup = requiredBooleanGroup; return this; } - /** * Set requiredInt64Group + * * @param requiredInt64Group Required Integer in group parameters (required) * @return APItestGroupParametersRequest */ @@ -879,10 +1091,10 @@ public APItestGroupParametersRequest requiredInt64Group(Long requiredInt64Group) this.requiredInt64Group = requiredInt64Group; return this; } - /** * Set stringGroup + * * @param stringGroup String in group parameters (optional) * @return APItestGroupParametersRequest */ @@ -890,10 +1102,10 @@ public APItestGroupParametersRequest stringGroup(Integer stringGroup) { this.stringGroup = stringGroup; return this; } - /** * Set booleanGroup + * * @param booleanGroup Boolean in group parameters (optional) * @return APItestGroupParametersRequest */ @@ -901,10 +1113,10 @@ public APItestGroupParametersRequest booleanGroup(Boolean booleanGroup) { this.booleanGroup = booleanGroup; return this; } - /** * Set int64Group + * * @param int64Group Integer in group parameters (optional) * @return APItestGroupParametersRequest */ @@ -912,88 +1124,91 @@ public APItestGroupParametersRequest int64Group(Long int64Group) { this.int64Group = int64Group; return this; } - /** * 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 param request body (required) + * + * @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 param) throws ApiException { - testInlineAdditionalPropertiesWithHttpInfo(param); + public void testInlineAdditionalProperties(Map requestBody) throws ApiException { + testInlineAdditionalPropertiesWithHttpInfo(requestBody); } /** * test inline additionalProperties - * - * @param param request body (required) + * + * @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 param) throws ApiException { - Object localVarPostBody = param; - - // verify the required parameter 'param' is set - if (param == null) { - throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + 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"); } - + // create path and map variables String localVarPath = "/fake/inline-additionalProperties"; @@ -1003,37 +1218,41 @@ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(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[] { }; - - return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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); @@ -1041,30 +1260,33 @@ public void testJsonFormData(String param, String param2) throws ApiException { /** * 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"; @@ -1074,93 +1296,118 @@ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (param != null) localVarFormParams.put("param", param); + if (param2 != null) localVarFormParams.put("param2", param2); - - - if (param != null) - localVarFormParams.put("param", param); -if (param2 != null) - localVarFormParams.put("param2", param2); + final String[] localVarAccepts = {}; - 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[] { }; - - return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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"; @@ -1170,29 +1417,35 @@ public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "pipe", pipe)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); localVarQueryParams.addAll(apiClient.parameterToPairs("space", "http", http)); 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 localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = {}; - String[] localVarAuthNames = new String[] { }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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 c7c0dcafc019..287707679a1f 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,21 +1,17 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +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 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; - - public class FakeClassnameTags123Api { private ApiClient apiClient; @@ -35,41 +31,42 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** - * To test class name in snake case - * To test class name in snake case - * @param body client model (required) + * To test class name in snake case To test class name in snake case + * + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
+ * + * + * + *
Status Code Description Response Headers
200 successful operation -
*/ - public Client testClassname(Client body) throws ApiException { - return testClassnameWithHttpInfo(body).getData(); + public Client testClassname(Client client) throws ApiException { + return testClassnameWithHttpInfo(client).getData(); } /** - * To test class name in snake case - * To test class name in snake case - * @param body client model (required) + * To test class name in snake case To test class name in snake case + * + * @param client client model (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); + 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"); } - + // create path and map variables String localVarPath = "/fake_classname_test"; @@ -79,26 +76,29 @@ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiExce 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 01476de66bb7..cb2abcf1bc1a 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,23 +1,19 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +import java.io.File; +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 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; - - public class PetApi { private ApiClient apiClient; @@ -38,41 +34,39 @@ public void setApiClient(ApiClient apiClient) { } /** * Add a new pet to the store - * - * @param body Pet object that needs to be added to the store (required) + * + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
+ * + * + * + *
Status Code Description Response Headers
405 Invalid input -
*/ - public void addPet(Pet body) throws ApiException { - addPetWithHttpInfo(body); + public void addPet(Pet pet) throws ApiException { + addPetWithHttpInfo(pet); } /** * Add a new pet to the store - * - * @param body Pet object that needs to be added to the store (required) + * + * @param pet Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
+ * + * + * + *
Status Code Description Response Headers
405 Invalid input -
*/ - public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling addPet"); + 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"; @@ -82,38 +76,41 @@ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { 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" }; - - return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"petstore_auth"}; + + 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
200 successful operation -
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); @@ -121,29 +118,29 @@ public void deletePet(Long petId, String apiKey) throws ApiException { /** * 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
200 successful operation -
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(); @@ -151,66 +148,73 @@ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - if (apiKey != null) - localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = {}; - - - final String[] localVarAccepts = { - - }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = {}; - String[] localVarAuthNames = new String[] { "petstore_auth" }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"petstore_auth"}; + + 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"; @@ -222,39 +226,46 @@ public ApiResponse> findPetsByStatusWithHttpInfo(List status) 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 @@ -263,28 +274,31 @@ public List findPetsByTags(List tags) throws ApiException { } /** - * 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"; @@ -296,70 +310,76 @@ public ApiResponse> findPetsByTagsWithHttpInfo(List tags) thro 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(); @@ -367,69 +387,71 @@ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { 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 body Pet object that needs to be added to the store (required) + * + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call * @http.response.details - - - - - - -
Status Code Description Response Headers
200 successful operation -
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 body) throws ApiException { - updatePetWithHttpInfo(body); + public void updatePet(Pet pet) throws ApiException { + updatePetWithHttpInfo(pet); } /** * Update an existing pet - * - * @param body Pet object that needs to be added to the store (required) + * + * @param pet Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @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 -
405 Validation exception -
+ * + * + * + * + * + *
Status Code Description Response Headers
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
*/ - public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet"); + 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"; @@ -439,38 +461,42 @@ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { 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" }; - - return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"petstore_auth"}; + + 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); @@ -478,29 +504,32 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api /** * Updates a pet in the store with form data - * + * * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return 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(); @@ -508,73 +537,79 @@ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (name != null) localVarFormParams.put("name", name); + if (status != null) localVarFormParams.put("status", status); - - - if (name != null) - localVarFormParams.put("name", name); -if (status != null) - localVarFormParams.put("status", status); + final String[] localVarAccepts = {}; - final String[] localVarAccepts = { - - }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {"petstore_auth"}; + + 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(); @@ -582,80 +617,90 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a 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(); @@ -663,30 +708,33 @@ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long 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 11496944ef28..90fdbd917a02 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,21 +1,17 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +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 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; - - public class StoreApi { private ApiClient apiClient; @@ -35,45 +31,49 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** - * 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(); @@ -81,55 +81,60 @@ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiExcep 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 localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = {}; - String[] localVarAuthNames = new String[] { }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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"; @@ -139,71 +144,80 @@ public ApiResponse> getInventoryWithHttpInfo() throws ApiEx 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 localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "api_key" }; + final String[] localVarContentTypes = {}; - GenericType> localVarReturnType = new GenericType>() {}; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, localVarReturnType, null); + String[] localVarAuthNames = new String[] {"api_key"}; + + GenericType> localVarReturnType = + new GenericType>() {}; + + 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(); @@ -211,66 +225,70 @@ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiExcep 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 body order placed for purchasing the pet (required) + * + * @param order order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call * @http.response.details - - - - -
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 body) throws ApiException { - return placeOrderWithHttpInfo(body).getData(); + public Order placeOrder(Order order) throws ApiException { + return placeOrderWithHttpInfo(order).getData(); } /** * Place an order for a pet - * - * @param body order placed for purchasing the pet (required) + * + * @param order order placed for purchasing the pet (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); + 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"; @@ -280,26 +298,29 @@ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException 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 = {"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 1f9d6afe1169..369322b43c92 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,21 +1,17 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +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 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; - - public class UserApi { private ApiClient apiClient; @@ -35,40 +31,40 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object (required) + * Create user This can only be done by the logged in user. + * + * @param user Created user object (required) * @throws ApiException if fails to make API call * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
+ * + * + * + *
Status Code Description Response Headers
0 successful operation -
*/ - public void createUser(User body) throws ApiException { - createUserWithHttpInfo(body); + public void createUser(User user) throws ApiException { + createUserWithHttpInfo(user); } /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object (required) + * Create user This can only be done by the logged in user. + * + * @param user Created user object (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); + 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"; @@ -78,61 +74,67 @@ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { 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 = {"application/json"}; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; - - return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + return apiClient.invokeAPI( + "UserApi.createUser", + localVarPath, + "POST", + localVarQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + null); } /** * Creates list of users with given input array - * - * @param body List of user object (required) + * + * @param user List of user object (required) * @throws ApiException if fails to make API call * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
+ * + * + * + *
Status Code Description Response Headers
0 successful operation -
*/ - public void createUsersWithArrayInput(List body) throws ApiException { - createUsersWithArrayInputWithHttpInfo(body); + public void createUsersWithArrayInput(List user) throws ApiException { + createUsersWithArrayInputWithHttpInfo(user); } /** * Creates list of users with given input array - * - * @param body List of user object (required) + * + * @param user List of user object (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + 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"); } - + // create path and map variables String localVarPath = "/user/createWithArray"; @@ -142,61 +144,67 @@ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) 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 = {"application/json"}; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; - - return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + return apiClient.invokeAPI( + "UserApi.createUsersWithArrayInput", + localVarPath, + "POST", + localVarQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + null); } /** * Creates list of users with given input array - * - * @param body List of user object (required) + * + * @param user List of user object (required) * @throws ApiException if fails to make API call * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
+ * + * + * + *
Status Code Description Response Headers
0 successful operation -
*/ - public void createUsersWithListInput(List body) throws ApiException { - createUsersWithListInputWithHttpInfo(body); + public void createUsersWithListInput(List user) throws ApiException { + createUsersWithListInputWithHttpInfo(user); } /** * Creates list of users with given input array - * - * @param body List of user object (required) + * + * @param user List of user object (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); + 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"); } - + // create path and map variables String localVarPath = "/user/createWithList"; @@ -206,66 +214,72 @@ public ApiResponse createUsersWithListInputWithHttpInfo(List body) t 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 = {"application/json"}; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; - - return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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(); @@ -273,39 +287,44 @@ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiExcep 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 localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = {}; - String[] localVarAuthNames = new String[] { }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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(); @@ -313,29 +332,31 @@ public User getUserByName(String username) throws ApiException { /** * 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(); @@ -343,41 +364,45 @@ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiEx 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(); @@ -385,31 +410,34 @@ public String loginUser(String username, String password) throws ApiException { /** * 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"; @@ -422,36 +450,41 @@ public ApiResponse loginUserWithHttpInfo(String username, String passwor 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(); @@ -459,18 +492,18 @@ public void logoutUser() throws ApiException { /** * 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"; @@ -480,73 +513,80 @@ public ApiResponse logoutUserWithHttpInfo() throws ApiException { 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 localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String[] localVarContentTypes = {}; - String[] localVarAuthNames = new String[] { }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + return apiClient.invokeAPI( + "UserApi.logoutUser", + localVarPath, + "GET", + localVarQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + null); } /** - * Updated user - * This can only be done by the logged in user. + * Updated user This can only be done by the logged in user. + * * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @throws ApiException if fails to make API call * @http.response.details - - - - -
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 body) throws ApiException { - updateUserWithHttpInfo(username, body); + public void updateUser(String username, User user) throws ApiException { + updateUserWithHttpInfo(username, user); } /** - * Updated user - * This can only be done by the logged in user. + * Updated user This can only be done by the logged in user. + * * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return ApiResponse<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 body) throws ApiException { - Object localVarPostBody = body; - + 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 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); } - + // create path and map variables - String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = + "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -554,24 +594,28 @@ public ApiResponse updateUserWithHttpInfo(String username, User body) thro 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 = {"application/json"}; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; - - return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, - localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, - localVarAuthNames, null, null); + String[] localVarAuthNames = new String[] {}; + + 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 a9427105d811..e77ca74a38f5 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,21 +3,20 @@ * 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 java.util.Map; +import java.net.URI; import java.util.List; - +import java.util.Map; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; public class ApiKeyAuth implements Authentication { private final String location; @@ -56,7 +55,14 @@ public void setApiKeyPrefix(String apiKeyPrefix) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + 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 5c558b1d5abd..b2f568ccf5cc 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,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.auth; -import org.openapitools.client.Pair; - -import java.util.Map; +import java.net.URI; import java.util.List; +import java.util.Map; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; public interface Authentication { - /** - * 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); + /** + * 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 98993417bee7..208509bfe862 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,25 +3,22 @@ * 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 com.migcomponents.migbase64.Base64; - -import java.util.Map; -import java.util.List; - import java.io.UnsupportedEncodingException; - +import java.net.URI; +import java.util.List; +import java.util.Map; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; public class HttpBasicAuth implements Authentication { private String username; @@ -44,13 +41,21 @@ public void setPassword(String password) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + 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 e20259cb94ca..c932a7456626 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,21 +3,20 @@ * 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 java.util.Map; +import java.net.URI; import java.util.List; - +import java.util.Map; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; public class HttpBearerAuth implements Authentication { private final String scheme; @@ -28,7 +27,8 @@ public HttpBearerAuth(String scheme) { } /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * Gets the token, which together with the scheme, will be sent as the value of the Authorization + * header. * * @return The bearer token */ @@ -37,7 +37,8 @@ public String getBearerToken() { } /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * Sets the token, which together with the scheme, will be sent as the value of the Authorization + * header. * * @param bearerToken The bearer token to send in the Authorization header */ @@ -46,12 +47,20 @@ public void setBearerToken(String bearerToken) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { - 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 new file mode 100644 index 000000000000..c98091bad019 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/auth/HttpSignatureAuth.java @@ -0,0 +1,141 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.auth; + +import java.net.URI; +import java.net.URLEncoder; +import java.security.Key; +import java.security.MessageDigest; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; +import org.tomitribe.auth.signatures.*; + +public class HttpSignatureAuth implements Authentication { + + private Signer signer; + + private String name; + + private Algorithm algorithm; + + private List headers; + + public HttpSignatureAuth(String name, Algorithm algorithm, List headers) { + this.name = name; + this.algorithm = algorithm; + this.headers = headers; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Algorithm getAlgorithm() { + return algorithm; + } + + public void setAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + } + + public List getHeaders() { + return headers; + } + + public void setHeaders(List headers) { + this.headers = headers; + } + + public Signer getSigner() { + return signer; + } + + public void setSigner(Signer signer) { + this.signer = signer; + } + + public void setup(Key key) throws ApiException { + if (key == null) { + throw new ApiException("key (java.security.Key) cannot be null"); + } + + signer = new Signer(key, new Signature(name, algorithm, null, headers)); + } + + @Override + public void applyToParams( + List 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())); + } + + if (headers.contains("digest")) { + headerParams.put( + "digest", + "SHA-256=" + + new String( + Base64.getEncoder() + .encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes())))); + } + + if (signer == null) { + throw new ApiException( + "Signer cannot be null. Please run the method `setup` to set it up correctly"); + } + + // construct the path with the URL query string + String path = uri.getPath(); + + List urlQueries = new ArrayList(); + for (Pair queryParam : queryParams) { + urlQueries.add( + queryParam.getName() + + "=" + + URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20")); + } + + if (!urlQueries.isEmpty()) { + path = path + "?" + String.join("&", urlQueries); + } + + headerParams.put("Authorization", signer.sign(method, path, headerParams).toString()); + } catch (Exception ex) { + throw new ApiException( + "Failed to create signature in the HTTP request header: " + ex.toString()); + } + } +} 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 779680c9b2f9..c7302cbcbd49 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,21 +3,20 @@ * 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 java.util.Map; +import java.net.URI; import java.util.List; - +import java.util.Map; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; public class OAuth implements Authentication { private String accessToken; @@ -31,7 +30,14 @@ public void setAccessToken(String accessToken) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + 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 b2d11ff0c4f0..1e09cd99afc5 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,16 +3,18 @@ * 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 28cf630a27a5..54b31cc472b8 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,39 +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 org.openapitools.client.ApiException; -import java.lang.reflect.Type; import java.util.Map; import javax.ws.rs.core.GenericType; - public abstract class AbstractOpenApiSchema { - private Object instance; + private Object instance; - public final String schemaType; + public final String schemaType; - public AbstractOpenApiSchema(String schemaType) { - this.schemaType = schemaType; - } + public AbstractOpenApiSchema(String schemaType) { + this.schemaType = schemaType; + } - public abstract Map getSchemas(); + public abstract Map getSchemas(); - public Object getActualInstance() {return instance;} + public Object getActualInstance() { + return instance; + } - public void setActualInstance(Object instance) {this.instance = instance;} + public void setActualInstance(Object instance) { + this.instance = instance; + } - public String getSchemaType() { - return schemaType; - } + public String getSchemaType() { + return schemaType; + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java deleted file mode 100644 index c03535ab9471..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesArray - */ -@JsonPropertyOrder({ - AdditionalPropertiesArray.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesArray extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesArray name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index 4356a4f8c1eb..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesBoolean - */ -@JsonPropertyOrder({ - AdditionalPropertiesBoolean.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesBoolean extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesBoolean name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 781d4686e981..7d984f4458d0 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,421 +3,99 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * AdditionalPropertiesClass - */ +/** AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) - public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = null; - - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = null; - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = null; - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = null; - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = null; - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = null; - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; - - - public AdditionalPropertiesClass mapString(Map mapString) { - - this.mapString = mapString; - return this; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap(); - } - this.mapString.put(key, mapStringItem); - return this; - } - - /** - * Get mapString - * @return mapString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapString() { - return mapString; - } - - - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - - this.mapNumber = mapNumber; - return this; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap(); - } - this.mapNumber.put(key, mapNumberItem); - return this; - } - - /** - * Get mapNumber - * @return mapNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapNumber() { - return mapNumber; - } - - - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = null; - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } + 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 mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap(); } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + this.mapProperty.put(key, mapPropertyItem); return this; } - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ + /** + * Get mapProperty + * + * @return mapProperty + */ @javax.annotation.Nullable @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; + public Map getMapProperty() { + return mapProperty; } - - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } + public AdditionalPropertiesClass mapOfMapProperty( + Map> mapOfMapProperty) { - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem( + String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap>(); } - this.mapMapAnytype.put(key, mapMapAnytypeItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ + /** + * Get mapOfMapProperty + * + * @return mapOfMapProperty + */ @javax.annotation.Nullable @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE3) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -427,47 +105,27 @@ public boolean equals(java.lang.Object o) { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) + && Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -475,6 +133,4 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - } - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java deleted file mode 100644 index 2426e7c974c4..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesInteger - */ -@JsonPropertyOrder({ - AdditionalPropertiesInteger.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesInteger extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesInteger name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java deleted file mode 100644 index da407ccdc473..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesNumber - */ -@JsonPropertyOrder({ - AdditionalPropertiesNumber.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesNumber extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesNumber name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 e0ae875483bd..0be31d514fe3 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,43 +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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Animal - */ -@JsonPropertyOrder({ - Animal.JSON_PROPERTY_CLASS_NAME, - Animal.JSON_PROPERTY_COLOR -}) +import java.util.Objects; -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) +/** Animal */ +@JsonPropertyOrder({Animal.JSON_PROPERTY_CLASS_NAME, Animal.JSON_PROPERTY_COLOR}) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "className", + visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) - public class Animal { public static final String JSON_PROPERTY_CLASS_NAME = "className"; private String className; @@ -47,56 +38,51 @@ public class Animal { public static final String JSON_PROPERTY_COLOR = "color"; private String color = "red"; - 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) { - + 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) { @@ -106,8 +92,8 @@ public boolean equals(java.lang.Object o) { return false; } Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); + return Objects.equals(this.className, animal.className) + && Objects.equals(this.color, animal.color); } @Override @@ -115,7 +101,6 @@ public int hashCode() { return Objects.hash(className, color); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -127,8 +112,7 @@ public String 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) { @@ -136,6 +120,4 @@ private String toIndentedString(java.lang.Object o) { } 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 96f829bc648b..fc5cfed29072 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,43 +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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ArrayOfArrayOfNumberOnly - */ -@JsonPropertyOrder({ - ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER -}) +import java.util.Objects; +/** ArrayOfArrayOfNumberOnly */ +@JsonPropertyOrder({ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER}) public class ArrayOfArrayOfNumberOnly { public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; private List> arrayArrayNumber = null; - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - + this.arrayArrayNumber = arrayArrayNumber; return this; } @@ -52,25 +41,23 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr 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) { @@ -88,7 +75,6 @@ public int hashCode() { return Objects.hash(arrayArrayNumber); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -99,8 +85,7 @@ public String 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) { @@ -108,6 +93,4 @@ private String toIndentedString(java.lang.Object o) { } 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 37e40dbd3ec8..6d4b1ba077e6 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,43 +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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ArrayOfNumberOnly - */ -@JsonPropertyOrder({ - ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER -}) +import java.util.Objects; +/** ArrayOfNumberOnly */ +@JsonPropertyOrder({ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER}) public class ArrayOfNumberOnly { public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; private List arrayNumber = null; - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - + this.arrayNumber = arrayNumber; return this; } @@ -52,25 +41,23 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { 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) { @@ -88,7 +75,6 @@ public int hashCode() { return Objects.hash(arrayNumber); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -99,8 +85,7 @@ public String 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) { @@ -108,6 +93,4 @@ private String toIndentedString(java.lang.Object o) { } 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 de7c895ac93a..b7b468f33edd 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,38 +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.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * ArrayTest - */ +/** ArrayTest */ @JsonPropertyOrder({ ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING, ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER, ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL }) - public class ArrayTest { public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; private List arrayOfString = null; @@ -45,9 +36,8 @@ 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) { - + this.arrayOfString = arrayOfString; return this; } @@ -60,27 +50,25 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { 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) { - + this.arrayArrayOfInteger = arrayArrayOfInteger; return this; } @@ -93,27 +81,25 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) 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) { - + this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -126,25 +112,23 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI 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) { @@ -154,9 +138,9 @@ public boolean equals(java.lang.Object o) { return false; } ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) + && Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) + && Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); } @Override @@ -164,21 +148,21 @@ public int hashCode() { return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfInteger: ") + .append(toIndentedString(arrayArrayOfInteger)) + .append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -186,6 +170,4 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - } - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/BigCat.java deleted file mode 100644 index 84b3f05703b2..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/BigCat.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCat - */ -@JsonPropertyOrder({ - BigCat.JSON_PROPERTY_KIND -}) - -public class BigCat extends Cat { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCat kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 7ce0ddb21f5a..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) - -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 033e97881105..a152526a20d8 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,29 +3,22 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * Capitalization - */ +/** Capitalization */ @JsonPropertyOrder({ Capitalization.JSON_PROPERTY_SMALL_CAMEL, Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, @@ -34,7 +27,6 @@ Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS, Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E }) - public class Capitalization { public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; private String smallCamel; @@ -54,157 +46,144 @@ public class Capitalization { public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; private String ATT_NAME; - public Capitalization smallCamel(String smallCamel) { - + this.smallCamel = smallCamel; 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { @@ -214,20 +193,20 @@ public boolean equals(java.lang.Object o) { return false; } Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + return Objects.equals(this.smallCamel, capitalization.smallCamel) + && Objects.equals(this.capitalCamel, capitalization.capitalCamel) + && Objects.equals(this.smallSnake, capitalization.smallSnake) + && Objects.equals(this.capitalSnake, capitalization.capitalSnake) + && Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) + && Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); } @Override public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return Objects.hash( + smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -243,8 +222,7 @@ public String 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) { @@ -252,6 +230,4 @@ private String toIndentedString(java.lang.Object o) { } 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 484725c76fe0..ac0b84d82e4b 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,65 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * Cat - */ -@JsonPropertyOrder({ - Cat.JSON_PROPERTY_DECLAWED -}) - +/** Cat */ +@JsonPropertyOrder({Cat.JSON_PROPERTY_DECLAWED}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; private Boolean declawed; - public Cat declawed(Boolean declawed) { - + this.declawed = declawed; 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) { @@ -71,8 +56,7 @@ public boolean equals(java.lang.Object o) { return false; } Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); + return Objects.equals(this.declawed, cat.declawed) && super.equals(o); } @Override @@ -80,7 +64,6 @@ public int hashCode() { return Objects.hash(declawed, super.hashCode()); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -92,8 +75,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -101,6 +83,4 @@ private String toIndentedString(java.lang.Object o) { } 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 3e7b991436aa..a7e4beaad66a 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,63 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) - +/** CatAllOf */ +@JsonPropertyOrder({CatAllOf.JSON_PROPERTY_DECLAWED}) public class CatAllOf { public static final String JSON_PROPERTY_DECLAWED = "declawed"; private Boolean declawed; - public CatAllOf declawed(Boolean declawed) { - + this.declawed = declawed; 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) { @@ -77,7 +64,6 @@ public int hashCode() { return Objects.hash(declawed); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -88,8 +74,7 @@ public String 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) { @@ -97,6 +82,4 @@ private String toIndentedString(java.lang.Object o) { } 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 868ba8750742..617b395ecfab 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,34 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * Category - */ -@JsonPropertyOrder({ - Category.JSON_PROPERTY_ID, - Category.JSON_PROPERTY_NAME -}) - +/** Category */ +@JsonPropertyOrder({Category.JSON_PROPERTY_ID, Category.JSON_PROPERTY_NAME}) public class Category { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -38,56 +27,51 @@ public class Category { public static final String JSON_PROPERTY_NAME = "name"; private String name = "default-name"; - 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) { - + 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) { @@ -97,8 +81,7 @@ public boolean equals(java.lang.Object o) { return false; } Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); + return Objects.equals(this.id, category.id) && Objects.equals(this.name, category.name); } @Override @@ -106,7 +89,6 @@ public int hashCode() { return Objects.hash(id, name); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -118,8 +100,7 @@ public String 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) { @@ -127,6 +108,4 @@ private String toIndentedString(java.lang.Object o) { } 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 4de7664b26a7..13bf74694c85 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,64 +3,52 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * Model for testing model with \"_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) { - + 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) { @@ -78,7 +66,6 @@ public int hashCode() { return Objects.hash(propertyClass); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,8 +76,7 @@ public String 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) { @@ -98,6 +84,4 @@ private String toIndentedString(java.lang.Object o) { } 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 02b0aac2247a..8aeda7b92c70 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,63 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * Client - */ -@JsonPropertyOrder({ - Client.JSON_PROPERTY_CLIENT -}) - +/** Client */ +@JsonPropertyOrder({Client.JSON_PROPERTY_CLIENT}) public class Client { public static final String JSON_PROPERTY_CLIENT = "client"; private String client; - public Client client(String client) { - + this.client = client; 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) { @@ -77,7 +64,6 @@ public int hashCode() { return Objects.hash(client); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -88,8 +74,7 @@ public String 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) { @@ -97,6 +82,4 @@ private String toIndentedString(java.lang.Object o) { } 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 78044654d500..7c8b535861c8 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,65 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * Dog - */ -@JsonPropertyOrder({ - Dog.JSON_PROPERTY_BREED -}) - +/** Dog */ +@JsonPropertyOrder({Dog.JSON_PROPERTY_BREED}) public class Dog extends Animal { public static final String JSON_PROPERTY_BREED = "breed"; private String breed; - public Dog breed(String breed) { - + this.breed = breed; 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) { @@ -71,8 +56,7 @@ public boolean equals(java.lang.Object o) { return false; } Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); + return Objects.equals(this.breed, dog.breed) && super.equals(o); } @Override @@ -80,7 +64,6 @@ public int hashCode() { return Objects.hash(breed, super.hashCode()); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -92,8 +75,7 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -101,6 +83,4 @@ private String toIndentedString(java.lang.Object o) { } 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 dd42595cf202..d474f9b5b1b6 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,63 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) - +/** DogAllOf */ +@JsonPropertyOrder({DogAllOf.JSON_PROPERTY_BREED}) public class DogAllOf { public static final String JSON_PROPERTY_BREED = "breed"; private String breed; - public DogAllOf breed(String breed) { - + this.breed = breed; 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) { @@ -77,7 +64,6 @@ public int hashCode() { return Objects.hash(breed); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -88,8 +74,7 @@ public String 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) { @@ -97,6 +82,4 @@ private String toIndentedString(java.lang.Object o) { } 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 aff182cd4983..8e72331cc30b 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,43 +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.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * EnumArrays - */ -@JsonPropertyOrder({ - EnumArrays.JSON_PROPERTY_JUST_SYMBOL, - EnumArrays.JSON_PROPERTY_ARRAY_ENUM -}) +import java.util.Objects; +/** EnumArrays */ +@JsonPropertyOrder({EnumArrays.JSON_PROPERTY_JUST_SYMBOL, EnumArrays.JSON_PROPERTY_ARRAY_ENUM}) public class EnumArrays { - /** - * Gets or Sets justSymbol - */ + /** Gets or Sets justSymbol */ public enum JustSymbolEnum { GREATER_THAN_OR_EQUAL_TO(">="), - + DOLLAR("$"); private String value; @@ -72,12 +61,10 @@ public static JustSymbolEnum fromValue(String value) { 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; @@ -110,34 +97,31 @@ public static ArrayEnumEnum fromValue(String value) { public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; private List arrayEnum = null; - 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) { - + this.arrayEnum = arrayEnum; return this; } @@ -150,25 +134,23 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { 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) { @@ -178,8 +160,8 @@ public boolean equals(java.lang.Object o) { return false; } EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + return Objects.equals(this.justSymbol, enumArrays.justSymbol) + && Objects.equals(this.arrayEnum, enumArrays.arrayEnum); } @Override @@ -187,7 +169,6 @@ public int hashCode() { return Objects.hash(justSymbol, arrayEnum); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -199,8 +180,7 @@ public String 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) { @@ -208,6 +188,4 @@ private String toIndentedString(java.lang.Object o) { } 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 e9102d974276..f1f1c4348c94 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,32 +3,25 @@ * 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; @@ -57,4 +50,3 @@ public static EnumClass fromValue(String value) { 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 51a1a645a109..f58b5a2d335d 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,47 +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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.OuterEnum; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** - * EnumTest - */ +/** EnumTest */ @JsonPropertyOrder({ EnumTest.JSON_PROPERTY_ENUM_STRING, EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) - public class EnumTest { - /** - * Gets or Sets enumString - */ + /** Gets or Sets enumString */ public enum EnumStringEnum { UPPER("UPPER"), - + LOWER("lower"), - + EMPTY(""); private String value; @@ -76,14 +72,12 @@ public static EnumStringEnum fromValue(String value) { 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; @@ -116,12 +110,10 @@ public static EnumStringRequiredEnum fromValue(String value) { 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; @@ -154,12 +146,10 @@ public static EnumIntegerEnum fromValue(Integer value) { 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; @@ -193,132 +183,213 @@ public static EnumNumberEnum fromValue(Double value) { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = + "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = + OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest enumString(EnumStringEnum enumString) { - + 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) { - + 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) { - + 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) { - + 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 = 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); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + this.outerEnum = JsonNullable.of(outerEnum); + } + + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * + * @return outerEnumInteger + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * + * @return outerEnumDefaultValue + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + public EnumTest outerEnumIntegerDefaultValue( + OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; } + /** + * Get outerEnumIntegerDefaultValue + * + * @return outerEnumIntegerDefaultValue + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + public void setOuterEnumIntegerDefaultValue( + OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + } @Override public boolean equals(java.lang.Object o) { @@ -329,19 +400,29 @@ public boolean equals(java.lang.Object o) { return false; } EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + return Objects.equals(this.enumString, enumTest.enumString) + && Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) + && Objects.equals(this.enumInteger, enumTest.enumInteger) + && Objects.equals(this.enumNumber, enumTest.enumNumber) + && Objects.equals(this.outerEnum, enumTest.outerEnum) + && Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) + && Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) + && Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash( + enumString, + enumStringRequired, + enumInteger, + enumNumber, + outerEnum, + outerEnumInteger, + outerEnumDefaultValue, + outerEnumIntegerDefaultValue); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -351,13 +432,19 @@ public String toString() { sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ") + .append(toIndentedString(outerEnumDefaultValue)) + .append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ") + .append(toIndentedString(outerEnumIntegerDefaultValue)) + .append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -365,6 +452,4 @@ private String toIndentedString(java.lang.Object o) { } 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 8166597792d0..e596551a7714 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,36 +3,28 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * FileSchemaTestClass - */ +/** FileSchemaTestClass */ @JsonPropertyOrder({ FileSchemaTestClass.JSON_PROPERTY_FILE, FileSchemaTestClass.JSON_PROPERTY_FILES }) - public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILE = "file"; private java.io.File file; @@ -40,34 +32,31 @@ public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILES = "files"; private List files = null; - 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) { - + this.files = files; return this; } @@ -80,25 +69,23 @@ public FileSchemaTestClass addFilesItem(java.io.File filesItem) { 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) { @@ -108,8 +95,8 @@ public boolean equals(java.lang.Object o) { return false; } FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && - Objects.equals(this.files, fileSchemaTestClass.files); + return Objects.equals(this.file, fileSchemaTestClass.file) + && Objects.equals(this.files, fileSchemaTestClass.files); } @Override @@ -117,7 +104,6 @@ public int hashCode() { return Objects.hash(file, files); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -129,8 +115,7 @@ public String 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) { @@ -138,6 +123,4 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - } - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java similarity index 53% rename from samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java rename to samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java index ed080254966e..8dddfe49d020 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/Foo.java @@ -3,65 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * AdditionalPropertiesString - */ -@JsonPropertyOrder({ - AdditionalPropertiesString.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesString extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; +/** 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 AdditionalPropertiesString name(String name) { - - this.name = name; + this.bar = bar; return this; } - /** - * Get name - * @return name - **/ + /** + * Get bar + * + * @return bar + */ @javax.annotation.Nullable @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) + @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; + public String getBar() { + return bar; } - - public void setName(String name) { - this.name = name; + public void setBar(String bar) { + this.bar = bar; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -70,30 +55,26 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(bar); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -101,6 +82,4 @@ private String toIndentedString(java.lang.Object o) { } 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 4dee7f6c9dcc..bbecfc092727 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,34 +3,28 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Objects; import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** - * FormatTest - */ +/** FormatTest */ @JsonPropertyOrder({ FormatTest.JSON_PROPERTY_INTEGER, FormatTest.JSON_PROPERTY_INT32, @@ -45,9 +39,9 @@ FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) - public class FormatTest { public static final String JSON_PROPERTY_INTEGER = "integer"; private Integer integer; @@ -88,365 +82,356 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = + "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest integer(Integer integer) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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 bigDecimal(BigDecimal bigDecimal) { - - this.bigDecimal = bigDecimal; + this.patternWithDigits = patternWithDigits; return this; } - /** - * Get bigDecimal - * @return bigDecimal - **/ + /** + * A string that is a 10 digit number. Can have leading zeros. + * + * @return patternWithDigits + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.") + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPatternWithDigits() { + return patternWithDigits; + } - public BigDecimal getBigDecimal() { - return bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; } + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + /** + * 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.") + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; } + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + } @Override public boolean equals(java.lang.Object o) { @@ -457,28 +442,44 @@ public boolean equals(java.lang.Object o) { return false; } FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + return Objects.equals(this.integer, formatTest.integer) + && Objects.equals(this.int32, formatTest.int32) + && Objects.equals(this.int64, formatTest.int64) + && Objects.equals(this.number, formatTest.number) + && Objects.equals(this._float, formatTest._float) + && Objects.equals(this._double, formatTest._double) + && Objects.equals(this.string, formatTest.string) + && Arrays.equals(this._byte, formatTest._byte) + && Objects.equals(this.binary, formatTest.binary) + && Objects.equals(this.date, formatTest.date) + && Objects.equals(this.dateTime, formatTest.dateTime) + && Objects.equals(this.uuid, formatTest.uuid) + && Objects.equals(this.password, formatTest.password) + && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) + && Objects.equals( + this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash( + integer, + int32, + int64, + number, + _float, + _double, + string, + Arrays.hashCode(_byte), + binary, + date, + dateTime, + uuid, + password, + patternWithDigits, + patternWithDigitsAndDelimiter); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -496,14 +497,16 @@ public String toString() { sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ") + .append(toIndentedString(patternWithDigitsAndDelimiter)) + .append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -511,6 +514,4 @@ private String toIndentedString(java.lang.Object o) { } 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 0a3f0d464360..24bbe4252c51 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,34 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * HasOnlyReadOnly - */ -@JsonPropertyOrder({ - HasOnlyReadOnly.JSON_PROPERTY_BAR, - HasOnlyReadOnly.JSON_PROPERTY_FOO -}) - +/** HasOnlyReadOnly */ +@JsonPropertyOrder({HasOnlyReadOnly.JSON_PROPERTY_BAR, HasOnlyReadOnly.JSON_PROPERTY_FOO}) public class HasOnlyReadOnly { public static final String JSON_PROPERTY_BAR = "bar"; private String bar; @@ -38,39 +27,32 @@ public class HasOnlyReadOnly { public static final String JSON_PROPERTY_FOO = "foo"; private String foo; - - /** + /** * Get bar + * * @return bar - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBar() { return bar; } - - - - /** + /** * Get foo + * * @return foo - **/ + */ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FOO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFoo() { return foo; } - - - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -80,8 +62,8 @@ public boolean equals(java.lang.Object o) { return false; } HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); + return Objects.equals(this.bar, hasOnlyReadOnly.bar) + && Objects.equals(this.foo, hasOnlyReadOnly.foo); } @Override @@ -89,7 +71,6 @@ public int hashCode() { return Objects.hash(bar, foo); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -101,8 +82,7 @@ public String 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) { @@ -110,6 +90,4 @@ private String toIndentedString(java.lang.Object o) { } 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 new file mode 100644 index 000000000000..acaf6793dc26 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer + * in generated model. + */ +@ApiModel( + description = + "Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.") +@JsonPropertyOrder({HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE}) +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable 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); + } + + @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; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage); + } + + @Override + public int hashCode() { + return Objects.hash(nullableMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java similarity index 59% rename from samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java rename to samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java index 0f1223c2bc61..1141c6634853 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject.java @@ -3,64 +3,75 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * AdditionalPropertiesAnyType - */ -@JsonPropertyOrder({ - AdditionalPropertiesAnyType.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesAnyType extends HashMap { +/** InlineObject */ +@JsonPropertyOrder({InlineObject.JSON_PROPERTY_NAME, InlineObject.JSON_PROPERTY_STATUS}) +public class InlineObject { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public InlineObject name(String name) { - public AdditionalPropertiesAnyType name(String name) { - this.name = name; return this; } - /** - * Get name + /** + * Updated name of the pet + * * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(value = "Updated name of the pet") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { return name; } - public void setName(String name) { this.name = name; } + public InlineObject status(String status) { + + this.status = status; + return this; + } + + /** + * Updated status of the pet + * + * @return status + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "Updated status of the pet") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } @Override public boolean equals(java.lang.Object o) { @@ -70,30 +81,28 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); + InlineObject inlineObject = (InlineObject) o; + return Objects.equals(this.name, inlineObject.name) + && Objects.equals(this.status, inlineObject.status); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(name, status); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("class InlineObject {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -101,6 +110,4 @@ private String toIndentedString(java.lang.Object o) { } 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 new file mode 100644 index 000000000000..2bf1fade373c --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject1.java @@ -0,0 +1,117 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.util.Objects; + +/** InlineObject1 */ +@JsonPropertyOrder({ + InlineObject1.JSON_PROPERTY_ADDITIONAL_METADATA, + InlineObject1.JSON_PROPERTY_FILE +}) +public class InlineObject1 { + public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata"; + private String additionalMetadata; + + public static final String JSON_PROPERTY_FILE = "file"; + private File file; + + public InlineObject1 additionalMetadata(String additionalMetadata) { + + this.additionalMetadata = additionalMetadata; + return this; + } + + /** + * Additional data to pass to server + * + * @return additionalMetadata + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "Additional data to pass to server") + @JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAdditionalMetadata() { + return additionalMetadata; + } + + public void setAdditionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + } + + public InlineObject1 file(File file) { + + this.file = file; + return this; + } + + /** + * file to upload + * + * @return file + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "file to upload") + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public File getFile() { + return file; + } + + public void setFile(File file) { + this.file = file; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject1 inlineObject1 = (InlineObject1) o; + return Objects.equals(this.additionalMetadata, inlineObject1.additionalMetadata) + && Objects.equals(this.file, inlineObject1.file); + } + + @Override + public int hashCode() { + return Objects.hash(additionalMetadata, file); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject1 {\n"); + sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} 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 new file mode 100644 index 000000000000..92639fccaeff --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject2.java @@ -0,0 +1,198 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** InlineObject2 */ +@JsonPropertyOrder({ + InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING_ARRAY, + InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING +}) +public class InlineObject2 { + /** Gets or Sets enumFormStringArray */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_FORM_STRING_ARRAY = "enum_form_string_array"; + private List enumFormStringArray = null; + + /** Form parameter enum test (string) */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENUM_FORM_STRING = "enum_form_string"; + private EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG; + + public InlineObject2 enumFormStringArray(List enumFormStringArray) { + + this.enumFormStringArray = enumFormStringArray; + return this; + } + + public InlineObject2 addEnumFormStringArrayItem(EnumFormStringArrayEnum enumFormStringArrayItem) { + if (this.enumFormStringArray == null) { + this.enumFormStringArray = new ArrayList(); + } + this.enumFormStringArray.add(enumFormStringArrayItem); + return this; + } + + /** + * Form parameter enum test (string array) + * + * @return enumFormStringArray + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "Form parameter enum test (string array)") + @JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING_ARRAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnumFormStringArray() { + return enumFormStringArray; + } + + public void setEnumFormStringArray(List enumFormStringArray) { + this.enumFormStringArray = enumFormStringArray; + } + + public InlineObject2 enumFormString(EnumFormStringEnum enumFormString) { + + this.enumFormString = enumFormString; + return this; + } + + /** + * Form parameter enum test (string) + * + * @return enumFormString + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "Form parameter enum test (string)") + @JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EnumFormStringEnum getEnumFormString() { + return enumFormString; + } + + public void setEnumFormString(EnumFormStringEnum enumFormString) { + this.enumFormString = enumFormString; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject2 inlineObject2 = (InlineObject2) o; + return Objects.equals(this.enumFormStringArray, inlineObject2.enumFormStringArray) + && Objects.equals(this.enumFormString, inlineObject2.enumFormString); + } + + @Override + public int hashCode() { + return Objects.hash(enumFormStringArray, enumFormString); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject2 {\n"); + sb.append(" enumFormStringArray: ") + .append(toIndentedString(enumFormStringArray)) + .append("\n"); + sb.append(" enumFormString: ").append(toIndentedString(enumFormString)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} 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 new file mode 100644 index 000000000000..e95a6cbf369d --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject3.java @@ -0,0 +1,481 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Objects; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +/** InlineObject3 */ +@JsonPropertyOrder({ + InlineObject3.JSON_PROPERTY_INTEGER, + InlineObject3.JSON_PROPERTY_INT32, + InlineObject3.JSON_PROPERTY_INT64, + InlineObject3.JSON_PROPERTY_NUMBER, + InlineObject3.JSON_PROPERTY_FLOAT, + InlineObject3.JSON_PROPERTY_DOUBLE, + InlineObject3.JSON_PROPERTY_STRING, + InlineObject3.JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER, + InlineObject3.JSON_PROPERTY_BYTE, + InlineObject3.JSON_PROPERTY_BINARY, + InlineObject3.JSON_PROPERTY_DATE, + InlineObject3.JSON_PROPERTY_DATE_TIME, + InlineObject3.JSON_PROPERTY_PASSWORD, + InlineObject3.JSON_PROPERTY_CALLBACK +}) +public class InlineObject3 { + public static final String JSON_PROPERTY_INTEGER = "integer"; + private Integer integer; + + public static final String JSON_PROPERTY_INT32 = "int32"; + private Integer int32; + + public static final String JSON_PROPERTY_INT64 = "int64"; + private Long int64; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public static final String JSON_PROPERTY_STRING = "string"; + private String string; + + public static final String JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER = "pattern_without_delimiter"; + private String patternWithoutDelimiter; + + public static final String JSON_PROPERTY_BYTE = "byte"; + private byte[] _byte; + + public static final String JSON_PROPERTY_BINARY = "binary"; + private File binary; + + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; + private OffsetDateTime dateTime; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_CALLBACK = "callback"; + private String callback; + + public InlineObject3 integer(Integer integer) { + + this.integer = integer; + return this; + } + + /** + * None minimum: 10 maximum: 100 + * + * @return integer + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public InlineObject3 int32(Integer int32) { + + this.int32 = int32; + return this; + } + + /** + * None minimum: 20 maximum: 200 + * + * @return int32 + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_INT32) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public InlineObject3 int64(Long int64) { + + this.int64 = int64; + return this; + } + + /** + * None + * + * @return int64 + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_INT64) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public InlineObject3 number(BigDecimal number) { + + this.number = number; + return this; + } + + /** + * None minimum: 32.1 maximum: 543.2 + * + * @return number + */ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public InlineObject3 _float(Float _float) { + + this._float = _float; + return this; + } + + /** + * None maximum: 987.6 + * + * @return _float + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public InlineObject3 _double(Double _double) { + + this._double = _double; + return this; + } + + /** + * None minimum: 67.8 maximum: 123.4 + * + * @return _double + */ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public InlineObject3 string(String string) { + + this.string = string; + return this; + } + + /** + * None + * + * @return string + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public InlineObject3 patternWithoutDelimiter(String patternWithoutDelimiter) { + + this.patternWithoutDelimiter = patternWithoutDelimiter; + return this; + } + + /** + * None + * + * @return patternWithoutDelimiter + */ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPatternWithoutDelimiter() { + return patternWithoutDelimiter; + } + + public void setPatternWithoutDelimiter(String patternWithoutDelimiter) { + this.patternWithoutDelimiter = patternWithoutDelimiter; + } + + public InlineObject3 _byte(byte[] _byte) { + + this._byte = _byte; + return this; + } + + /** + * None + * + * @return _byte + */ + @ApiModelProperty(required = true, value = "None") + @JsonProperty(JSON_PROPERTY_BYTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public InlineObject3 binary(File binary) { + + this.binary = binary; + return this; + } + + /** + * None + * + * @return binary + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_BINARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public File getBinary() { + return binary; + } + + public void setBinary(File binary) { + this.binary = binary; + } + + public InlineObject3 date(LocalDate date) { + + this.date = date; + return this; + } + + /** + * None + * + * @return date + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public InlineObject3 dateTime(OffsetDateTime dateTime) { + + this.dateTime = dateTime; + return this; + } + + /** + * None + * + * @return dateTime + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public InlineObject3 password(String password) { + + this.password = password; + return this; + } + + /** + * None + * + * @return password + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public InlineObject3 callback(String callback) { + + this.callback = callback; + return this; + } + + /** + * None + * + * @return callback + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "None") + @JsonProperty(JSON_PROPERTY_CALLBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCallback() { + return callback; + } + + public void setCallback(String callback) { + this.callback = callback; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject3 inlineObject3 = (InlineObject3) o; + return Objects.equals(this.integer, inlineObject3.integer) + && Objects.equals(this.int32, inlineObject3.int32) + && Objects.equals(this.int64, inlineObject3.int64) + && Objects.equals(this.number, inlineObject3.number) + && Objects.equals(this._float, inlineObject3._float) + && Objects.equals(this._double, inlineObject3._double) + && Objects.equals(this.string, inlineObject3.string) + && Objects.equals(this.patternWithoutDelimiter, inlineObject3.patternWithoutDelimiter) + && Arrays.equals(this._byte, inlineObject3._byte) + && Objects.equals(this.binary, inlineObject3.binary) + && Objects.equals(this.date, inlineObject3.date) + && Objects.equals(this.dateTime, inlineObject3.dateTime) + && Objects.equals(this.password, inlineObject3.password) + && Objects.equals(this.callback, inlineObject3.callback); + } + + @Override + public int hashCode() { + return Objects.hash( + integer, + int32, + int64, + number, + _float, + _double, + string, + patternWithoutDelimiter, + Arrays.hashCode(_byte), + binary, + date, + dateTime, + password, + callback); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject3 {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" patternWithoutDelimiter: ") + .append(toIndentedString(patternWithoutDelimiter)) + .append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} 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 new file mode 100644 index 000000000000..8704fc9a4b1b --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject4.java @@ -0,0 +1,111 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; + +/** InlineObject4 */ +@JsonPropertyOrder({InlineObject4.JSON_PROPERTY_PARAM, InlineObject4.JSON_PROPERTY_PARAM2}) +public class InlineObject4 { + public static final String JSON_PROPERTY_PARAM = "param"; + private String param; + + public static final String JSON_PROPERTY_PARAM2 = "param2"; + private String param2; + + public InlineObject4 param(String param) { + + this.param = param; + return this; + } + + /** + * field1 + * + * @return param + */ + @ApiModelProperty(required = true, value = "field1") + @JsonProperty(JSON_PROPERTY_PARAM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + public InlineObject4 param2(String param2) { + + this.param2 = param2; + return this; + } + + /** + * field2 + * + * @return param2 + */ + @ApiModelProperty(required = true, value = "field2") + @JsonProperty(JSON_PROPERTY_PARAM2) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getParam2() { + return param2; + } + + public void setParam2(String param2) { + this.param2 = param2; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject4 inlineObject4 = (InlineObject4) o; + return Objects.equals(this.param, inlineObject4.param) + && Objects.equals(this.param2, inlineObject4.param2); + } + + @Override + public int hashCode() { + return Objects.hash(param, param2); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject4 {\n"); + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append(" param2: ").append(toIndentedString(param2)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} 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 new file mode 100644 index 000000000000..d5426d00c120 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineObject5.java @@ -0,0 +1,116 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.util.Objects; + +/** InlineObject5 */ +@JsonPropertyOrder({ + InlineObject5.JSON_PROPERTY_ADDITIONAL_METADATA, + InlineObject5.JSON_PROPERTY_REQUIRED_FILE +}) +public class InlineObject5 { + public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata"; + private String additionalMetadata; + + public static final String JSON_PROPERTY_REQUIRED_FILE = "requiredFile"; + private File requiredFile; + + public InlineObject5 additionalMetadata(String additionalMetadata) { + + this.additionalMetadata = additionalMetadata; + return this; + } + + /** + * Additional data to pass to server + * + * @return additionalMetadata + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "Additional data to pass to server") + @JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAdditionalMetadata() { + return additionalMetadata; + } + + public void setAdditionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + } + + public InlineObject5 requiredFile(File requiredFile) { + + this.requiredFile = requiredFile; + return this; + } + + /** + * file to upload + * + * @return requiredFile + */ + @ApiModelProperty(required = true, value = "file to upload") + @JsonProperty(JSON_PROPERTY_REQUIRED_FILE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public File getRequiredFile() { + return requiredFile; + } + + public void setRequiredFile(File requiredFile) { + this.requiredFile = requiredFile; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject5 inlineObject5 = (InlineObject5) o; + return Objects.equals(this.additionalMetadata, inlineObject5.additionalMetadata) + && Objects.equals(this.requiredFile, inlineObject5.requiredFile); + } + + @Override + public int hashCode() { + return Objects.hash(additionalMetadata, requiredFile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject5 {\n"); + sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); + sb.append(" requiredFile: ").append(toIndentedString(requiredFile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java similarity index 53% rename from samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java rename to samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java index 5e468870311e..f9e010ddc702 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/InlineResponseDefault.java @@ -3,65 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * AdditionalPropertiesObject - */ -@JsonPropertyOrder({ - AdditionalPropertiesObject.JSON_PROPERTY_NAME -}) - -public class AdditionalPropertiesObject extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; +/** 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 AdditionalPropertiesObject name(String name) { - - this.name = name; + this.string = string; return this; } - /** - * Get name - * @return name - **/ + /** + * Get string + * + * @return string + */ @javax.annotation.Nullable @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) + @JsonProperty(JSON_PROPERTY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; + public Foo getString() { + return string; } - - public void setName(String name) { - this.name = name; + public void setString(Foo string) { + this.string = string; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -70,30 +55,26 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); + InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o; + return Objects.equals(this.string, inlineResponseDefault.string); } @Override public int hashCode() { - return Objects.hash(name, super.hashCode()); + return Objects.hash(string); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("class InlineResponseDefault {\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { @@ -101,6 +82,4 @@ private String toIndentedString(java.lang.Object o) { } 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 113f92dd9cbe..d5d3dfe599d7 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,49 +3,40 @@ * 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.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; -import java.util.List; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * MapTest - */ +/** MapTest */ @JsonPropertyOrder({ MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING, MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING, MapTest.JSON_PROPERTY_DIRECT_MAP, MapTest.JSON_PROPERTY_INDIRECT_MAP }) - public class MapTest { public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; private Map> mapMapOfString = null; - /** - * Gets or Sets inner - */ + /** Gets or Sets inner */ public enum InnerEnum { UPPER("UPPER"), - + LOWER("lower"); private String value; @@ -84,9 +75,8 @@ public static InnerEnum fromValue(String value) { public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; private Map indirectMap = null; - public MapTest mapMapOfString(Map> mapMapOfString) { - + this.mapMapOfString = mapMapOfString; return this; } @@ -99,27 +89,25 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr 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) { - + this.mapOfEnumString = mapOfEnumString; return this; } @@ -132,27 +120,25 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) 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) { - + this.directMap = directMap; return this; } @@ -165,27 +151,25 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { 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) { - + this.indirectMap = indirectMap; return this; } @@ -198,25 +182,23 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { 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) { @@ -226,10 +208,10 @@ public boolean equals(java.lang.Object o) { return false; } MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) + && Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) + && Objects.equals(this.directMap, mapTest.directMap) + && Objects.equals(this.indirectMap, mapTest.indirectMap); } @Override @@ -237,7 +219,6 @@ public int hashCode() { return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -251,8 +232,7 @@ public String 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) { @@ -260,6 +240,4 @@ private String toIndentedString(java.lang.Object o) { } 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 d483d69700f8..9a30d1299f9f 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,41 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; -import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.UUID; -import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** - * MixedPropertiesAndAdditionalPropertiesClass - */ +/** MixedPropertiesAndAdditionalPropertiesClass */ @JsonPropertyOrder({ MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID, MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME, MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP }) - public class MixedPropertiesAndAdditionalPropertiesClass { public static final String JSON_PROPERTY_UUID = "uuid"; private UUID uuid; @@ -48,59 +38,54 @@ public class MixedPropertiesAndAdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP = "map"; private Map map = null; - 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) { - + 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) { - + this.map = map; return this; } @@ -113,25 +98,23 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal 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) { @@ -140,10 +123,11 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = + (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) + && Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) + && Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); } @Override @@ -151,7 +135,6 @@ public int hashCode() { return Objects.hash(uuid, dateTime, map); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -164,8 +147,7 @@ public String 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) { @@ -173,6 +155,4 @@ private String toIndentedString(java.lang.Object o) { } 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 dd99468a0059..b3972c060311 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,35 +3,28 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * Model for testing model 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; @@ -39,57 +32,52 @@ public class Model200Response { public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; private String propertyClass; - 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) { - + 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) { @@ -99,8 +87,8 @@ public boolean equals(java.lang.Object o) { 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 @@ -108,7 +96,6 @@ public int hashCode() { return Objects.hash(name, propertyClass); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -120,8 +107,7 @@ public String 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) { @@ -129,6 +115,4 @@ private String toIndentedString(java.lang.Object o) { } 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 383cafdd3a5a..2efca6f97bd1 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,35 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * 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; @@ -42,82 +34,75 @@ public class ModelApiResponse { public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; - 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) { - + 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) { - + 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) { @@ -127,9 +112,9 @@ public boolean equals(java.lang.Object o) { 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 @@ -137,7 +122,6 @@ public int hashCode() { return Objects.hash(code, type, message); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -150,8 +134,7 @@ public String 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) { @@ -159,6 +142,4 @@ private String toIndentedString(java.lang.Object o) { } 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 b62e13a90a0c..374989b521c5 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,64 +3,52 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * Model for testing 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) { - + 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) { @@ -78,7 +66,6 @@ public int hashCode() { return Objects.hash(_return); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,8 +76,7 @@ public String 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) { @@ -98,6 +84,4 @@ private String toIndentedString(java.lang.Object o) { } 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 bd625c5f66f3..918eb738e286 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,29 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * Model for testing model 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, @@ -33,7 +27,6 @@ Name.JSON_PROPERTY_PROPERTY, Name.JSON_PROPERTY_123NUMBER }) - public class Name { public static final String JSON_PROPERTY_NAME = "name"; private Integer name; @@ -47,88 +40,77 @@ public class Name { public static final String JSON_PROPERTY_123NUMBER = "123Number"; private Integer _123number; - 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) { - + 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) { @@ -138,10 +120,10 @@ public boolean equals(java.lang.Object o) { 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 @@ -149,7 +131,6 @@ public int hashCode() { return Objects.hash(name, snakeCase, property, _123number); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -163,8 +144,7 @@ public String 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) { @@ -172,6 +152,4 @@ private String toIndentedString(java.lang.Object o) { } 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 new file mode 100644 index 000000000000..1c74f6e2158f --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,612 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.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; + +/** NullableClass */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + 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(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + 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_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(); + + 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); + } + + @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; + } + + public void setIntegerProp(Integer integerProp) { + 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); + } + + @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; + } + + public void setNumberProp(BigDecimal numberProp) { + 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); + } + + @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; + } + + public void setBooleanProp(Boolean booleanProp) { + 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); + } + + @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; + } + + public void setStringProp(String stringProp) { + 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); + } + + @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; + } + + public void setDateProp(LocalDate dateProp) { + 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); + } + + @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; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * + * @return arrayNullableProp + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + public List getArrayNullableProp() { + 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; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * + * @return arrayAndItemsNullableProp + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + public List getArrayAndItemsNullableProp() { + 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) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + 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; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * + * @return objectNullableProp + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + public Map getObjectNullableProp() { + 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) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = + JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem( + String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = + JsonNullable.>of(new HashMap()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * + * @return objectAndItemsNullableProp + */ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + public Map getObjectAndItemsNullableProp() { + 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) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = + JsonNullable.>of(objectAndItemsNullableProp); + } + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + 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) { + return true; + } + if (o == null || getClass() != o.getClass()) { + 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); + } + + @Override + public int 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(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + 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(" 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/samples/client/petstore/java/jersey2-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 5ca72a169fe8..04ea549f07c4 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,64 +3,51 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * NumberOnly - */ -@JsonPropertyOrder({ - NumberOnly.JSON_PROPERTY_JUST_NUMBER -}) +import java.util.Objects; +/** 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) { - + 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) { @@ -78,7 +65,6 @@ public int hashCode() { return Objects.hash(justNumber); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,8 +75,7 @@ public String 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) { @@ -98,6 +83,4 @@ private String toIndentedString(java.lang.Object o) { } 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 6e2816302162..b78b7482b4e3 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,30 +3,25 @@ * 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.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; import org.threeten.bp.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -/** - * Order - */ +/** Order */ @JsonPropertyOrder({ Order.JSON_PROPERTY_ID, Order.JSON_PROPERTY_PET_ID, @@ -35,7 +30,6 @@ Order.JSON_PROPERTY_STATUS, Order.JSON_PROPERTY_COMPLETE }) - public class Order { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -49,14 +43,12 @@ 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; @@ -92,157 +84,144 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_COMPLETE = "complete"; private Boolean complete = false; - 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { @@ -252,12 +231,12 @@ public boolean equals(java.lang.Object o) { 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 @@ -265,7 +244,6 @@ public int hashCode() { return Objects.hash(id, petId, quantity, shipDate, status, complete); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -281,8 +259,7 @@ public String 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) { @@ -290,6 +267,4 @@ private String toIndentedString(java.lang.Object o) { } 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 d4d9ac6ba110..1fd74d7906f4 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,36 +3,28 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * 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; @@ -43,82 +35,75 @@ public class OuterComposite { public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; private Boolean myBoolean; - 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) { - + 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) { - + 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) { @@ -128,9 +113,9 @@ public boolean equals(java.lang.Object o) { 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 @@ -138,7 +123,6 @@ public int hashCode() { return Objects.hash(myNumber, myString, myBoolean); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -151,8 +135,7 @@ public String 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) { @@ -160,6 +143,4 @@ private String toIndentedString(java.lang.Object o) { } 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 308646a320c7..6d7255bbe62c 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,32 +3,25 @@ * 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; @@ -54,7 +47,6 @@ public static OuterEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + 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 new file mode 100644 index 000000000000..109be684331b --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets OuterEnumDefaultValue */ +public enum OuterEnumDefaultValue { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + 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 new file mode 100644 index 000000000000..277107e01030 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets OuterEnumInteger */ +public enum OuterEnumInteger { + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + 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 new file mode 100644 index 000000000000..91c11e7b4aa0 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets OuterEnumIntegerDefaultValue */ +public enum OuterEnumIntegerDefaultValue { + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + 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 be74dd5ca081..7690da073c12 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,33 +3,26 @@ * 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.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; -/** - * Pet - */ +/** Pet */ @JsonPropertyOrder({ Pet.JSON_PROPERTY_ID, Pet.JSON_PROPERTY_CATEGORY, @@ -38,7 +31,6 @@ Pet.JSON_PROPERTY_TAGS, Pet.JSON_PROPERTY_STATUS }) - public class Pet { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -55,14 +47,12 @@ 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; @@ -95,83 +85,76 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_STATUS = "status"; private StatusEnum status; - 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) { - + 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) { - + 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) { - + this.photoUrls = photoUrls; return this; } @@ -181,26 +164,24 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { 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) { - + this.tags = tags; return this; } @@ -213,50 +194,46 @@ public Pet addTagsItem(Tag tagsItem) { 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) { - + 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) { @@ -266,12 +243,12 @@ public boolean equals(java.lang.Object o) { 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 @@ -279,7 +256,6 @@ public int hashCode() { return Objects.hash(id, category, name, photoUrls, tags, status); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -295,8 +271,7 @@ public String 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) { @@ -304,6 +279,4 @@ private String toIndentedString(java.lang.Object o) { } 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 b3e58ef3d2c5..11ad89b4d018 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,34 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * 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; @@ -38,48 +27,42 @@ 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) { - + 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) { @@ -89,8 +72,8 @@ public boolean equals(java.lang.Object o) { 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 @@ -98,7 +81,6 @@ public int hashCode() { return Objects.hash(bar, baz); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,8 +92,7 @@ public String 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) { @@ -119,6 +100,4 @@ private String toIndentedString(java.lang.Object o) { } 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 35ad3bf46994..2749ec0c7b4f 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,63 +3,50 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * 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) { - + 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) { @@ -68,8 +55,8 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override @@ -77,19 +64,19 @@ public int hashCode() { 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) { @@ -97,6 +84,4 @@ private String toIndentedString(java.lang.Object o) { } 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 a3ecb398faa3..f2155a9a7e7f 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,34 +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.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * 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; @@ -38,57 +27,52 @@ public class Tag { public static final String JSON_PROPERTY_NAME = "name"; private String name; - 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) { - + 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) { @@ -98,8 +82,7 @@ public boolean equals(java.lang.Object o) { 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 @@ -107,7 +90,6 @@ public int hashCode() { return Objects.hash(id, name); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -119,8 +101,7 @@ public String 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) { @@ -128,6 +109,4 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - } - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/TypeHolderDefault.java deleted file mode 100644 index 73f393587944..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TypeHolderDefault - */ -@JsonPropertyOrder({ - TypeHolderDefault.JSON_PROPERTY_STRING_ITEM, - TypeHolderDefault.JSON_PROPERTY_NUMBER_ITEM, - TypeHolderDefault.JSON_PROPERTY_INTEGER_ITEM, - TypeHolderDefault.JSON_PROPERTY_BOOL_ITEM, - TypeHolderDefault.JSON_PROPERTY_ARRAY_ITEM -}) - -public class TypeHolderDefault { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem = "what"; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem = true; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList(); - - - public TypeHolderDefault stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getStringItem() { - return stringItem; - } - - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderDefault numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumberItem() { - return numberItem; - } - - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderDefault integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getIntegerItem() { - return integerItem; - } - - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderDefault boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getBoolItem() { - return boolItem; - } - - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderDefault arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public List getArrayItem() { - return arrayItem; - } - - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/TypeHolderExample.java deleted file mode 100644 index e3daa1a3e1cb..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TypeHolderExample - */ -@JsonPropertyOrder({ - TypeHolderExample.JSON_PROPERTY_STRING_ITEM, - TypeHolderExample.JSON_PROPERTY_NUMBER_ITEM, - TypeHolderExample.JSON_PROPERTY_FLOAT_ITEM, - TypeHolderExample.JSON_PROPERTY_INTEGER_ITEM, - TypeHolderExample.JSON_PROPERTY_BOOL_ITEM, - TypeHolderExample.JSON_PROPERTY_ARRAY_ITEM -}) - -public class TypeHolderExample { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; - private Float floatItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList(); - - - public TypeHolderExample stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @ApiModelProperty(example = "what", required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getStringItem() { - return stringItem; - } - - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderExample numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumberItem() { - return numberItem; - } - - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderExample floatItem(Float floatItem) { - - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - **/ - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Float getFloatItem() { - return floatItem; - } - - - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - - public TypeHolderExample integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @ApiModelProperty(example = "-2", required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getIntegerItem() { - return integerItem; - } - - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderExample boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @ApiModelProperty(example = "true", required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getBoolItem() { - return boolItem; - } - - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderExample arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public List getArrayItem() { - return arrayItem; - } - - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-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 b7e74643dab2..637c9625657f 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,29 +3,22 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; -/** - * User - */ +/** User */ @JsonPropertyOrder({ User.JSON_PROPERTY_ID, User.JSON_PROPERTY_USERNAME, @@ -36,7 +29,6 @@ User.JSON_PROPERTY_PHONE, User.JSON_PROPERTY_USER_STATUS }) - public class User { public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -62,207 +54,190 @@ public class User { public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; private Integer userStatus; - 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { - + 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) { @@ -272,14 +247,14 @@ public boolean equals(java.lang.Object o) { 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 @@ -287,7 +262,6 @@ public int hashCode() { return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -305,8 +279,7 @@ public String 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) { @@ -314,6 +287,4 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - } - diff --git a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/XmlItem.java deleted file mode 100644 index f585a625223a..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/main/java/org/openapitools/client/model/XmlItem.java +++ /dev/null @@ -1,1045 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * XmlItem - */ -@JsonPropertyOrder({ - XmlItem.JSON_PROPERTY_ATTRIBUTE_STRING, - XmlItem.JSON_PROPERTY_ATTRIBUTE_NUMBER, - XmlItem.JSON_PROPERTY_ATTRIBUTE_INTEGER, - XmlItem.JSON_PROPERTY_ATTRIBUTE_BOOLEAN, - XmlItem.JSON_PROPERTY_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_NAME_STRING, - XmlItem.JSON_PROPERTY_NAME_NUMBER, - XmlItem.JSON_PROPERTY_NAME_INTEGER, - XmlItem.JSON_PROPERTY_NAME_BOOLEAN, - XmlItem.JSON_PROPERTY_NAME_ARRAY, - XmlItem.JSON_PROPERTY_NAME_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_STRING, - XmlItem.JSON_PROPERTY_PREFIX_NUMBER, - XmlItem.JSON_PROPERTY_PREFIX_INTEGER, - XmlItem.JSON_PROPERTY_PREFIX_BOOLEAN, - XmlItem.JSON_PROPERTY_PREFIX_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_NAMESPACE_STRING, - XmlItem.JSON_PROPERTY_NAMESPACE_NUMBER, - XmlItem.JSON_PROPERTY_NAMESPACE_INTEGER, - XmlItem.JSON_PROPERTY_NAMESPACE_BOOLEAN, - XmlItem.JSON_PROPERTY_NAMESPACE_ARRAY, - XmlItem.JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_NS_STRING, - XmlItem.JSON_PROPERTY_PREFIX_NS_NUMBER, - XmlItem.JSON_PROPERTY_PREFIX_NS_INTEGER, - XmlItem.JSON_PROPERTY_PREFIX_NS_BOOLEAN, - XmlItem.JSON_PROPERTY_PREFIX_NS_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY -}) - -public class XmlItem { - public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; - private String attributeString; - - public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; - private BigDecimal attributeNumber; - - public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; - private Integer attributeInteger; - - public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; - private Boolean attributeBoolean; - - public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; - private List wrappedArray = null; - - public static final String JSON_PROPERTY_NAME_STRING = "name_string"; - private String nameString; - - public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; - private BigDecimal nameNumber; - - public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; - private Integer nameInteger; - - public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; - private Boolean nameBoolean; - - public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; - private List nameArray = null; - - public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; - private List nameWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; - private String prefixString; - - public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; - private BigDecimal prefixNumber; - - public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; - private Integer prefixInteger; - - public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; - private Boolean prefixBoolean; - - public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; - private List prefixArray = null; - - public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; - private List prefixWrappedArray = null; - - public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; - private String namespaceString; - - public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; - private BigDecimal namespaceNumber; - - public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; - private Integer namespaceInteger; - - public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; - private Boolean namespaceBoolean; - - public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; - private List namespaceArray = null; - - public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; - private List namespaceWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; - private String prefixNsString; - - public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; - private BigDecimal prefixNsNumber; - - public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; - private Integer prefixNsInteger; - - public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; - private Boolean prefixNsBoolean; - - public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; - private List prefixNsArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; - private List prefixNsWrappedArray = null; - - - public XmlItem attributeString(String attributeString) { - - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAttributeString() { - return attributeString; - } - - - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - - public XmlItem attributeNumber(BigDecimal attributeNumber) { - - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - - public XmlItem attributeInteger(Integer attributeInteger) { - - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAttributeInteger() { - return attributeInteger; - } - - - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - - public XmlItem attributeBoolean(Boolean attributeBoolean) { - - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - - public XmlItem wrappedArray(List wrappedArray) { - - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getWrappedArray() { - return wrappedArray; - } - - - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - - public XmlItem nameString(String nameString) { - - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAME_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getNameString() { - return nameString; - } - - - public void setNameString(String nameString) { - this.nameString = nameString; - } - - - public XmlItem nameNumber(BigDecimal nameNumber) { - - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAME_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getNameNumber() { - return nameNumber; - } - - - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - - public XmlItem nameInteger(Integer nameInteger) { - - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAME_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNameInteger() { - return nameInteger; - } - - - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - - public XmlItem nameBoolean(Boolean nameBoolean) { - - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getNameBoolean() { - return nameBoolean; - } - - - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - - public XmlItem nameArray(List nameArray) { - - this.nameArray = nameArray; - return this; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNameArray() { - return nameArray; - } - - - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - - public XmlItem nameWrappedArray(List nameWrappedArray) { - - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNameWrappedArray() { - return nameWrappedArray; - } - - - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - - public XmlItem prefixString(String prefixString) { - - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPrefixString() { - return prefixString; - } - - - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - - public XmlItem prefixNumber(BigDecimal prefixNumber) { - - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - - public XmlItem prefixInteger(Integer prefixInteger) { - - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPrefixInteger() { - return prefixInteger; - } - - - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - - public XmlItem prefixBoolean(Boolean prefixBoolean) { - - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - - public XmlItem prefixArray(List prefixArray) { - - this.prefixArray = prefixArray; - return this; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixArray() { - return prefixArray; - } - - - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - - public XmlItem namespaceString(String namespaceString) { - - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getNamespaceString() { - return namespaceString; - } - - - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - - public XmlItem namespaceInteger(Integer namespaceInteger) { - - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - - public XmlItem namespaceArray(List namespaceArray) { - - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNamespaceArray() { - return namespaceArray; - } - - - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - - public XmlItem prefixNsString(String prefixNsString) { - - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPrefixNsString() { - return prefixNsString; - } - - - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - - public XmlItem prefixNsArray(List prefixNsArray) { - - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixNsArray() { - return prefixNsArray; - } - - - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 837b5ea02461..720c6161e9e6 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -3,48 +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.api; -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Client; import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.ApiException; -/** - * API tests for AnotherFakeApi - */ -@Ignore +/** API tests for AnotherFakeApi */ public class AnotherFakeApiTest { - private final AnotherFakeApi api = new AnotherFakeApi(); + private final AnotherFakeApi api = new AnotherFakeApi(); - - /** - * To test special tags - * - * To test special tags and operation ID starting with number - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void call123testSpecialTagsTest() throws ApiException { - Client body = null; - Client response = api.call123testSpecialTags(body); - // TODO: test validations - } - + /** + * To test special tags + * + *

To test special tags and operation ID starting with number + * + * @throws ApiException if the Api call fails + */ + @Test + public void call123testSpecialTagsTest() throws ApiException { + // Client client = null; + // Client response = api.call123testSpecialTags(client); + // TODO: test validations + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 000000000000..d3eccc34d99b --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,29 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.api; + +import org.junit.Test; +import org.openapitools.client.ApiException; + +/** API tests for DefaultApi */ +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + /** @throws ApiException if the Api call fails */ + @Test + public void fooGetTest() throws ApiException { + // InlineResponseDefault response = api.fooGet(); + // TODO: test validations + } +} 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 b2c8f47fb36e..6426c753cad5 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 @@ -3,289 +3,280 @@ * 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.api; -import org.openapitools.client.ApiException; -import java.math.BigDecimal; -import org.openapitools.client.model.Client; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; -import org.junit.Test; +import java.io.ByteArrayInputStream; +import java.security.PrivateKey; +import java.util.Arrays; import org.junit.Ignore; +import org.junit.Test; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.auth.HttpSignatureAuth; +import org.openapitools.client.model.Pet; +import org.tomitribe.auth.signatures.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeApi - */ -@Ignore +/** API tests for FakeApi */ public class FakeApiTest { - private final FakeApi api = new FakeApi(); + private final FakeApi api = new FakeApi(); + + /** + * Health check endpoint + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeHealthGetTest() throws ApiException { + // HealthCheckResult response = api.fakeHealthGet(); + // TODO: test validations + } + + /** + * test http signature authentication + * + * @throws Exception if the Api call fails + */ + @Ignore + @Test + public void fakeHttpSignatureTestTest() throws Exception { + + final String privateKeyPem = + "-----BEGIN RSA PRIVATE KEY-----\n" + + "MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF\n" + + "NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F\n" + + "UR45uBJeDK1HSFHD8bH KD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB\n" + + "AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA\n" + + "QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK\n" + + "kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg\n" + + "f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u\n" + + "412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc\n" + + "mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7\n" + + "kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA\n" + + "gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW\n" + + "G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI\n" + + "7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA==\n" + + "-----END RSA PRIVATE KEY-----\n"; + + PrivateKey privateKey = PEM.readPrivateKey(new ByteArrayInputStream(privateKeyPem.getBytes())); + ApiClient client = api.getApiClient(); + HttpSignatureAuth auth = (HttpSignatureAuth) client.getAuthentication("http_signature_test"); + auth.setAlgorithm(Algorithm.RSA_SHA512); + auth.setHeaders(Arrays.asList("(request-target)", "host", "date")); + auth.setup(privateKey); + + Pet pet = new Pet(); + pet.setId(10l); + pet.setName("test http signature"); + String query1 = "hello world"; + String header1 = "empty header"; + api.fakeHttpSignatureTest(pet, query1, header1); + } + + /** + * Test serialization of outer boolean types + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterBooleanSerializeTest() throws ApiException { + // Boolean body = null; + // Boolean response = api.fakeOuterBooleanSerialize(body); + // TODO: test validations + } + + /** + * Test serialization of object with outer number type + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterCompositeSerializeTest() throws ApiException { + // OuterComposite outerComposite = null; + // OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + // TODO: test validations + } + + /** + * Test serialization of outer number types + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterNumberSerializeTest() throws ApiException { + // BigDecimal body = null; + // BigDecimal response = api.fakeOuterNumberSerialize(body); + // TODO: test validations + } + + /** + * Test serialization of outer string types + * + * @throws ApiException if the Api call fails + */ + @Test + public void fakeOuterStringSerializeTest() throws ApiException { + // String body = null; + // String response = api.fakeOuterStringSerialize(body); + // TODO: test validations + } + + /** + * For this test, the body for this request much reference a schema named `File`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void testBodyWithFileSchemaTest() throws ApiException { + // FileSchemaTestClass fileSchemaTestClass = null; + // api.testBodyWithFileSchema(fileSchemaTestClass); + // TODO: test validations + } + + /** @throws ApiException if the Api call fails */ + @Test + public void testBodyWithQueryParamsTest() throws ApiException { + // String query = null; + // User user = null; + // api.testBodyWithQueryParams(query, user); + // TODO: test validations + } + + /** + * To test \"client\" model + * + *

To test \"client\" model + * + * @throws ApiException if the Api call fails + */ + @Test + public void testClientModelTest() throws ApiException { + // Client client = null; + // Client response = api.testClientModel(client); + // TODO: test validations + } + + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + *

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @throws ApiException if the Api call fails + */ + @Test + public void testEndpointParametersTest() throws ApiException { + // BigDecimal number = null; + // Double _double = null; + // String patternWithoutDelimiter = null; + // byte[] _byte = null; + // Integer integer = null; + // Integer int32 = null; + // Long int64 = null; + // Float _float = null; + // String string = null; + // File binary = null; + // LocalDate date = null; + // OffsetDateTime dateTime = null; + // String password = null; + // String paramCallback = null; + // api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, + // int64, _float, string, binary, date, dateTime, password, paramCallback); + // TODO: test validations + } + + /** + * To test enum parameters + * + *

To test enum parameters + * + * @throws ApiException if the Api call fails + */ + @Test + public void testEnumParametersTest() throws ApiException { + // List enumHeaderStringArray = null; + // String enumHeaderString = null; + // List enumQueryStringArray = null; + // String enumQueryString = null; + // Integer enumQueryInteger = null; + // Double enumQueryDouble = null; + // List enumFormStringArray = null; + // String enumFormString = null; + // api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, + // enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + // TODO: test validations + } + + /** + * Fake endpoint to test group parameters (optional) + * + *

Fake endpoint to test group parameters (optional) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testGroupParametersTest() throws ApiException { + // Integer requiredStringGroup = null; + // Boolean requiredBooleanGroup = null; + // Long requiredInt64Group = null; + // Integer stringGroup = null; + // Boolean booleanGroup = null; + // Long int64Group = null; + // api.testGroupParameters() + // .requiredStringGroup(requiredStringGroup) + // .requiredBooleanGroup(requiredBooleanGroup) + // .requiredInt64Group(requiredInt64Group) + // .stringGroup(stringGroup) + // .booleanGroup(booleanGroup) + // .int64Group(int64Group) + // .execute(); + // TODO: test validations + } + + /** + * test inline additionalProperties + * + * @throws ApiException if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() throws ApiException { + // Map requestBody = null; + // api.testInlineAdditionalProperties(requestBody); + // TODO: test validations + } + + /** + * test json serialization of form data + * + * @throws ApiException if the Api call fails + */ + @Test + public void testJsonFormDataTest() throws ApiException { + // String param = null; + // String param2 = null; + // api.testJsonFormData(param, param2); + // TODO: test validations + } - - /** - * creates an XmlItem - * - * this route creates an XmlItem - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createXmlItemTest() throws ApiException { - XmlItem xmlItem = null; - api.createXmlItem(xmlItem); - // TODO: test validations - } - - /** - * - * - * Test serialization of outer boolean types - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterBooleanSerializeTest() throws ApiException { - Boolean body = null; - Boolean response = api.fakeOuterBooleanSerialize(body); - // TODO: test validations - } - - /** - * - * - * Test serialization of object with outer number type - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite body = null; - OuterComposite response = api.fakeOuterCompositeSerialize(body); - // TODO: test validations - } - - /** - * - * - * Test serialization of outer number types - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterNumberSerializeTest() throws ApiException { - BigDecimal body = null; - BigDecimal response = api.fakeOuterNumberSerialize(body); - // TODO: test validations - } - - /** - * - * - * Test serialization of outer string types - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterStringSerializeTest() throws ApiException { - String body = null; - String response = api.fakeOuterStringSerialize(body); - // TODO: test validations - } - - /** - * - * - * For this test, the body for this request much reference a schema named `File`. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass body = null; - api.testBodyWithFileSchema(body); - // TODO: test validations - } - - /** - * - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithQueryParamsTest() throws ApiException { - String query = null; - User body = null; - api.testBodyWithQueryParams(query, body); - // TODO: test validations - } - - /** - * To test \"client\" model - * - * To test \"client\" model - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClientModelTest() throws ApiException { - Client body = null; - Client response = api.testClientModel(body); - // TODO: test validations - } - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testEndpointParametersTest() throws ApiException { - BigDecimal number = null; - Double _double = null; - String patternWithoutDelimiter = null; - byte[] _byte = null; - Integer integer = null; - Integer int32 = null; - Long int64 = null; - Float _float = null; - String string = null; - File binary = null; - LocalDate date = null; - OffsetDateTime dateTime = null; - String password = null; - String paramCallback = null; - api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - // TODO: test validations - } - - /** - * To test enum parameters - * - * To test enum parameters - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testEnumParametersTest() throws ApiException { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumQueryStringArray = null; - String enumQueryString = null; - Integer enumQueryInteger = null; - Double enumQueryDouble = null; - List enumFormStringArray = null; - String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - // TODO: test validations - } - - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testGroupParametersTest() throws ApiException { - Integer requiredStringGroup = null; - Boolean requiredBooleanGroup = null; - Long requiredInt64Group = null; - Integer stringGroup = null; - Boolean booleanGroup = null; - Long int64Group = null; - api.testGroupParameters() - .requiredStringGroup(requiredStringGroup) - .requiredBooleanGroup(requiredBooleanGroup) - .requiredInt64Group(requiredInt64Group) - .stringGroup(stringGroup) - .booleanGroup(booleanGroup) - .int64Group(int64Group) - .execute(); - // TODO: test validations - } - - /** - * test inline additionalProperties - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testInlineAdditionalPropertiesTest() throws ApiException { - Map param = null; - api.testInlineAdditionalProperties(param); - // TODO: test validations - } - - /** - * test json serialization of form data - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testJsonFormDataTest() throws ApiException { - String param = null; - String param2 = null; - api.testJsonFormData(param, param2); - // TODO: test validations - } - - /** - * - * - * To test the collection format in query parameters - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testQueryParameterCollectionFormatTest() throws ApiException { - List pipe = null; - List ioutil = null; - List http = null; - List url = null; - List context = null; - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - // TODO: test validations - } - + /** + * To test the collection format in query parameters + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + // List pipe = null; + // List ioutil = null; + // List http = null; + // List url = null; + // List context = null; + // api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + // TODO: test validations + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 71999316797a..037e053f8be3 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -3,48 +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.api; -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Client; import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.ApiException; -/** - * API tests for FakeClassnameTags123Api - */ -@Ignore +/** API tests for FakeClassnameTags123Api */ public class FakeClassnameTags123ApiTest { - private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); + private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); - - /** - * To test class name in snake case - * - * To test class name in snake case - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClassnameTest() throws ApiException { - Client body = null; - Client response = api.testClassname(body); - // TODO: test validations - } - + /** + * To test class name in snake case + * + *

To test class name in snake case + * + * @throws ApiException if the Api call fails + */ + @Test + public void testClassnameTest() throws ApiException { + // Client client = null; + // Client response = api.testClassname(client); + // TODO: test validations + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/PetApiTest.java index fd382967f1d2..3321098abd36 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -3,177 +3,143 @@ * 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.api; -import org.openapitools.client.ApiException; -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.ApiException; -/** - * API tests for PetApi - */ -@Ignore +/** API tests for PetApi */ public class PetApiTest { - private final PetApi api = new PetApi(); + private final PetApi api = new PetApi(); + + /** + * Add a new pet to the store + * + * @throws ApiException if the Api call fails + */ + @Test + public void addPetTest() throws ApiException { + // Pet pet = null; + // api.addPet(pet); + // TODO: test validations + } + + /** + * Deletes a pet + * + * @throws ApiException if the Api call fails + */ + @Test + public void deletePetTest() throws ApiException { + // Long petId = null; + // String apiKey = null; + // api.deletePet(petId, apiKey); + // TODO: test validations + } + + /** + * Finds Pets by status + * + *

Multiple status values can be provided with comma separated strings + * + * @throws ApiException if the Api call fails + */ + @Test + public void findPetsByStatusTest() throws ApiException { + // List status = null; + // List response = api.findPetsByStatus(status); + // TODO: test validations + } + + /** + * Finds Pets by tags + * + *

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for + * testing. + * + * @throws ApiException if the Api call fails + */ + @Test + public void findPetsByTagsTest() throws ApiException { + // List tags = null; + // List response = api.findPetsByTags(tags); + // TODO: test validations + } + + /** + * Find pet by ID + * + *

Returns a single pet + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPetByIdTest() throws ApiException { + // Long petId = null; + // Pet response = api.getPetById(petId); + // TODO: test validations + } + + /** + * Update an existing pet + * + * @throws ApiException if the Api call fails + */ + @Test + public void updatePetTest() throws ApiException { + // Pet pet = null; + // api.updatePet(pet); + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * @throws ApiException if the Api call fails + */ + @Test + public void updatePetWithFormTest() throws ApiException { + // Long petId = null; + // String name = null; + // String status = null; + // api.updatePetWithForm(petId, name, status); + // TODO: test validations + } + + /** + * uploads an image + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadFileTest() throws ApiException { + // Long petId = null; + // String additionalMetadata = null; + // File file = null; + // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + // TODO: test validations + } - - /** - * Add a new pet to the store - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void addPetTest() throws ApiException { - Pet body = null; - api.addPet(body); - // TODO: test validations - } - - /** - * Deletes a pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deletePetTest() throws ApiException { - Long petId = null; - String apiKey = null; - api.deletePet(petId, apiKey); - // TODO: test validations - } - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByStatusTest() throws ApiException { - List status = null; - List response = api.findPetsByStatus(status); - // TODO: test validations - } - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByTagsTest() throws ApiException { - List tags = null; - List response = api.findPetsByTags(tags); - // TODO: test validations - } - - /** - * Find pet by ID - * - * Returns a single pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getPetByIdTest() throws ApiException { - Long petId = null; - Pet response = api.getPetById(petId); - // TODO: test validations - } - - /** - * Update an existing pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetTest() throws ApiException { - Pet body = null; - api.updatePet(body); - // TODO: test validations - } - - /** - * Updates a pet in the store with form data - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetWithFormTest() throws ApiException { - Long petId = null; - String name = null; - String status = null; - api.updatePetWithForm(petId, name, status); - // TODO: test validations - } - - /** - * uploads an image - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadFileTest() throws ApiException { - Long petId = null; - String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - // TODO: test validations - } - - /** - * uploads an image (required) - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadFileWithRequiredFileTest() throws ApiException { - Long petId = null; - File requiredFile = null; - String additionalMetadata = null; - ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - // TODO: test validations - } - + /** + * uploads an image (required) + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws ApiException { + // Long petId = null; + // File requiredFile = null; + // String additionalMetadata = null; + // ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, + // additionalMetadata); + // TODO: test validations + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/StoreApiTest.java index cd36a70fece3..fb025663bf57 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -3,92 +3,75 @@ * 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.api; -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Order; import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.ApiException; -/** - * API tests for StoreApi - */ -@Ignore +/** API tests for StoreApi */ public class StoreApiTest { - private final StoreApi api = new StoreApi(); + private final StoreApi api = new StoreApi(); + + /** + * Delete purchase order by ID + * + *

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers + * will generate API errors + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrderTest() throws ApiException { + // String orderId = null; + // api.deleteOrder(orderId); + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + *

Returns a map of status codes to quantities + * + * @throws ApiException if the Api call fails + */ + @Test + public void getInventoryTest() throws ApiException { + // Map response = api.getInventory(); + // TODO: test validations + } + + /** + * Find purchase order by ID + * + *

For valid response try integer IDs with value <= 5 or > 10. Other values will + * generated exceptions + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderByIdTest() throws ApiException { + // Long orderId = null; + // Order response = api.getOrderById(orderId); + // TODO: test validations + } - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteOrderTest() throws ApiException { - String orderId = null; - api.deleteOrder(orderId); - // TODO: test validations - } - - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getInventoryTest() throws ApiException { - Map response = api.getInventory(); - // TODO: test validations - } - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getOrderByIdTest() throws ApiException { - Long orderId = null; - Order response = api.getOrderById(orderId); - // TODO: test validations - } - - /** - * Place an order for a pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void placeOrderTest() throws ApiException { - Order body = null; - Order response = api.placeOrder(body); - // TODO: test validations - } - + /** + * Place an order for a pet + * + * @throws ApiException if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + // Order order = null; + // Order response = api.placeOrder(order); + // TODO: test validations + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/UserApiTest.java index f7ef9050c955..741cb5ab8e7c 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -3,154 +3,123 @@ * 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.api; -import org.openapitools.client.ApiException; -import org.openapitools.client.model.User; import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.ApiException; -/** - * API tests for UserApi - */ -@Ignore +/** API tests for UserApi */ public class UserApiTest { - private final UserApi api = new UserApi(); + private final UserApi api = new UserApi(); + + /** + * Create user + * + *

This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserTest() throws ApiException { + // User user = null; + // api.createUser(user); + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() throws ApiException { + // List user = null; + // api.createUsersWithArrayInput(user); + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUsersWithListInputTest() throws ApiException { + // List user = null; + // api.createUsersWithListInput(user); + // TODO: test validations + } + + /** + * Delete user + * + *

This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserTest() throws ApiException { + // String username = null; + // api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * @throws ApiException if the Api call fails + */ + @Test + public void getUserByNameTest() throws ApiException { + // String username = null; + // User response = api.getUserByName(username); + // TODO: test validations + } + + /** + * Logs user into the system + * + * @throws ApiException if the Api call fails + */ + @Test + public void loginUserTest() throws ApiException { + // String username = null; + // String password = null; + // String response = api.loginUser(username, password); + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * @throws ApiException if the Api call fails + */ + @Test + public void logoutUserTest() throws ApiException { + // api.logoutUser(); + // TODO: test validations + } - - /** - * Create user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUserTest() throws ApiException { - User body = null; - api.createUser(body); - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithArrayInputTest() throws ApiException { - List body = null; - api.createUsersWithArrayInput(body); - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithListInputTest() throws ApiException { - List body = null; - api.createUsersWithListInput(body); - // TODO: test validations - } - - /** - * Delete user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteUserTest() throws ApiException { - String username = null; - api.deleteUser(username); - // TODO: test validations - } - - /** - * Get user by user name - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getUserByNameTest() throws ApiException { - String username = null; - User response = api.getUserByName(username); - // TODO: test validations - } - - /** - * Logs user into the system - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void loginUserTest() throws ApiException { - String username = null; - String password = null; - String response = api.loginUser(username, password); - // TODO: test validations - } - - /** - * Logs out current logged in user session - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void logoutUserTest() throws ApiException { - api.logoutUser(); - // TODO: test validations - } - - /** - * Updated user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateUserTest() throws ApiException { - String username = null; - User body = null; - api.updateUser(username, body); - // TODO: test validations - } - + /** + * Updated user + * + *

This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + // String username = null; + // User user = null; + // api.updateUser(username, user); + // TODO: test validations + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index ec44af783873..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index ceb024c5620b..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index 517e5a10ae43..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 2e3844ba9756..b83e07ecea18 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -3,131 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesClass - */ +/** Model tests for AdditionalPropertiesClass */ public class AdditionalPropertiesClassTest { - private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); - - /** - * Model tests for AdditionalPropertiesClass - */ - @Test - public void testAdditionalPropertiesClass() { - // TODO: test AdditionalPropertiesClass - } - - /** - * Test the property 'mapString' - */ - @Test - public void mapStringTest() { - // TODO: test mapString - } - - /** - * Test the property 'mapNumber' - */ - @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 - } - + private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); + + /** Model tests for AdditionalPropertiesClass */ + @Test + public void testAdditionalPropertiesClass() { + // TODO: test AdditionalPropertiesClass + } + + /** Test the property 'mapProperty' */ + @Test + public void mapPropertyTest() { + // TODO: test mapProperty + } + + /** Test the property 'mapOfMapProperty' */ + @Test + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index 66a7b85623e3..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java deleted file mode 100644 index 4e03485a4484..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesNumber - */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - - /** - * Model tests for AdditionalPropertiesNumber - */ - @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java deleted file mode 100644 index e0c72c586347..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesObject - */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - - /** - * Model tests for AdditionalPropertiesObject - */ - @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java deleted file mode 100644 index c84d987e7640..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesString - */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - - /** - * Model tests for AdditionalPropertiesString - */ - @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AnimalTest.java index c0d10ec5a3d8..d0e9913bfa8b 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -3,57 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -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 org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Animal - */ +/** Model tests for Animal */ public class AnimalTest { - private final Animal model = new Animal(); - - /** - * Model tests for Animal - */ - @Test - public void testAnimal() { - // TODO: test Animal - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - + private final Animal model = new Animal(); + + /** Model tests for Animal */ + @Test + public void testAnimal() { + // TODO: test Animal + } + + /** Test the property 'className' */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index e25187a3b608..28f62e428d90 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -3,50 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ArrayOfArrayOfNumberOnly - */ +/** Model tests for ArrayOfArrayOfNumberOnly */ public class ArrayOfArrayOfNumberOnlyTest { - private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfArrayOfNumberOnly - */ - @Test - public void testArrayOfArrayOfNumberOnly() { - // TODO: test ArrayOfArrayOfNumberOnly - } - - /** - * Test the property 'arrayArrayNumber' - */ - @Test - public void arrayArrayNumberTest() { - // TODO: test arrayArrayNumber - } - + private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); + + /** Model tests for ArrayOfArrayOfNumberOnly */ + @Test + public void testArrayOfArrayOfNumberOnly() { + // TODO: test ArrayOfArrayOfNumberOnly + } + + /** Test the property 'arrayArrayNumber' */ + @Test + public void arrayArrayNumberTest() { + // TODO: test arrayArrayNumber + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index ae1061823991..534bec6678e3 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -3,50 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ArrayOfNumberOnly - */ +/** Model tests for ArrayOfNumberOnly */ public class ArrayOfNumberOnlyTest { - private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfNumberOnly - */ - @Test - public void testArrayOfNumberOnly() { - // TODO: test ArrayOfNumberOnly - } - - /** - * Test the property 'arrayNumber' - */ - @Test - public void arrayNumberTest() { - // TODO: test arrayNumber - } - + private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); + + /** Model tests for ArrayOfNumberOnly */ + @Test + public void testArrayOfNumberOnly() { + // TODO: test ArrayOfNumberOnly + } + + /** Test the property 'arrayNumber' */ + @Test + public void arrayNumberTest() { + // TODO: test arrayNumber + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 36bd9951cf60..76ca006cd488 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -3,66 +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 com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ArrayTest - */ +/** Model tests for ArrayTest */ public class ArrayTestTest { - private final ArrayTest model = new ArrayTest(); - - /** - * Model tests for ArrayTest - */ - @Test - public void testArrayTest() { - // TODO: test ArrayTest - } - - /** - * Test the property 'arrayOfString' - */ - @Test - public void arrayOfStringTest() { - // TODO: test arrayOfString - } - - /** - * Test the property 'arrayArrayOfInteger' - */ - @Test - public void arrayArrayOfIntegerTest() { - // TODO: test arrayArrayOfInteger - } - - /** - * Test the property 'arrayArrayOfModel' - */ - @Test - public void arrayArrayOfModelTest() { - // TODO: test arrayArrayOfModel - } - + private final ArrayTest model = new ArrayTest(); + + /** Model tests for ArrayTest */ + @Test + public void testArrayTest() { + // TODO: test ArrayTest + } + + /** Test the property 'arrayOfString' */ + @Test + public void arrayOfStringTest() { + // TODO: test arrayOfString + } + + /** Test the property 'arrayArrayOfInteger' */ + @Test + public void arrayArrayOfIntegerTest() { + // TODO: test arrayArrayOfInteger + } + + /** Test the property 'arrayArrayOfModel' */ + @Test + public void arrayArrayOfModelTest() { + // TODO: test arrayArrayOfModel + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index a9b13011f001..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 006c80707427..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CapitalizationTest.java index a701b341fc59..dfe40524dc16 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -3,87 +3,60 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Capitalization - */ +/** Model tests for Capitalization */ public class CapitalizationTest { - private final Capitalization model = new Capitalization(); - - /** - * Model tests for Capitalization - */ - @Test - public void testCapitalization() { - // TODO: test Capitalization - } - - /** - * Test the property 'smallCamel' - */ - @Test - public void smallCamelTest() { - // TODO: test smallCamel - } - - /** - * Test the property 'capitalCamel' - */ - @Test - public void capitalCamelTest() { - // TODO: test capitalCamel - } - - /** - * Test the property 'smallSnake' - */ - @Test - public void smallSnakeTest() { - // TODO: test smallSnake - } - - /** - * Test the property 'capitalSnake' - */ - @Test - public void capitalSnakeTest() { - // TODO: test capitalSnake - } - - /** - * Test the property 'scAETHFlowPoints' - */ - @Test - public void scAETHFlowPointsTest() { - // TODO: test scAETHFlowPoints - } - - /** - * Test the property 'ATT_NAME' - */ - @Test - public void ATT_NAMETest() { - // TODO: test ATT_NAME - } - + private final Capitalization model = new Capitalization(); + + /** Model tests for Capitalization */ + @Test + public void testCapitalization() { + // TODO: test Capitalization + } + + /** Test the property 'smallCamel' */ + @Test + public void smallCamelTest() { + // TODO: test smallCamel + } + + /** Test the property 'capitalCamel' */ + @Test + public void capitalCamelTest() { + // TODO: test capitalCamel + } + + /** Test the property 'smallSnake' */ + @Test + public void smallSnakeTest() { + // TODO: test smallSnake + } + + /** Test the property 'capitalSnake' */ + @Test + public void capitalSnakeTest() { + // TODO: test capitalSnake + } + + /** Test the property 'scAETHFlowPoints' */ + @Test + public void scAETHFlowPointsTest() { + // TODO: test scAETHFlowPoints + } + + /** Test the property 'ATT_NAME' */ + @Test + public void ATT_NAMETest() { + // TODO: test ATT_NAME + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 1d85a0447253..ff21459308ce 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -3,47 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for CatAllOf - */ +/** Model tests for CatAllOf */ public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - + private final CatAllOf model = new CatAllOf(); + + /** Model tests for CatAllOf */ + @Test + public void testCatAllOf() { + // TODO: test CatAllOf + } + + /** Test the property 'declawed' */ + @Test + public void declawedTest() { + // TODO: test declawed + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatTest.java index dbf40678a2d0..5cb2d0c25be2 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CatTest.java @@ -3,65 +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 com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.CatAllOf; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Cat - */ +/** Model tests for Cat */ public class CatTest { - private final Cat model = new Cat(); - - /** - * Model tests for Cat - */ - @Test - public void testCat() { - // TODO: test Cat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - + private final Cat model = new Cat(); + + /** Model tests for Cat */ + @Test + public void testCat() { + // TODO: test Cat + } + + /** Test the property 'className' */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } + + /** Test the property 'declawed' */ + @Test + public void declawedTest() { + // TODO: test declawed + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CategoryTest.java index 6027994a2ac3..3f1a86d0d65c 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -3,55 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Category - */ +/** Model tests for Category */ public class CategoryTest { - private final Category model = new Category(); - - /** - * Model tests for Category - */ - @Test - public void testCategory() { - // TODO: test Category - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - + private final Category model = new Category(); + + /** Model tests for Category */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClassModelTest.java index 8914c9cad43d..9c42158b1796 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -3,47 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ClassModel - */ +/** Model tests for ClassModel */ public class ClassModelTest { - private final ClassModel model = new ClassModel(); - - /** - * Model tests for ClassModel - */ - @Test - public void testClassModel() { - // TODO: test ClassModel - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - + private final ClassModel model = new ClassModel(); + + /** Model tests for ClassModel */ + @Test + public void testClassModel() { + // TODO: test ClassModel + } + + /** Test the property 'propertyClass' */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClientTest.java index c21b346272d7..4fd6c7eed63a 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ClientTest.java @@ -3,47 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Client - */ +/** Model tests for Client */ public class ClientTest { - private final Client model = new Client(); - - /** - * Model tests for Client - */ - @Test - public void testClient() { - // TODO: test Client - } - - /** - * Test the property 'client' - */ - @Test - public void clientTest() { - // TODO: test client - } - + private final Client model = new Client(); + + /** Model tests for Client */ + @Test + public void testClient() { + // TODO: test Client + } + + /** Test the property 'client' */ + @Test + public void clientTest() { + // TODO: test client + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 6e4b49108098..067f41054652 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -3,47 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for DogAllOf - */ +/** Model tests for DogAllOf */ public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - + private final DogAllOf model = new DogAllOf(); + + /** Model tests for DogAllOf */ + @Test + public void testDogAllOf() { + // TODO: test DogAllOf + } + + /** Test the property 'breed' */ + @Test + public void breedTest() { + // TODO: test breed + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogTest.java index a46bc508d48c..9218b4cbe74c 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/DogTest.java @@ -3,65 +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 com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.DogAllOf; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Dog - */ +/** Model tests for Dog */ public class DogTest { - private final Dog model = new Dog(); - - /** - * Model tests for Dog - */ - @Test - public void testDog() { - // TODO: test Dog - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - + private final Dog model = new Dog(); + + /** Model tests for Dog */ + @Test + public void testDog() { + // TODO: test Dog + } + + /** Test the property 'className' */ + @Test + public void classNameTest() { + // TODO: test className + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } + + /** Test the property 'breed' */ + @Test + public void breedTest() { + // TODO: test breed + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 45b8fbbd8220..84565e8dc8d3 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -3,57 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for EnumArrays - */ +/** Model tests for EnumArrays */ public class EnumArraysTest { - private final EnumArrays model = new EnumArrays(); - - /** - * Model tests for EnumArrays - */ - @Test - public void testEnumArrays() { - // TODO: test EnumArrays - } - - /** - * Test the property 'justSymbol' - */ - @Test - public void justSymbolTest() { - // TODO: test justSymbol - } - - /** - * Test the property 'arrayEnum' - */ - @Test - public void arrayEnumTest() { - // TODO: test arrayEnum - } - + private final EnumArrays model = new EnumArrays(); + + /** Model tests for EnumArrays */ + @Test + public void testEnumArrays() { + // TODO: test EnumArrays + } + + /** Test the property 'justSymbol' */ + @Test + public void justSymbolTest() { + // TODO: test justSymbol + } + + /** Test the property 'arrayEnum' */ + @Test + public void arrayEnumTest() { + // TODO: test arrayEnum + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd2..612c74bee784 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -3,31 +3,22 @@ * 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.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for EnumClass - */ +/** Model tests for EnumClass */ public class EnumClassTest { - /** - * Model tests for EnumClass - */ - @Test - public void testEnumClass() { - // TODO: test EnumClass - } - + /** Model tests for EnumClass */ + @Test + public void testEnumClass() { + // TODO: test EnumClass + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumTestTest.java index 04e7afb19784..19a61f3331bf 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -3,80 +3,72 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for EnumTest - */ +/** Model tests for EnumTest */ public class EnumTestTest { - private final EnumTest model = new EnumTest(); + private final EnumTest model = new EnumTest(); + + /** Model tests for EnumTest */ + @Test + public void testEnumTest() { + // TODO: test EnumTest + } + + /** Test the property 'enumString' */ + @Test + public void enumStringTest() { + // TODO: test enumString + } - /** - * Model tests for EnumTest - */ - @Test - public void testEnumTest() { - // TODO: test EnumTest - } + /** Test the property 'enumStringRequired' */ + @Test + public void enumStringRequiredTest() { + // TODO: test enumStringRequired + } - /** - * Test the property 'enumString' - */ - @Test - public void enumStringTest() { - // TODO: test enumString - } + /** Test the property 'enumInteger' */ + @Test + public void enumIntegerTest() { + // TODO: test enumInteger + } - /** - * Test the property 'enumStringRequired' - */ - @Test - public void enumStringRequiredTest() { - // TODO: test enumStringRequired - } + /** Test the property 'enumNumber' */ + @Test + public void enumNumberTest() { + // TODO: test enumNumber + } - /** - * Test the property 'enumInteger' - */ - @Test - public void enumIntegerTest() { - // TODO: test enumInteger - } + /** Test the property 'outerEnum' */ + @Test + public void outerEnumTest() { + // TODO: test outerEnum + } - /** - * Test the property 'enumNumber' - */ - @Test - public void enumNumberTest() { - // TODO: test enumNumber - } + /** Test the property 'outerEnumInteger' */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } - /** - * Test the property 'outerEnum' - */ - @Test - public void outerEnumTest() { - // TODO: test outerEnum - } + /** Test the property 'outerEnumDefaultValue' */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + /** Test the property 'outerEnumIntegerDefaultValue' */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index ef37e666be39..daf85bc331fb 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -3,57 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for FileSchemaTestClass - */ +/** Model tests for FileSchemaTestClass */ public class FileSchemaTestClassTest { - private final FileSchemaTestClass model = new FileSchemaTestClass(); - - /** - * Model tests for FileSchemaTestClass - */ - @Test - public void testFileSchemaTestClass() { - // TODO: test FileSchemaTestClass - } - - /** - * Test the property 'file' - */ - @Test - public void fileTest() { - // TODO: test file - } - - /** - * Test the property 'files' - */ - @Test - public void filesTest() { - // TODO: test files - } - + private final FileSchemaTestClass model = new FileSchemaTestClass(); + + /** Model tests for FileSchemaTestClass */ + @Test + public void testFileSchemaTestClass() { + // TODO: test FileSchemaTestClass + } + + /** Test the property 'file' */ + @Test + public void fileTest() { + // TODO: test file + } + + /** Test the property 'files' */ + @Test + public void filesTest() { + // TODO: test files + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 000000000000..041cadbb3925 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for Foo */ +public class FooTest { + private final Foo model = new Foo(); + + /** Model tests for Foo */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** Test the property 'bar' */ + @Test + public void barTest() { + // TODO: test bar + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FormatTestTest.java index 710501b51bd4..0352bcb57e0a 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -3,156 +3,114 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.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.UUID; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for FormatTest - */ +/** Model tests for FormatTest */ public class FormatTestTest { - private final FormatTest model = new FormatTest(); - - /** - * Model tests for FormatTest - */ - @Test - public void testFormatTest() { - // TODO: test FormatTest - } - - /** - * Test the property 'integer' - */ - @Test - public void integerTest() { - // TODO: test integer - } - - /** - * Test the property 'int32' - */ - @Test - public void int32Test() { - // TODO: test int32 - } - - /** - * Test the property 'int64' - */ - @Test - public void int64Test() { - // TODO: test int64 - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property '_float' - */ - @Test - public void _floatTest() { - // TODO: test _float - } - - /** - * Test the property '_double' - */ - @Test - public void _doubleTest() { - // TODO: test _double - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - - /** - * Test the property '_byte' - */ - @Test - public void _byteTest() { - // TODO: test _byte - } - - /** - * Test the property 'binary' - */ - @Test - public void binaryTest() { - // TODO: test binary - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'bigDecimal' - */ - @Test - public void bigDecimalTest() { - // TODO: test bigDecimal - } - + private final FormatTest model = new FormatTest(); + + /** Model tests for FormatTest */ + @Test + public void testFormatTest() { + // TODO: test FormatTest + } + + /** Test the property 'integer' */ + @Test + public void integerTest() { + // TODO: test integer + } + + /** Test the property 'int32' */ + @Test + public void int32Test() { + // TODO: test int32 + } + + /** Test the property 'int64' */ + @Test + public void int64Test() { + // TODO: test int64 + } + + /** Test the property 'number' */ + @Test + public void numberTest() { + // TODO: test number + } + + /** Test the property '_float' */ + @Test + public void _floatTest() { + // TODO: test _float + } + + /** Test the property '_double' */ + @Test + public void _doubleTest() { + // TODO: test _double + } + + /** Test the property 'string' */ + @Test + public void stringTest() { + // TODO: test string + } + + /** Test the property '_byte' */ + @Test + public void _byteTest() { + // TODO: test _byte + } + + /** Test the property 'binary' */ + @Test + public void binaryTest() { + // TODO: test binary + } + + /** Test the property 'date' */ + @Test + public void dateTest() { + // TODO: test date + } + + /** Test the property 'dateTime' */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** Test the property 'uuid' */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'patternWithDigits' */ + @Test + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** Test the property 'patternWithDigitsAndDelimiter' */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index e902c100383b..8003b98d3feb 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -3,55 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for HasOnlyReadOnly - */ +/** Model tests for HasOnlyReadOnly */ public class HasOnlyReadOnlyTest { - private final HasOnlyReadOnly model = new HasOnlyReadOnly(); - - /** - * Model tests for HasOnlyReadOnly - */ - @Test - public void testHasOnlyReadOnly() { - // TODO: test HasOnlyReadOnly - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'foo' - */ - @Test - public void fooTest() { - // TODO: test foo - } - + private final HasOnlyReadOnly model = new HasOnlyReadOnly(); + + /** Model tests for HasOnlyReadOnly */ + @Test + public void testHasOnlyReadOnly() { + // TODO: test HasOnlyReadOnly + } + + /** Test the property 'bar' */ + @Test + public void barTest() { + // TODO: test bar + } + + /** Test the property 'foo' */ + @Test + public void fooTest() { + // TODO: test foo + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 000000000000..d95e717df8de --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for HealthCheckResult */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** Model tests for HealthCheckResult */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** Test the property 'nullableMessage' */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject1Test.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject1Test.java new file mode 100644 index 000000000000..09d84e4bc5cb --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject1Test.java @@ -0,0 +1,38 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineObject1 */ +public class InlineObject1Test { + private final InlineObject1 model = new InlineObject1(); + + /** Model tests for InlineObject1 */ + @Test + public void testInlineObject1() { + // TODO: test InlineObject1 + } + + /** Test the property 'additionalMetadata' */ + @Test + public void additionalMetadataTest() { + // TODO: test additionalMetadata + } + + /** Test the property 'file' */ + @Test + public void fileTest() { + // TODO: test file + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject2Test.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject2Test.java new file mode 100644 index 000000000000..797b297ddd49 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject2Test.java @@ -0,0 +1,38 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineObject2 */ +public class InlineObject2Test { + private final InlineObject2 model = new InlineObject2(); + + /** Model tests for InlineObject2 */ + @Test + public void testInlineObject2() { + // TODO: test InlineObject2 + } + + /** Test the property 'enumFormStringArray' */ + @Test + public void enumFormStringArrayTest() { + // TODO: test enumFormStringArray + } + + /** Test the property 'enumFormString' */ + @Test + public void enumFormStringTest() { + // TODO: test enumFormString + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject3Test.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject3Test.java new file mode 100644 index 000000000000..4e60b5d4e623 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject3Test.java @@ -0,0 +1,110 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineObject3 */ +public class InlineObject3Test { + private final InlineObject3 model = new InlineObject3(); + + /** Model tests for InlineObject3 */ + @Test + public void testInlineObject3() { + // TODO: test InlineObject3 + } + + /** Test the property 'integer' */ + @Test + public void integerTest() { + // TODO: test integer + } + + /** Test the property 'int32' */ + @Test + public void int32Test() { + // TODO: test int32 + } + + /** Test the property 'int64' */ + @Test + public void int64Test() { + // TODO: test int64 + } + + /** Test the property 'number' */ + @Test + public void numberTest() { + // TODO: test number + } + + /** Test the property '_float' */ + @Test + public void _floatTest() { + // TODO: test _float + } + + /** Test the property '_double' */ + @Test + public void _doubleTest() { + // TODO: test _double + } + + /** Test the property 'string' */ + @Test + public void stringTest() { + // TODO: test string + } + + /** Test the property 'patternWithoutDelimiter' */ + @Test + public void patternWithoutDelimiterTest() { + // TODO: test patternWithoutDelimiter + } + + /** Test the property '_byte' */ + @Test + public void _byteTest() { + // TODO: test _byte + } + + /** Test the property 'binary' */ + @Test + public void binaryTest() { + // TODO: test binary + } + + /** Test the property 'date' */ + @Test + public void dateTest() { + // TODO: test date + } + + /** Test the property 'dateTime' */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'callback' */ + @Test + public void callbackTest() { + // TODO: test callback + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject4Test.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject4Test.java new file mode 100644 index 000000000000..c03f7058e132 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject4Test.java @@ -0,0 +1,38 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineObject4 */ +public class InlineObject4Test { + private final InlineObject4 model = new InlineObject4(); + + /** Model tests for InlineObject4 */ + @Test + public void testInlineObject4() { + // TODO: test InlineObject4 + } + + /** Test the property 'param' */ + @Test + public void paramTest() { + // TODO: test param + } + + /** Test the property 'param2' */ + @Test + public void param2Test() { + // TODO: test param2 + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject5Test.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject5Test.java new file mode 100644 index 000000000000..322e6fe99b77 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObject5Test.java @@ -0,0 +1,38 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineObject5 */ +public class InlineObject5Test { + private final InlineObject5 model = new InlineObject5(); + + /** Model tests for InlineObject5 */ + @Test + public void testInlineObject5() { + // TODO: test InlineObject5 + } + + /** Test the property 'additionalMetadata' */ + @Test + public void additionalMetadataTest() { + // TODO: test additionalMetadata + } + + /** Test the property 'requiredFile' */ + @Test + public void requiredFileTest() { + // TODO: test requiredFile + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObjectTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObjectTest.java new file mode 100644 index 000000000000..7a7bff5a4d89 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineObjectTest.java @@ -0,0 +1,38 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineObject */ +public class InlineObjectTest { + private final InlineObject model = new InlineObject(); + + /** Model tests for InlineObject */ + @Test + public void testInlineObject() { + // TODO: test InlineObject + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java new file mode 100644 index 000000000000..b3e1afbb488d --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for InlineResponseDefault */ +public class InlineResponseDefaultTest { + private final InlineResponseDefault model = new InlineResponseDefault(); + + /** Model tests for InlineResponseDefault */ + @Test + public void testInlineResponseDefault() { + // TODO: test InlineResponseDefault + } + + /** Test the property 'string' */ + @Test + public void stringTest() { + // TODO: test string + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MapTestTest.java index a0c991bb7588..d13b22eb9c56 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -3,74 +3,48 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.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 org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for MapTest - */ +/** Model tests for MapTest */ public class MapTestTest { - private final MapTest model = new MapTest(); - - /** - * Model tests for MapTest - */ - @Test - public void testMapTest() { - // TODO: test MapTest - } - - /** - * Test the property 'mapMapOfString' - */ - @Test - public void mapMapOfStringTest() { - // TODO: test mapMapOfString - } - - /** - * Test the property 'mapOfEnumString' - */ - @Test - public void mapOfEnumStringTest() { - // TODO: test mapOfEnumString - } - - /** - * Test the property 'directMap' - */ - @Test - public void directMapTest() { - // TODO: test directMap - } - - /** - * Test the property 'indirectMap' - */ - @Test - public void indirectMapTest() { - // TODO: test indirectMap - } - + private final MapTest model = new MapTest(); + + /** Model tests for MapTest */ + @Test + public void testMapTest() { + // TODO: test MapTest + } + + /** Test the property 'mapMapOfString' */ + @Test + public void mapMapOfStringTest() { + // TODO: test mapMapOfString + } + + /** Test the property 'mapOfEnumString' */ + @Test + public void mapOfEnumStringTest() { + // TODO: test mapOfEnumString + } + + /** Test the property 'directMap' */ + @Test + public void directMapTest() { + // TODO: test directMap + } + + /** Test the property 'indirectMap' */ + @Test + public void indirectMapTest() { + // TODO: test indirectMap + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f8a8c734baaf..1c31132b63e4 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -3,69 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.openapitools.client.model.Animal; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ +/** Model tests for MixedPropertiesAndAdditionalPropertiesClass */ public class MixedPropertiesAndAdditionalPropertiesClassTest { - private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); - - /** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ - @Test - public void testMixedPropertiesAndAdditionalPropertiesClass() { - // TODO: test MixedPropertiesAndAdditionalPropertiesClass - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'map' - */ - @Test - public void mapTest() { - // TODO: test map - } - + private final MixedPropertiesAndAdditionalPropertiesClass model = + new MixedPropertiesAndAdditionalPropertiesClass(); + + /** Model tests for MixedPropertiesAndAdditionalPropertiesClass */ + @Test + public void testMixedPropertiesAndAdditionalPropertiesClass() { + // TODO: test MixedPropertiesAndAdditionalPropertiesClass + } + + /** Test the property 'uuid' */ + @Test + public void uuidTest() { + // TODO: test uuid + } + + /** Test the property 'dateTime' */ + @Test + public void dateTimeTest() { + // TODO: test dateTime + } + + /** Test the property 'map' */ + @Test + public void mapTest() { + // TODO: test map + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 82c7208079db..5100638e4a4e 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -3,55 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Model200Response - */ +/** Model tests for Model200Response */ public class Model200ResponseTest { - private final Model200Response model = new Model200Response(); - - /** - * Model tests for Model200Response - */ - @Test - public void testModel200Response() { - // TODO: test Model200Response - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - + private final Model200Response model = new Model200Response(); + + /** Model tests for Model200Response */ + @Test + public void testModel200Response() { + // TODO: test Model200Response + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'propertyClass' */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 97a1287aa413..73815c5cd2c9 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -3,63 +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 com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ModelApiResponse - */ +/** Model tests for ModelApiResponse */ public class ModelApiResponseTest { - private final ModelApiResponse model = new ModelApiResponse(); - - /** - * Model tests for ModelApiResponse - */ - @Test - public void testModelApiResponse() { - // TODO: test ModelApiResponse - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - + private final ModelApiResponse model = new ModelApiResponse(); + + /** Model tests for ModelApiResponse */ + @Test + public void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelReturnTest.java index f884519ebc86..7a9283f8e305 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -3,47 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ModelReturn - */ +/** Model tests for ModelReturn */ public class ModelReturnTest { - private final ModelReturn model = new ModelReturn(); - - /** - * Model tests for ModelReturn - */ - @Test - public void testModelReturn() { - // TODO: test ModelReturn - } - - /** - * Test the property '_return' - */ - @Test - public void _returnTest() { - // TODO: test _return - } - + private final ModelReturn model = new ModelReturn(); + + /** Model tests for ModelReturn */ + @Test + public void testModelReturn() { + // TODO: test ModelReturn + } + + /** Test the property '_return' */ + @Test + public void _returnTest() { + // TODO: test _return + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NameTest.java index cb3a94cf74ab..25e9e4235dfd 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NameTest.java @@ -3,71 +3,48 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Name - */ +/** Model tests for Name */ public class NameTest { - private final Name model = new Name(); - - /** - * Model tests for Name - */ - @Test - public void testName() { - // TODO: test Name - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'snakeCase' - */ - @Test - public void snakeCaseTest() { - // TODO: test snakeCase - } - - /** - * Test the property 'property' - */ - @Test - public void propertyTest() { - // TODO: test property - } - - /** - * Test the property '_123number' - */ - @Test - public void _123numberTest() { - // TODO: test _123number - } - + private final Name model = new Name(); + + /** Model tests for Name */ + @Test + public void testName() { + // TODO: test Name + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'snakeCase' */ + @Test + public void snakeCaseTest() { + // TODO: test snakeCase + } + + /** Test the property 'property' */ + @Test + public void propertyTest() { + // TODO: test property + } + + /** Test the property '_123number' */ + @Test + public void _123numberTest() { + // TODO: test _123number + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 000000000000..75bd91eb2ab5 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,98 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for NullableClass */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** Model tests for NullableClass */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** Test the property 'integerProp' */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** Test the property 'numberProp' */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** Test the property 'booleanProp' */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** Test the property 'stringProp' */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** Test the property 'dateProp' */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** Test the property 'datetimeProp' */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** Test the property 'arrayNullableProp' */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** Test the property 'arrayAndItemsNullableProp' */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** Test the property 'arrayItemsNullable' */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** Test the property 'objectNullableProp' */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** Test the property 'objectAndItemsNullableProp' */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** Test the property 'objectItemsNullable' */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index f4fbd5ee8b42..58903742494e 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -3,48 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for NumberOnly - */ +/** Model tests for NumberOnly */ public class NumberOnlyTest { - private final NumberOnly model = new NumberOnly(); - - /** - * Model tests for NumberOnly - */ - @Test - public void testNumberOnly() { - // TODO: test NumberOnly - } - - /** - * Test the property 'justNumber' - */ - @Test - public void justNumberTest() { - // TODO: test justNumber - } - + private final NumberOnly model = new NumberOnly(); + + /** Model tests for NumberOnly */ + @Test + public void testNumberOnly() { + // TODO: test NumberOnly + } + + /** Test the property 'justNumber' */ + @Test + public void justNumberTest() { + // TODO: test justNumber + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OrderTest.java index d24c8479f5d6..4ab5900bc660 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OrderTest.java @@ -3,88 +3,60 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Order - */ +/** Model tests for Order */ public class OrderTest { - private final Order model = new Order(); - - /** - * Model tests for Order - */ - @Test - public void testOrder() { - // TODO: test Order - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'petId' - */ - @Test - public void petIdTest() { - // TODO: test petId - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'shipDate' - */ - @Test - public void shipDateTest() { - // TODO: test shipDate - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'complete' - */ - @Test - public void completeTest() { - // TODO: test complete - } - + private final Order model = new Order(); + + /** Model tests for Order */ + @Test + public void testOrder() { + // TODO: test Order + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'petId' */ + @Test + public void petIdTest() { + // TODO: test petId + } + + /** Test the property 'quantity' */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** Test the property 'shipDate' */ + @Test + public void shipDateTest() { + // TODO: test shipDate + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'complete' */ + @Test + public void completeTest() { + // TODO: test complete + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index ebea3ca304c0..34a36bc70c9c 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -3,64 +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 com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for OuterComposite - */ +/** Model tests for OuterComposite */ public class OuterCompositeTest { - private final OuterComposite model = new OuterComposite(); - - /** - * Model tests for OuterComposite - */ - @Test - public void testOuterComposite() { - // TODO: test OuterComposite - } - - /** - * Test the property 'myNumber' - */ - @Test - public void myNumberTest() { - // TODO: test myNumber - } - - /** - * Test the property 'myString' - */ - @Test - public void myStringTest() { - // TODO: test myString - } - - /** - * Test the property 'myBoolean' - */ - @Test - public void myBooleanTest() { - // TODO: test myBoolean - } - + private final OuterComposite model = new OuterComposite(); + + /** Model tests for OuterComposite */ + @Test + public void testOuterComposite() { + // TODO: test OuterComposite + } + + /** Test the property 'myNumber' */ + @Test + public void myNumberTest() { + // TODO: test myNumber + } + + /** Test the property 'myString' */ + @Test + public void myStringTest() { + // TODO: test myString + } + + /** Test the property 'myBoolean' */ + @Test + public void myBooleanTest() { + // TODO: test myBoolean + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 000000000000..532de56f3744 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,24 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for OuterEnumDefaultValue */ +public class OuterEnumDefaultValueTest { + /** Model tests for OuterEnumDefaultValue */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 000000000000..d84b8439bf89 --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,24 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for OuterEnumIntegerDefaultValue */ +public class OuterEnumIntegerDefaultValueTest { + /** Model tests for OuterEnumIntegerDefaultValue */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 000000000000..fa41152d9aec --- /dev/null +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,24 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.model; + +import org.junit.Test; + +/** Model tests for OuterEnumInteger */ +public class OuterEnumIntegerTest { + /** Model tests for OuterEnumInteger */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } +} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf0..fedf75f02517 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -3,31 +3,22 @@ * 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.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for OuterEnum - */ +/** Model tests for OuterEnum */ public class OuterEnumTest { - /** - * Model tests for OuterEnum - */ - @Test - public void testOuterEnum() { - // TODO: test OuterEnum - } - + /** Model tests for OuterEnum */ + @Test + public void testOuterEnum() { + // TODO: test OuterEnum + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/PetTest.java index c3c0d4cc35dd..fb50cb4a802b 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/PetTest.java @@ -3,91 +3,60 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.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 org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Pet - */ +/** Model tests for Pet */ public class PetTest { - private final Pet model = new Pet(); - - /** - * Model tests for Pet - */ - @Test - public void testPet() { - // TODO: test Pet - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'photoUrls' - */ - @Test - public void photoUrlsTest() { - // TODO: test photoUrls - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - + private final Pet model = new Pet(); + + /** Model tests for Pet */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'category' */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'photoUrls' */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** Test the property 'tags' */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index b82a7d0ef561..f78797805ba6 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -3,55 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for ReadOnlyFirst - */ +/** Model tests for ReadOnlyFirst */ public class ReadOnlyFirstTest { - private final ReadOnlyFirst model = new ReadOnlyFirst(); - - /** - * Model tests for ReadOnlyFirst - */ - @Test - public void testReadOnlyFirst() { - // TODO: test ReadOnlyFirst - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'baz' - */ - @Test - public void bazTest() { - // TODO: test baz - } - + private final ReadOnlyFirst model = new ReadOnlyFirst(); + + /** Model tests for ReadOnlyFirst */ + @Test + public void testReadOnlyFirst() { + // TODO: test ReadOnlyFirst + } + + /** Test the property 'bar' */ + @Test + public void barTest() { + // TODO: test bar + } + + /** Test the property 'baz' */ + @Test + public void bazTest() { + // TODO: test baz + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index d5a19c371e68..d5103f58db5e 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -3,47 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for SpecialModelName - */ +/** Model tests for SpecialModelName */ public class SpecialModelNameTest { - private final SpecialModelName model = new SpecialModelName(); - - /** - * Model tests for SpecialModelName - */ - @Test - public void testSpecialModelName() { - // TODO: test SpecialModelName - } - - /** - * Test the property '$specialPropertyName' - */ - @Test - public void $specialPropertyNameTest() { - // TODO: test $specialPropertyName - } - + private final SpecialModelName model = new SpecialModelName(); + + /** Model tests for SpecialModelName */ + @Test + public void testSpecialModelName() { + // TODO: test SpecialModelName + } + + /** Test the property '$specialPropertyName' */ + @Test + public void $specialPropertyNameTest() { + // TODO: test $specialPropertyName + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TagTest.java index 5c2cc6f49e05..459a4e165d2b 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TagTest.java @@ -3,55 +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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for Tag - */ +/** Model tests for Tag */ public class TagTest { - private final Tag model = new Tag(); - - /** - * Model tests for Tag - */ - @Test - public void testTag() { - // TODO: test Tag - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - + private final Tag model = new Tag(); + + /** Model tests for Tag */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java deleted file mode 100644 index e96ac744439d..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderDefault - */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); - - /** - * Model tests for TypeHolderDefault - */ - @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index 56641d163a50..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/UserTest.java index ce40d3a2a637..44acdc6fdc4e 100644 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/UserTest.java @@ -3,103 +3,72 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; - -/** - * Model tests for User - */ +/** Model tests for User */ public class UserTest { - private final User model = new User(); - - /** - * Model tests for User - */ - @Test - public void testUser() { - // TODO: test User - } + private final User model = new User(); - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } + /** Model tests for User */ + @Test + public void testUser() { + // TODO: test User + } - /** - * Test the property 'username' - */ - @Test - public void usernameTest() { - // TODO: test username - } + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } + /** Test the property 'firstName' */ + @Test + public void firstNameTest() { + // TODO: test firstName + } - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } + /** Test the property 'lastName' */ + @Test + public void lastNameTest() { + // TODO: test lastName + } - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } - /** - * Test the property 'userStatus' - */ - @Test - public void userStatusTest() { - // TODO: test userStatus - } + /** Test the property 'phone' */ + @Test + public void phoneTest() { + // TODO: test phone + } + /** Test the property 'userStatus' */ + @Test + public void userStatusTest() { + // TODO: test userStatus + } } diff --git a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 501c414555f4..000000000000 --- a/samples/client/petstore/java/jersey2-experimental/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 8ac184e2ef72..af7148414b93 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -1194,7 +1194,8 @@ paths: responses: "200": description: The instance started successfully - security: [] + security: + - http_signature_test: [] summary: test http signature authentication tags: - fake diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md index eab45b0e2c29..e0f01098a5dc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index 20d18e8499b2..5046a502e194 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -85,10 +85,13 @@ test http signature authentication require_once(__DIR__ . '/vendor/autoload.php'); + + $apiInstance = new OpenAPI\Client\Api\FakeApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $pet = new \OpenAPI\Client\Model\Pet(); // \OpenAPI\Client\Model\Pet | Pet object that needs to be added to the store $query_1 = 'query_1_example'; // string | query parameter @@ -117,7 +120,7 @@ void (empty response body) ### Authorization -No authorization required +[http_signature_test](../../README.md#http_signature_test) ### HTTP request headers diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index cf1e1179db5f..50de8cc758fa 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -96,9 +96,73 @@ configuration = petstore_api.Configuration( host = "http://petstore.swagger.io:80/v2" ) +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP message signature: http_signature_test +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See petstore_api.signing for a list of all supported parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2", + signing_info = petstore_api.signing.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = petstore_api.signing.SCHEME_HS2019, + signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, + signed_headers = [ + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) # Enter a context with an instance of the API client -with petstore_api.ApiClient() as api_client: +with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -126,7 +190,7 @@ void (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 71be34c74bff..01f431fb4303 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -243,7 +243,7 @@ def fake_http_signature_test_with_http_info(self, pet, **kwargs): # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['http_signature_test'] # noqa: E501 return self.api_client.call_api( '/fake/http-signature-test', 'GET', diff --git a/samples/openapi3/client/petstore/ruby-faraday/docs/FakeApi.md b/samples/openapi3/client/petstore/ruby-faraday/docs/FakeApi.md index a8256c46dd4b..4552514bc792 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/ruby-faraday/docs/FakeApi.md @@ -74,6 +74,9 @@ test http signature authentication ```ruby # load the gem require 'petstore' +# setup authorization +Petstore.configure do |config| +end api_instance = Petstore::FakeApi.new pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store @@ -105,7 +108,7 @@ nil (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 26194b07ed3d..293aeaa698c6 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -121,7 +121,7 @@ def fake_http_signature_test_with_http_info(pet, opts = {}) return_type = opts[:return_type] # auth_names - auth_names = opts[:auth_names] || [] + auth_names = opts[:auth_names] || ['http_signature_test'] new_options = opts.merge( :header_params => header_params, diff --git a/samples/openapi3/client/petstore/ruby/docs/FakeApi.md b/samples/openapi3/client/petstore/ruby/docs/FakeApi.md index a8256c46dd4b..4552514bc792 100644 --- a/samples/openapi3/client/petstore/ruby/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/ruby/docs/FakeApi.md @@ -74,6 +74,9 @@ test http signature authentication ```ruby # load the gem require 'petstore' +# setup authorization +Petstore.configure do |config| +end api_instance = Petstore::FakeApi.new pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store @@ -105,7 +108,7 @@ nil (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb index 26194b07ed3d..293aeaa698c6 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -121,7 +121,7 @@ def fake_http_signature_test_with_http_info(pet, opts = {}) return_type = opts[:return_type] # auth_names - auth_names = opts[:auth_names] || [] + auth_names = opts[:auth_names] || ['http_signature_test'] new_options = opts.merge( :header_params => header_params, diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index 9d984b50904d..76b5c00f7dbf 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -80,7 +80,9 @@ public Response fakeHealthGet(@Context SecurityContext securityContext) @Path("/http-signature-test") @Consumes({ "application/json", "application/xml" }) - @io.swagger.annotations.ApiOperation(value = "test http signature authentication", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiOperation(value = "test http signature authentication", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "http_signature_test") + }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "The instance started successfully", response = Void.class) }) public Response fakeHttpSignatureTest(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @NotNull @Valid Pet pet