diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index 0ac5c6df7534..21a86a96a4a4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -5,8 +5,7 @@ import {{invokerPackage}}.ApiClient; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}}import java.util.ArrayList; -import java.util.Collections; +{{^fullJavaUtil}}import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -19,7 +18,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -117,7 +115,7 @@ public class {{classname}} { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap();{{#hasQueryParams}} + final MultiValueMap formParams = new LinkedMultiValueMap();{{#hasQueryParams}} {{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{#hasMore}} {{/hasMore}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}} @@ -131,7 +129,7 @@ public class {{classname}} { {{/hasMore}}{{/cookieParams}}{{/hasCookieParams}}{{#hasFormParams}} {{#formParams}}if ({{paramName}} != null) - formParams.{{^collectionFormat}}add{{/collectionFormat}}{{#collectionFormat}}put{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{#hasMore}} + formParams.{{^collectionFormat}}add{{/collectionFormat}}{{#collectionFormat}}addAll{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{#hasMore}} {{/hasMore}}{{/formParams}}{{/hasFormParams}} final String[] localVarAccepts = { {{#hasProduces}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 7190f95a95f9..c7e1fca9aa67 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -48,7 +48,7 @@ if(hasProperty('target') && target == 'android') { {{/java8}} {{/supportJava6}} } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -64,7 +64,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -76,12 +76,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -111,7 +111,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = '{{artifactId}}' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath @@ -123,7 +123,7 @@ ext { jackson_version = "2.10.4" jackson_databind_version = "2.10.4" jackson_databind_nullable_version = "0.2.1" - spring_web_version = "4.3.9.RELEASE" + spring_web_version = "5.2.5.RELEASE" jodatime_version = "2.9.9" junit_version = "4.13" {{#threetenbp}} @@ -135,6 +135,7 @@ dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "com.google.code.findbugs:jsr305:3.0.2" compile "org.springframework:spring-web:$spring_web_version" + compile "org.springframework:spring-context:$spring_web_version" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index f3a1f0abda9b..f95a520f5b6a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -222,7 +222,7 @@ swagger-annotations ${swagger-annotations-version} - + com.google.code.findbugs @@ -236,6 +236,11 @@ spring-web ${spring-web-version} + + org.springframework + spring-context + ${spring-web-version} + @@ -317,7 +322,7 @@ UTF-8 1.5.22 - 4.3.9.RELEASE + 5.2.5.RELEASE 2.10.4 2.10.4 0.2.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache index f38a9b8c4501..712ac17c6374 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache @@ -492,7 +492,7 @@ public class ApiClient { */ protected BodyInserter selectBody(Object obj, MultiValueMap formParams, MediaType contentType) { if(MediaType.APPLICATION_FORM_URLENCODED.equals(contentType)) { - MultiValueMap map = new LinkedMultiValueMap(); + MultiValueMap map = new LinkedMultiValueMap<>(); formParams .toSingleValueMap() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 23d62fb8c556..f5ea089d1ed6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -872,7 +872,7 @@ public class JavaClientCodegenTest { TestUtils.assertFileContains(defaultApi, //multiple files "multipartArrayWithHttpInfo(List files)", - "formParams.put(\"files\", files.stream().map(FileSystemResource::new).collect(Collectors.toList()));", + "formParams.addAll(\"files\", files.stream().map(FileSystemResource::new).collect(Collectors.toList()));", //mixed "multipartMixedWithHttpInfo(File file, MultipartMixedMarker marker)", @@ -960,7 +960,7 @@ public class JavaClientCodegenTest { //multiple files "multipartArray(java.util.Collection files)", "multipartArrayWithHttpInfo(java.util.Collection files)", - "formParams.put(\"files\", files.stream().collect(Collectors.toList()));", + "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", //mixed "multipartMixed(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index 028191b31cab..88a15a78449e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = 'petstore-resttemplate-withxml' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath @@ -99,7 +99,7 @@ ext { jackson_version = "2.10.4" jackson_databind_version = "2.10.4" jackson_databind_nullable_version = "0.2.1" - spring_web_version = "4.3.9.RELEASE" + spring_web_version = "5.2.5.RELEASE" jodatime_version = "2.9.9" junit_version = "4.13" jackson_threeten_version = "2.9.10" @@ -109,6 +109,7 @@ dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "com.google.code.findbugs:jsr305:3.0.2" compile "org.springframework:spring-web:$spring_web_version" + compile "org.springframework:spring-context:$spring_web_version" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index e1aca7d98a30..2a99b56c1bed 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -203,7 +203,7 @@ swagger-annotations ${swagger-annotations-version} - + com.google.code.findbugs @@ -217,6 +217,11 @@ spring-web ${spring-web-version} + + org.springframework + spring-context + ${spring-web-version} + @@ -275,7 +280,7 @@ UTF-8 1.5.22 - 4.3.9.RELEASE + 5.2.5.RELEASE 2.10.4 2.10.4 0.2.1 diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3e5a22fd5b17..6cd06d48e579 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -82,7 +80,7 @@ public class AnotherFakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index ecddc96ba23d..9dac72496a7b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -12,7 +12,6 @@ import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -26,7 +25,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -89,7 +87,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -131,7 +129,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -173,7 +171,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -215,7 +213,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -257,7 +255,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -303,7 +301,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -356,7 +354,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "query", query)); @@ -405,7 +403,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" @@ -496,7 +494,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (integer != null) formParams.add("integer", integer); @@ -582,7 +580,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString)); @@ -595,7 +593,7 @@ public class FakeApi { headerParams.add("enum_header_string", apiClient.parameterToString(enumHeaderString)); if (enumFormStringArray != null) - formParams.put("enum_form_string_array", enumFormStringArray); + formParams.addAll("enum_form_string_array", enumFormStringArray); if (enumFormString != null) formParams.add("enum_form_string", enumFormString); @@ -663,7 +661,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_string_group", requiredStringGroup)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_int64_group", requiredInt64Group)); @@ -717,7 +715,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -770,7 +768,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (param != null) formParams.add("param", param); @@ -849,7 +847,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "ioutil", ioutil)); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 3323ceb624d6..1aaa79e9b97c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -82,7 +80,7 @@ public class FakeClassnameTags123Api { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index c05271ceda23..6e44289f45e0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; import java.util.Set; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -21,7 +20,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -86,7 +84,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -139,7 +137,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (apiKey != null) headerParams.add("api_key", apiClient.parameterToString(apiKey)); @@ -189,7 +187,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "status", status)); @@ -242,7 +240,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags)); @@ -298,7 +296,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -350,7 +348,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -403,7 +401,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (name != null) formParams.add("name", name); @@ -462,7 +460,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) formParams.add("additionalMetadata", additionalMetadata); @@ -528,7 +526,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) formParams.add("additionalMetadata", additionalMetadata); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index 0c72eb0aaada..1f1cbc751efe 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.Order; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -86,7 +84,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -124,7 +122,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" @@ -178,7 +176,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -227,7 +225,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index cd1edb9fe6fd..35f6e6609633 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.User; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -81,7 +79,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -125,7 +123,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -169,7 +167,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -218,7 +216,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -270,7 +268,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -326,7 +324,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "password", password)); @@ -368,7 +366,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -424,7 +422,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 2953c8a0c0b1..f9ca5b113f5a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,8 +41,8 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() { - Client client = null; - Client response = api.call123testSpecialTags(client); + Client body = null; + Client response = api.call123testSpecialTags(body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java index 5d14435fc03b..f633c1fae721 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ 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 org.junit.Ignore; @@ -38,6 +39,22 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * creates an XmlItem + * + * this route creates an XmlItem + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createXmlItemTest() { + XmlItem xmlItem = null; + api.createXmlItem(xmlItem); + + // TODO: test validations + } + /** * * @@ -64,8 +81,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); // TODO: test validations } @@ -112,8 +129,8 @@ public class FakeApiTest { */ @Test public void testBodyWithFileSchemaTest() { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); + FileSchemaTestClass body = null; + api.testBodyWithFileSchema(body); // TODO: test validations } @@ -129,8 +146,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() { String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); + User body = null; + api.testBodyWithQueryParams(query, body); // TODO: test validations } @@ -145,16 +162,16 @@ public class FakeApiTest { */ @Test public void testClientModelTest() { - Client client = null; - Client response = api.testClientModel(client); + Client body = null; + Client response = api.testClientModel(body); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -234,8 +251,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); + Map param = null; + api.testInlineAdditionalProperties(param); // TODO: test validations } @@ -257,4 +274,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * To test the collection format in query parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() { + 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/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 30a4da1531ae..41c61a869e67 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,8 +41,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() { - Client client = null; - Client response = api.testClassname(client); + Client body = null; + Client response = api.testClassname(body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java index d4264eb1e9fa..4aef09fc0edb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,6 +16,7 @@ package org.openapitools.client.api; import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.junit.Test; import org.junit.Ignore; @@ -23,7 +24,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; /** * API tests for PetApi @@ -44,8 +44,8 @@ public class PetApiTest { */ @Test public void addPetTest() { - Pet pet = null; - api.addPet(pet); + Pet body = null; + api.addPet(body); // TODO: test validations } @@ -125,8 +125,8 @@ public class PetApiTest { */ @Test public void updatePetTest() { - Pet pet = null; - api.updatePet(pet); + Pet body = null; + api.updatePet(body); // TODO: test validations } @@ -167,4 +167,22 @@ public class PetApiTest { // TODO: test validations } + /** + * uploads an image (required) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() { + 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/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java index 940246facc19..b448f30ede31 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -88,8 +88,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() { - Order order = null; - Order response = api.placeOrder(order); + Order body = null; + Order response = api.placeOrder(body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java index fa2aa3d688db..ce205e18b92d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,8 +41,8 @@ public class UserApiTest { */ @Test public void createUserTest() { - User user = null; - api.createUser(user); + User body = null; + api.createUser(body); // TODO: test validations } @@ -57,8 +57,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() { - List user = null; - api.createUsersWithArrayInput(user); + List body = null; + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -73,8 +73,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() { - List user = null; - api.createUsersWithListInput(user); + List body = null; + api.createUsersWithListInput(body); // TODO: test validations } @@ -154,8 +154,8 @@ public class UserApiTest { @Test public void updateUserTest() { String username = null; - User user = null; - api.updateUser(username, user); + User body = null; + api.updateUser(username, body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 2b0bd0bbaefe..ec44af783873 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index c6dd88eea82c..ceb024c5620b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index 9d474c0dd801..517e5a10ae43 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index c6bcc988bf94..2e3844ba9756 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,13 @@ 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; @@ -41,19 +43,91 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapProperty' + * Test the property 'mapString' */ @Test - public void mapPropertyTest() { - // TODO: test mapProperty + public void mapStringTest() { + // TODO: test mapString } /** - * Test the property 'mapOfMapProperty' + * Test the property 'mapNumber' */ @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty + 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 } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index bf1b1c427b64..66a7b85623e3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index b9cb6470e38d..4e03485a4484 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3cbcb8ec3b0f..e0c72c586347 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 1d3c05075eaa..c84d987e7640 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java index beb02882b30e..7e79e5ca7b3f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -20,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.BigCat; +import org.openapitools.client.model.Cat; +import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index ae7970522b15..e25187a3b608 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 6151b7068b75..ae1061823991 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 4bb62b6569ae..36bd9951cf60 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java index 006c80707427..b3afa31d2894 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -16,6 +16,8 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java index eae9be7938c9..a701b341fc59 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 69b226745d79..1d85a0447253 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java index dcb9f2d4cae6..d0952b501004 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,17 @@ 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.openapitools.client.model.Animal; +import org.openapitools.client.model.BigCat; +import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java index 1df27cf03202..6027994a2ac3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java index 04eb02f835e2..8914c9cad43d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java index 03b6bb41a529..c21b346272d7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 1b83dcefc4f5..6e4b49108098 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java index 06ac28f804ad..3446815a300a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,16 @@ 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.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 11b5f01985fe..45b8fbbd8220 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java index cb51ca50c958..9e45543facd2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java index 13122a0cb978..04e7afb19784 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a6b0d8ff7b05..ef37e666be39 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java index 6081209ef19f..710501b51bd4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -146,4 +147,12 @@ public class FormatTestTest { // TODO: test password } + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index 2c4b2470b983..e902c100383b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java index 0f08d8c88f07..a0c991bb7588 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index c308aec0a94d..f8a8c734baaf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 1ad55ca32ea6..82c7208079db 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 73d28676aeae..97a1287aa413 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b073fda00140..f884519ebc86 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java index e81ebc38e652..cb3a94cf74ab 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 565c8bd0627e..f4fbd5ee8b42 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java index c2d3025a2643..d24c8479f5d6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 49b656a93faf..ebea3ca304c0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 61154c6d8818..cf0ebae0faf0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java index bf6908e4a455..4065f7ca1a46 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,13 +13,16 @@ 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.LinkedHashSet; import java.util.List; +import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import org.junit.Assert; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index e48b31a39fda..b82a7d0ef561 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 1696eee82dad..d5a19c371e68 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java index b37aca5fdfc8..5c2cc6f49e05 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 409076e80a3a..e96ac744439d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index ffd8f3ddc33e..56641d163a50 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -56,6 +57,14 @@ public class TypeHolderExampleTest { // TODO: test numberItem } + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + /** * Test the property 'integerItem' */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java index 76733c9e72f2..ce40d3a2a637 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java index 55e75391e00e..501c414555f4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -225,51 +226,51 @@ public class XmlItemTest { } /** - * Test the property 'prefixNamespaceString' + * Test the property 'prefixNsString' */ @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString + public void prefixNsStringTest() { + // TODO: test prefixNsString } /** - * Test the property 'prefixNamespaceNumber' + * Test the property 'prefixNsNumber' */ @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber + public void prefixNsNumberTest() { + // TODO: test prefixNsNumber } /** - * Test the property 'prefixNamespaceInteger' + * Test the property 'prefixNsInteger' */ @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger + public void prefixNsIntegerTest() { + // TODO: test prefixNsInteger } /** - * Test the property 'prefixNamespaceBoolean' + * Test the property 'prefixNsBoolean' */ @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean + public void prefixNsBooleanTest() { + // TODO: test prefixNsBoolean } /** - * Test the property 'prefixNamespaceArray' + * Test the property 'prefixNsArray' */ @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray + public void prefixNsArrayTest() { + // TODO: test prefixNsArray } /** - * Test the property 'prefixNamespaceWrappedArray' + * Test the property 'prefixNsWrappedArray' */ @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray + public void prefixNsWrappedArrayTest() { + // TODO: test prefixNsWrappedArray } } diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 8ed094a0d65a..51ae4b799b58 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = 'petstore-resttemplate' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath @@ -99,7 +99,7 @@ ext { jackson_version = "2.10.4" jackson_databind_version = "2.10.4" jackson_databind_nullable_version = "0.2.1" - spring_web_version = "4.3.9.RELEASE" + spring_web_version = "5.2.5.RELEASE" jodatime_version = "2.9.9" junit_version = "4.13" jackson_threeten_version = "2.9.10" @@ -109,6 +109,7 @@ dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "com.google.code.findbugs:jsr305:3.0.2" compile "org.springframework:spring-web:$spring_web_version" + compile "org.springframework:spring-context:$spring_web_version" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 964370d0b70a..309871f1160b 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -203,7 +203,7 @@ swagger-annotations ${swagger-annotations-version} - + com.google.code.findbugs @@ -217,6 +217,11 @@ spring-web ${spring-web-version} + + org.springframework + spring-context + ${spring-web-version} + @@ -267,7 +272,7 @@ UTF-8 1.5.22 - 4.3.9.RELEASE + 5.2.5.RELEASE 2.10.4 2.10.4 0.2.1 diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3e5a22fd5b17..6cd06d48e579 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -82,7 +80,7 @@ public class AnotherFakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index ecddc96ba23d..9dac72496a7b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -12,7 +12,6 @@ import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -26,7 +25,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -89,7 +87,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -131,7 +129,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -173,7 +171,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -215,7 +213,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -257,7 +255,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "*/*" @@ -303,7 +301,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -356,7 +354,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "query", query)); @@ -405,7 +403,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" @@ -496,7 +494,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (integer != null) formParams.add("integer", integer); @@ -582,7 +580,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString)); @@ -595,7 +593,7 @@ public class FakeApi { headerParams.add("enum_header_string", apiClient.parameterToString(enumHeaderString)); if (enumFormStringArray != null) - formParams.put("enum_form_string_array", enumFormStringArray); + formParams.addAll("enum_form_string_array", enumFormStringArray); if (enumFormString != null) formParams.add("enum_form_string", enumFormString); @@ -663,7 +661,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_string_group", requiredStringGroup)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_int64_group", requiredInt64Group)); @@ -717,7 +715,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -770,7 +768,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (param != null) formParams.add("param", param); @@ -849,7 +847,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "ioutil", ioutil)); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 3323ceb624d6..1aaa79e9b97c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -82,7 +80,7 @@ public class FakeClassnameTags123Api { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index c05271ceda23..6e44289f45e0 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -7,7 +7,6 @@ import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; import java.util.Set; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -21,7 +20,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -86,7 +84,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -139,7 +137,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (apiKey != null) headerParams.add("api_key", apiClient.parameterToString(apiKey)); @@ -189,7 +187,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "status", status)); @@ -242,7 +240,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags)); @@ -298,7 +296,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -350,7 +348,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -403,7 +401,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (name != null) formParams.add("name", name); @@ -462,7 +460,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) formParams.add("additionalMetadata", additionalMetadata); @@ -528,7 +526,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) formParams.add("additionalMetadata", additionalMetadata); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index 0c72eb0aaada..1f1cbc751efe 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.Order; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -86,7 +84,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -124,7 +122,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" @@ -178,7 +176,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -227,7 +225,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index cd1edb9fe6fd..35f6e6609633 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.model.User; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -18,7 +17,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestClientException; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.util.UriComponentsBuilder; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; @@ -81,7 +79,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -125,7 +123,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -169,7 +167,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -218,7 +216,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -270,7 +268,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -326,7 +324,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "password", password)); @@ -368,7 +366,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -424,7 +422,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); - final MultiValueMap formParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java deleted file mode 100644 index 62068d754ea1..000000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java +++ /dev/null @@ -1,253 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -import org.junit.*; -import org.springframework.http.MediaType; -import org.springframework.util.MultiValueMap; - -import static org.junit.Assert.*; - - -public class ApiClientTest { - ApiClient apiClient = null; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - /** - * - */ - @Test - public void testParseAndFormatDate() { - // default date format - String dateStr = "2015-11-07T03:49:09.356Z"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00"))); - - // custom date format: without milli-seconds, custom time zone - DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT); - format.setTimeZone(TimeZone.getTimeZone("GMT+10")); - apiClient.setDateFormat(format); - dateStr = "2015-11-07T13:49:09+10:00"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00"))); - } - - @Test - public void testIsJsonMime() { - assertFalse(apiClient.isJsonMime((String) null)); - assertFalse(apiClient.isJsonMime("")); - assertFalse(apiClient.isJsonMime("text/plain")); - assertFalse(apiClient.isJsonMime("application/xml")); - assertFalse(apiClient.isJsonMime("application/jsonp")); - assertFalse(apiClient.isJsonMime("example/json")); - assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); - assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); - - assertTrue(apiClient.isJsonMime("application/json")); - assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); - assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); - - assertTrue(apiClient.isJsonMime("application/problem+json")); - assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); - assertTrue(apiClient.isJsonMime("application/json\t")); - assertTrue(apiClient.isJsonMime("example/foo+bar+json")); - assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); - assertTrue(apiClient.isJsonMime("example/foo+json\t;")); - assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); - } - - @Test - public void testSelectHeaderAccept() { - String[] accepts = {"application/json", "application/xml"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("application/json")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("APPLICATION/JSON")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("application/json; charset=UTF8")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"text/plain", "application/xml"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("text/plain"),MediaType.parseMediaType("application/xml")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{}; - assertNull(apiClient.selectHeaderAccept(accepts)); - } - - @Test - public void testSelectHeaderContentType() { - String[] contentTypes = {"application/json", "application/xml"}; - assertEquals(MediaType.parseMediaType("application/json"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; - assertEquals(MediaType.parseMediaType("APPLICATION/JSON"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals(MediaType.parseMediaType("application/json; charset=UTF8"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"text/plain", "application/xml"}; - assertEquals(MediaType.parseMediaType("text/plain"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{}; - assertEquals(MediaType.parseMediaType("application/json"), apiClient.selectHeaderContentType(contentTypes)); - } - - @Test - public void testGetAuthentications() { - Map auths = apiClient.getAuthentications(); - - Authentication auth = auths.get("api_key"); - assertNotNull(auth); - assertTrue(auth instanceof ApiKeyAuth); - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; - assertEquals("header", apiKeyAuth.getLocation()); - assertEquals("api_key", apiKeyAuth.getParamName()); - - auth = auths.get("petstore_auth"); - assertTrue(auth instanceof OAuth); - assertSame(auth, apiClient.getAuthentication("petstore_auth")); - - assertNull(auths.get("unknown")); - - try { - auths.put("my_auth", new HttpBasicAuth()); - fail("the authentications returned should not be modifiable"); - } catch (UnsupportedOperationException e) { - } - } - - @Test - public void testSetUsernameAndPassword() { - HttpBasicAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof HttpBasicAuth) { - auth = (HttpBasicAuth) _auth; - break; - } - } - auth.setUsername(null); - auth.setPassword(null); - - apiClient.setUsername("my-username"); - apiClient.setPassword("my-password"); - assertEquals("my-username", auth.getUsername()); - assertEquals("my-password", auth.getPassword()); - - // reset values - auth.setUsername(null); - auth.setPassword(null); - } - - @Test - public void testSetApiKeyAndPrefix() { - ApiKeyAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof ApiKeyAuth) { - auth = (ApiKeyAuth) _auth; - break; - } - } - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - - apiClient.setApiKey("my-api-key"); - apiClient.setApiKeyPrefix("Token"); - assertEquals("my-api-key", auth.getApiKey()); - assertEquals("Token", auth.getApiKeyPrefix()); - - // reset values - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - } - - @Test - public void testParameterToMultiValueMapWhenNameIsInvalid() throws Exception { - MultiValueMap pairs_a = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, null, new Integer(1)); - MultiValueMap pairs_b = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "", new Integer(1)); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToMultiValueMapWhenValueIsNull() throws Exception { - MultiValueMap pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToMultiValueMapWhenValueIsEmptyStrings() throws Exception { - - // single empty string - MultiValueMap pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", " "); - assertEquals(1, pairs.size()); - - // list of empty strings - List strs = new ArrayList(); - strs.add(" "); - strs.add(" "); - strs.add(" "); - - MultiValueMap concatStrings = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", strs); - - assertEquals(1, concatStrings.get("param-a").size()); - assertFalse(concatStrings.get("param-a").isEmpty()); // should contain some delimiters - } - - @Test - public void testParameterToMultiValueMapWhenValueIsNotCollection() throws Exception { - String name = "param-a"; - Integer value = 1; - - MultiValueMap pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, name, value); - - assertEquals(1, pairs.get(name).size()); - assertEquals(value, Integer.valueOf(pairs.get(name).get(0))); - } - - @Test - public void testParameterToMultiValueMapWhenValueIsCollection() throws Exception { - Map collectionFormatMap = new HashMap(); - collectionFormatMap.put(ApiClient.CollectionFormat.CSV, ","); - collectionFormatMap.put(ApiClient.CollectionFormat.TSV, "\t"); - collectionFormatMap.put(ApiClient.CollectionFormat.SSV, " "); - collectionFormatMap.put(ApiClient.CollectionFormat.PIPES, "\\|"); - collectionFormatMap.put(null, ","); // no format, must default to csv - - String name = "param-a"; - - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - // check for multi separately - MultiValueMap multiValueMap = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.MULTI, name, values); - assertEquals(values.size(), multiValueMap.get(name).size()); - - // all other formats - for (ApiClient.CollectionFormat collectionFormat : collectionFormatMap.keySet()) { - MultiValueMap pairs = apiClient.parameterToMultiValueMap(collectionFormat, name, values); - - assertEquals(1, pairs.size()); - - String delimiter = collectionFormatMap.get(collectionFormat); - String[] pairValueSplit = pairs.get(name).get(0).split(delimiter); - - assertEquals(values.size(), pairValueSplit.length); - } - } -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 2953c8a0c0b1..f9ca5b113f5a 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,8 +41,8 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() { - Client client = null; - Client response = api.call123testSpecialTags(client); + Client body = null; + Client response = api.call123testSpecialTags(body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java index 5d14435fc03b..f633c1fae721 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,6 +21,7 @@ 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 org.junit.Ignore; @@ -38,6 +39,22 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * creates an XmlItem + * + * this route creates an XmlItem + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createXmlItemTest() { + XmlItem xmlItem = null; + api.createXmlItem(xmlItem); + + // TODO: test validations + } + /** * * @@ -64,8 +81,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); // TODO: test validations } @@ -112,8 +129,8 @@ public class FakeApiTest { */ @Test public void testBodyWithFileSchemaTest() { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); + FileSchemaTestClass body = null; + api.testBodyWithFileSchema(body); // TODO: test validations } @@ -129,8 +146,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() { String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); + User body = null; + api.testBodyWithQueryParams(query, body); // TODO: test validations } @@ -145,16 +162,16 @@ public class FakeApiTest { */ @Test public void testClientModelTest() { - Client client = null; - Client response = api.testClientModel(client); + Client body = null; + Client response = api.testClientModel(body); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -234,8 +251,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); + Map param = null; + api.testInlineAdditionalProperties(param); // TODO: test validations } @@ -257,4 +274,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * To test the collection format in query parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() { + 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/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 30a4da1531ae..41c61a869e67 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,8 +41,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() { - Client client = null; - Client response = api.testClassname(client); + Client body = null; + Client response = api.testClassname(body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java index d4264eb1e9fa..4aef09fc0edb 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,6 +16,7 @@ package org.openapitools.client.api; import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.junit.Test; import org.junit.Ignore; @@ -23,7 +24,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; /** * API tests for PetApi @@ -44,8 +44,8 @@ public class PetApiTest { */ @Test public void addPetTest() { - Pet pet = null; - api.addPet(pet); + Pet body = null; + api.addPet(body); // TODO: test validations } @@ -125,8 +125,8 @@ public class PetApiTest { */ @Test public void updatePetTest() { - Pet pet = null; - api.updatePet(pet); + Pet body = null; + api.updatePet(body); // TODO: test validations } @@ -167,4 +167,22 @@ public class PetApiTest { // TODO: test validations } + /** + * uploads an image (required) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() { + 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/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java index 940246facc19..b448f30ede31 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -88,8 +88,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() { - Order order = null; - Order response = api.placeOrder(order); + Order body = null; + Order response = api.placeOrder(body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java index fa2aa3d688db..ce205e18b92d 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,8 +41,8 @@ public class UserApiTest { */ @Test public void createUserTest() { - User user = null; - api.createUser(user); + User body = null; + api.createUser(body); // TODO: test validations } @@ -57,8 +57,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() { - List user = null; - api.createUsersWithArrayInput(user); + List body = null; + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -73,8 +73,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() { - List user = null; - api.createUsersWithListInput(user); + List body = null; + api.createUsersWithListInput(body); // TODO: test validations } @@ -154,8 +154,8 @@ public class UserApiTest { @Test public void updateUserTest() { String username = null; - User user = null; - api.updateUser(username, user); + User body = null; + api.updateUser(username, body); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java deleted file mode 100644 index 2a21136cfe0c..000000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.junit.*; -import org.springframework.http.HttpHeaders; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - -import static org.junit.Assert.*; - -public class ApiKeyAuthTest { - @Test - public void testApplyToParamsInQuery() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - assertEquals(1, queryParams.size()); - assertEquals("my-api-key", queryParams.get("api_key").get(0)); - - // no changes to header or cookie parameters - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInHeaderWithPrefix() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN").get(0)); - } - - @Test - public void testApplyToParamsInCookieWithPrefix() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - assertEquals(1, cookieParams.size()); - assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN").get(0)); - } -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java deleted file mode 100644 index 79eec957fcbc..000000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.junit.*; -import org.springframework.http.HttpHeaders; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - -import static org.junit.Assert.*; - -public class HttpBasicAuthTest { - HttpBasicAuth auth = null; - - @Before - public void setup() { - auth = new HttpBasicAuth(); - } - - @Test - public void testApplyToParams() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - auth.setUsername("my-username"); - auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix - String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; - assertEquals(expected, headerParams.get("Authorization").get(0)); - - // null username should be treated as empty string - auth.setUsername(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of ":my-password" with the "Basic " prefix - expected = "Basic Om15LXBhc3N3b3Jk"; - assertEquals(expected, headerParams.get("Authorization").get(1)); - - // null password should be treated as empty string - auth.setUsername("my-username"); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of "my-username:" with the "Basic " prefix - expected = "Basic bXktdXNlcm5hbWU6"; - assertEquals(expected, headerParams.get("Authorization").get(2)); - } -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 2b0bd0bbaefe..ec44af783873 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index c6dd88eea82c..ceb024c5620b 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index 9d474c0dd801..517e5a10ae43 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index c6bcc988bf94..2e3844ba9756 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,13 @@ 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; @@ -41,19 +43,91 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapProperty' + * Test the property 'mapString' */ @Test - public void mapPropertyTest() { - // TODO: test mapProperty + public void mapStringTest() { + // TODO: test mapString } /** - * Test the property 'mapOfMapProperty' + * Test the property 'mapNumber' */ @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty + 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 } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index bf1b1c427b64..66a7b85623e3 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index b9cb6470e38d..4e03485a4484 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3cbcb8ec3b0f..e0c72c586347 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 1d3c05075eaa..c84d987e7640 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java index beb02882b30e..7e79e5ca7b3f 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -20,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.openapitools.client.model.BigCat; +import org.openapitools.client.model.Cat; +import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index ae7970522b15..e25187a3b608 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 6151b7068b75..ae1061823991 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 4bb62b6569ae..36bd9951cf60 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java index 006c80707427..b3afa31d2894 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -16,6 +16,8 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java index eae9be7938c9..a701b341fc59 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 69b226745d79..1d85a0447253 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java index dcb9f2d4cae6..d0952b501004 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,17 @@ 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.openapitools.client.model.Animal; +import org.openapitools.client.model.BigCat; +import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java index 1df27cf03202..6027994a2ac3 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java index 04eb02f835e2..8914c9cad43d 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java index 03b6bb41a529..c21b346272d7 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 1b83dcefc4f5..6e4b49108098 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java index 06ac28f804ad..3446815a300a 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,16 @@ 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.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 11b5f01985fe..45b8fbbd8220 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java index cb51ca50c958..9e45543facd2 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java index 13122a0cb978..04e7afb19784 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumValueTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumValueTest.java deleted file mode 100644 index 47bfe940d3c3..000000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumValueTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.fasterxml.jackson.databind.SerializationFeature; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - try { - // test serialization (object => json) - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - ObjectWriter ow = mapper.writer(); - String json = ow.writeValueAsString(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}"); - - // test deserialization (json => object) - EnumTest fromString = mapper.readValue(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - - } catch (Exception e) { - fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage()); - } - } -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a6b0d8ff7b05..ef37e666be39 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java index 6081209ef19f..710501b51bd4 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -146,4 +147,12 @@ public class FormatTestTest { // TODO: test password } + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index 2c4b2470b983..e902c100383b 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java index 0f08d8c88f07..a0c991bb7588 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index c308aec0a94d..f8a8c734baaf 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 1ad55ca32ea6..82c7208079db 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 73d28676aeae..97a1287aa413 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b073fda00140..f884519ebc86 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java index e81ebc38e652..cb3a94cf74ab 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 565c8bd0627e..f4fbd5ee8b42 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java index c2d3025a2643..d24c8479f5d6 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 49b656a93faf..ebea3ca304c0 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 61154c6d8818..cf0ebae0faf0 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java index bf6908e4a455..4065f7ca1a46 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,13 +13,16 @@ 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.LinkedHashSet; import java.util.List; +import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import org.junit.Assert; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index e48b31a39fda..b82a7d0ef561 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 1696eee82dad..d5a19c371e68 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java index b37aca5fdfc8..5c2cc6f49e05 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 409076e80a3a..e96ac744439d 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index ffd8f3ddc33e..56641d163a50 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -56,6 +57,14 @@ public class TypeHolderExampleTest { // TODO: test numberItem } + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + /** * Test the property 'integerItem' */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java index 76733c9e72f2..ce40d3a2a637 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java index 55e75391e00e..501c414555f4 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -2,7 +2,7 @@ * 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: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ 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; @@ -225,51 +226,51 @@ public class XmlItemTest { } /** - * Test the property 'prefixNamespaceString' + * Test the property 'prefixNsString' */ @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString + public void prefixNsStringTest() { + // TODO: test prefixNsString } /** - * Test the property 'prefixNamespaceNumber' + * Test the property 'prefixNsNumber' */ @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber + public void prefixNsNumberTest() { + // TODO: test prefixNsNumber } /** - * Test the property 'prefixNamespaceInteger' + * Test the property 'prefixNsInteger' */ @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger + public void prefixNsIntegerTest() { + // TODO: test prefixNsInteger } /** - * Test the property 'prefixNamespaceBoolean' + * Test the property 'prefixNsBoolean' */ @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean + public void prefixNsBooleanTest() { + // TODO: test prefixNsBoolean } /** - * Test the property 'prefixNamespaceArray' + * Test the property 'prefixNsArray' */ @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray + public void prefixNsArrayTest() { + // TODO: test prefixNsArray } /** - * Test the property 'prefixNamespaceWrappedArray' + * Test the property 'prefixNsWrappedArray' */ @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray + public void prefixNsWrappedArrayTest() { + // TODO: test prefixNsWrappedArray } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java index a69349fef846..0769fb81d3eb 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java @@ -488,7 +488,7 @@ public class ApiClient { */ protected BodyInserter selectBody(Object obj, MultiValueMap formParams, MediaType contentType) { if(MediaType.APPLICATION_FORM_URLENCODED.equals(contentType)) { - MultiValueMap map = new LinkedMultiValueMap(); + MultiValueMap map = new LinkedMultiValueMap<>(); formParams .toSingleValueMap()