diff --git a/samples/client/echo_api/java/restclient/.openapi-generator/FILES b/samples/client/echo_api/java/restclient/.openapi-generator/FILES index 045decee44eeb..0ca8c0874363c 100644 --- a/samples/client/echo_api/java/restclient/.openapi-generator/FILES +++ b/samples/client/echo_api/java/restclient/.openapi-generator/FILES @@ -60,3 +60,21 @@ src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/TestFormObjectMultipartRequestMarker.java src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java +src/test/java/org/openapitools/client/api/AuthApiTest.java +src/test/java/org/openapitools/client/api/BodyApiTest.java +src/test/java/org/openapitools/client/api/FormApiTest.java +src/test/java/org/openapitools/client/api/HeaderApiTest.java +src/test/java/org/openapitools/client/api/PathApiTest.java +src/test/java/org/openapitools/client/api/QueryApiTest.java +src/test/java/org/openapitools/client/model/BirdTest.java +src/test/java/org/openapitools/client/model/CategoryTest.java +src/test/java/org/openapitools/client/model/DataQueryTest.java +src/test/java/org/openapitools/client/model/DefaultValueTest.java +src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java +src/test/java/org/openapitools/client/model/PetTest.java +src/test/java/org/openapitools/client/model/QueryTest.java +src/test/java/org/openapitools/client/model/StringEnumRefTest.java +src/test/java/org/openapitools/client/model/TagTest.java +src/test/java/org/openapitools/client/model/TestFormObjectMultipartRequestMarkerTest.java +src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java +src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java diff --git a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/AuthApiTest.java b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/AuthApiTest.java index e258cc91dbd1f..3d8b19258ce0e 100644 --- a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/AuthApiTest.java +++ b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/AuthApiTest.java @@ -13,50 +13,46 @@ package org.openapitools.client.api; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.MatcherAssert.assertThat; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -import org.junit.Test; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * API tests for AuthApi */ +@Disabled public class AuthApiTest { private final AuthApi api = new AuthApi(); + /** * To test HTTP basic authentication * - *

To test HTTP basic authentication + * To test HTTP basic authentication */ @Test - public void testAuthHttpBasicTest() { - // given - api.getApiClient().setUsername("test_user"); - api.getApiClient().setPassword("test_password"); - - // when + public void testAuthHttpBasicTest() { String response = api.testAuthHttpBasic(); - assertThat( - response, - containsString("Authorization: Basic dGVzdF91c2VyOnRlc3RfcGFzc3dvcmQ=")); + // TODO: test validations } - + /** * To test HTTP bearer authentication * - *

To test HTTP bearer authentication + * To test HTTP bearer authentication */ @Test - public void testAuthHttpBearerTest() { - // given - api.getApiClient().setBearerToken("test_token"); - - // when + public void testAuthHttpBearerTest() { String response = api.testAuthHttpBearer(); - assertThat(response, containsString("Authorization: Bearer test_token")); + // TODO: test validations } + } \ No newline at end of file diff --git a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/BodyApiTest.java b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/BodyApiTest.java index 42145cd9d3b2e..4c26e99503813 100644 --- a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/BodyApiTest.java +++ b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/BodyApiTest.java @@ -10,278 +10,158 @@ * Do not edit the class manually. */ -package org.openapitools.client.api; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.MatcherAssert.assertThat; +package org.openapitools.client.api; import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Test; -import org.openapitools.client.ApiClient; -import org.openapitools.client.GifHttpMessageConverter; -import org.openapitools.client.OctetStreamHttpMessageConverter; -import org.openapitools.client.model.Category; import org.openapitools.client.model.Pet; -import org.openapitools.client.model.Pet.StatusEnum; import org.openapitools.client.model.StringEnumRef; import org.openapitools.client.model.Tag; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -/** API tests for BodyApi */ -public class BodyApiTest { - - private final BodyApi api = new BodyApi(); - - /** - * Test binary (gif) response body - * - *

Test binary (gif) response body - */ - @Test - public void testBinaryGifTest() throws IOException { - // given - var restClient = - ApiClient.buildRestClientBuilder() - .messageConverters(converters -> converters.add(new GifHttpMessageConverter())) - .build(); - api.setApiClient(new ApiClient(restClient)); - - // when - File response = api.testBinaryGif(); - - // then - assertThat(response, notNullValue()); - assertThat(response.exists(), is(true)); - assertThat(Files.probeContentType(response.toPath()), is("image/gif")); - } - - /** - * Test body parameter(s) - * - *

Test body parameter(s) - */ - @Test - public void testBodyApplicationOctetstreamBinaryTest() throws IOException { - // given - var restClient = - ApiClient.buildRestClientBuilder() - .messageConverters(converters -> converters.add(new OctetStreamHttpMessageConverter())) - .build(); - api.setApiClient(new ApiClient(restClient)); - - var tempFile = Files.createTempFile("test", ".txt"); - Files.writeString(tempFile, "test123"); - - File body = tempFile.toFile(); - - // when - String response = api.testBodyApplicationOctetstreamBinary(body); - - // then - assertThat(response, containsString("Content-Type: application/octet-stream")); - assertThat(response, containsString("test123")); - } - - /** - * Test array of binary in multipart mime - * - *

Test array of binary in multipart mime - */ - @Test - public void testBodyMultipartFormdataArrayOfBinaryTest() throws IOException { - // given - var firstFile = Files.createTempFile("test", ".txt"); - String firstFileContent = "Thanks for using OpenAPI generator :)"; - Files.writeString(firstFile, firstFileContent); - - var secondFile = Files.createTempFile("test2", ".txt"); - String secondFileContent = "Your ad could be here"; - Files.writeString(secondFile, secondFileContent); - - List files = List.of(firstFile.toFile(), secondFile.toFile()); - - // when - String response = api.testBodyMultipartFormdataArrayOfBinary(files); - - // then - assertThat(response, containsString("Content-Type: multipart/form-data")); - assertThat(response, containsString(firstFileContent)); - assertThat(response, containsString(secondFileContent)); - } - - /** - * Test single binary in multipart mime - * - *

Test single binary in multipart mime - */ - @Test - public void testBodyMultipartFormdataSingleBinaryTest() throws IOException { - // given - var testFile = Files.createTempFile("test", ".txt"); - String testFileContent = "Lorem ipsum dolor sit amet"; - Files.writeString(testFile, testFileContent); - - // when - String response = api.testBodyMultipartFormdataSingleBinary(testFile.toFile()); - - // then - assertThat(response, containsString("Content-Type: multipart/form-data")); - assertThat(response, containsString(testFileContent)); - } - - /** - * Test body parameter(s) - * - *

Test body parameter(s) - */ - @Test - public void testEchoBodyAllOfPetTest() { - // given - // The content length must be set to disable the Transfer-Encoding: chunked which would lead to - // unparsable response because the echo server is replying them as body. - api.getApiClient().addDefaultHeader("Content-Length", "192"); - - Pet pet = - new Pet() - .id(42L) - .name("Corgi") - .category(new Category().id(1L).name("Dogs")) - .status(StatusEnum.SOLD) - .addPhotoUrlsItem( - "https://cdn.pixabay.com/photo/2021/10/13/09/01/corgi-6705821_1280.jpg") - .addTagsItem(new Tag().id(1L).name("cute")); - - // when - Pet response = api.testEchoBodyAllOfPet(pet); - - // then - assertThat(response, is(pet)); - } - - /** - * Test free form object - * - *

Test free form object - */ - @Test - public void testEchoBodyFreeFormObjectResponseStringTest() { - // given - // The content length must be set to disable the Transfer-Encoding: chunked which would lead to - // unparsable response because the echo server is replying them as body. - api.getApiClient().addDefaultHeader("Content-Length", "51"); - - Object mapAsObject = - new HashMap<>( - Map.of( - "firstKey", "firstValue", - "secondKey", "secondValue")); - - // when - String response = api.testEchoBodyFreeFormObjectResponseString(mapAsObject); - - // then - assertThat(response, is("{\"firstKey\":\"firstValue\",\"secondKey\":\"secondValue\"}")); - } - - /** - * Test body parameter(s) - * - *

Test body parameter(s) - */ - @Test - public void testEchoBodyPetTest() { - // given - // The content length must be set to disable the Transfer-Encoding: chunked which would lead to - // unparsable response because the echo server is replying them as body. - api.getApiClient().addDefaultHeader("Content-Length", "192"); - - Pet pet = - new Pet() - .id(42L) - .name("Corgi") - .category(new Category().id(1L).name("Dogs")) - .status(StatusEnum.SOLD) - .addPhotoUrlsItem( - "https://cdn.pixabay.com/photo/2021/10/13/09/01/corgi-6705821_1280.jpg") - .addTagsItem(new Tag().id(1L).name("cute")); - - // when - Pet response = api.testEchoBodyPet(pet); - - // then - assertThat(response, is(pet)); - } - - /** - * Test empty response body - * - *

Test empty response body - */ - @Test - public void testEchoBodyPetResponseStringTest() { - // given - // The content length must be set to disable the Transfer-Encoding: chunked which would lead to - // unparsable response because the echo server is replying them as body. - api.getApiClient().addDefaultHeader("Content-Length", "192"); - - Pet pet = - new Pet() - .id(42L) - .name("Corgi") - .category(new Category().id(1L).name("Dogs")) - .status(StatusEnum.SOLD) - .addPhotoUrlsItem( - "https://cdn.pixabay.com/photo/2021/10/13/09/01/corgi-6705821_1280.jpg") - .addTagsItem(new Tag().id(1L).name("cute")); - - // when - String response = api.testEchoBodyPetResponseString(pet); - - // then - assertThat( - response, - is( - "{\"id\":42,\"name\":\"Corgi\",\"category\":{\"id\":1,\"name\":\"Dogs\"},\"photoUrls\":[\"https://cdn.pixabay.com/photo/2021/10/13/09/01/corgi-6705821_1280.jpg\"],\"tags\":[{\"id\":1,\"name\":\"cute\"}],\"status\":\"sold\"}")); - } - - /** - * Test string enum response body - * - *

Test string enum response body - */ - @Test - public void testEchoBodyStringEnumTest() { - // given - String body = "\"failure\""; - - // when - StringEnumRef response = api.testEchoBodyStringEnum(body); - - // then - assertThat(response, is(StringEnumRef.FAILURE)); - } - - /** - * Test empty json (request body) - * - *

Test empty json (request body) - */ - @Test - public void testEchoBodyTagResponseStringTest() { - // given - Tag tag = null; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; - // when - String response = api.testEchoBodyTagResponseString(tag); +/** + * API tests for BodyApi + */ +@Disabled +public class BodyApiTest { - // then - assertThat(response, nullValue()); - } -} + private final BodyApi api = new BodyApi(); + + + /** + * Test binary (gif) response body + * + * Test binary (gif) response body + */ + @Test + public void testBinaryGifTest() { + File response = api.testBinaryGif(); + + // TODO: test validations + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + */ + @Test + public void testBodyApplicationOctetstreamBinaryTest() { + File body = null; + String response = api.testBodyApplicationOctetstreamBinary(body); + + // TODO: test validations + } + + /** + * Test array of binary in multipart mime + * + * Test array of binary in multipart mime + */ + @Test + public void testBodyMultipartFormdataArrayOfBinaryTest() { + List files = null; + String response = api.testBodyMultipartFormdataArrayOfBinary(files); + + // TODO: test validations + } + + /** + * Test single binary in multipart mime + * + * Test single binary in multipart mime + */ + @Test + public void testBodyMultipartFormdataSingleBinaryTest() { + File myFile = null; + String response = api.testBodyMultipartFormdataSingleBinary(myFile); + + // TODO: test validations + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + */ + @Test + public void testEchoBodyAllOfPetTest() { + Pet pet = null; + Pet response = api.testEchoBodyAllOfPet(pet); + + // TODO: test validations + } + + /** + * Test free form object + * + * Test free form object + */ + @Test + public void testEchoBodyFreeFormObjectResponseStringTest() { + Object body = null; + String response = api.testEchoBodyFreeFormObjectResponseString(body); + + // TODO: test validations + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + */ + @Test + public void testEchoBodyPetTest() { + Pet pet = null; + Pet response = api.testEchoBodyPet(pet); + + // TODO: test validations + } + + /** + * Test empty response body + * + * Test empty response body + */ + @Test + public void testEchoBodyPetResponseStringTest() { + Pet pet = null; + String response = api.testEchoBodyPetResponseString(pet); + + // TODO: test validations + } + + /** + * Test string enum response body + * + * Test string enum response body + */ + @Test + public void testEchoBodyStringEnumTest() { + String body = null; + StringEnumRef response = api.testEchoBodyStringEnum(body); + + // TODO: test validations + } + + /** + * Test empty json (request body) + * + * Test empty json (request body) + */ + @Test + public void testEchoBodyTagResponseStringTest() { + Tag tag = null; + String response = api.testEchoBodyTagResponseString(tag); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/FormApiTest.java b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/FormApiTest.java index 140bca8e3deaa..48a2f13425908 100644 --- a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/FormApiTest.java +++ b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/FormApiTest.java @@ -10,154 +10,72 @@ * Do not edit the class manually. */ -package org.openapitools.client.api; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.MatcherAssert.assertThat; +package org.openapitools.client.api; -import org.junit.Test; import org.openapitools.client.model.TestFormObjectMultipartRequestMarker; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -/** API tests for FormApi */ -public class FormApiTest { - - private final FormApi api = new FormApi(); - - /** - * Test form parameter(s) - * - *

Test form parameter(s) - */ - @Test - public void testFormIntegerBooleanStringTest() { - // Given - // The content length must be set to disable the Transfer-Encoding: chunked which would lead to - // unparsable response because the echo server is replying them as body. - api.getApiClient().addDefaultHeader("Content-Length", "53"); - - Integer integerForm = 42; - Boolean booleanForm = true; - String stringForm = "Test123"; - - // When - String response = api.testFormIntegerBooleanString(integerForm, booleanForm, stringForm); - - // Then - assertThat(response, containsString("integer_form=42&boolean_form=true&string_form=Test123")); - } - - /** - * Test form parameter(s) for multipart schema - * - *

Test form parameter(s) for multipart schema - */ - @Test - public void testFormObjectMultipartTest() { - // Given - TestFormObjectMultipartRequestMarker marker = - new TestFormObjectMultipartRequestMarker().name("Test Marker"); - - // When - String response = api.testFormObjectMultipart(marker); - - // Then - assertThat(response, containsString("{\"name\":\"Test Marker\"}")); - } - - /** - * Test form parameter(s) for oneOf schema with only the first parameters filled - * - *

Test form parameter(s) for oneOf schema - */ - @Test - public void testFormOneofTest_first() { - // Given - String form1 = "test12"; - Integer form2 = 12; - - String form3 = null; - Boolean form4 = null; - - Long id = null; - String name = null; - - // When - String response = api.testFormOneof(form1, form2, form3, form4, id, name); - - // Then - assertThat(response, containsString("form1=test12&form2=12")); - } +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; - /** - * Test form parameter(s) for oneOf schema with only the second parameters filled - * - *

Test form parameter(s) for oneOf schema - */ - @Test - public void testFormOneofTest_second() { - // Given - String form1 = null; - Integer form2 = null; - - String form3 = "34test"; - Boolean form4 = false; - - Long id = null; - String name = null; - - // When - String response = api.testFormOneof(form1, form2, form3, form4, id, name); - - // Then - assertThat(response, containsString("form3=34test&form4=false")); - } - - /** - * Test form parameter(s) for oneOf schema with only the third parameters filled - * - *

Test form parameter(s) for oneOf schema - */ - @Test - public void testFormOneofTest_third() { - // Given - String form1 = null; - Integer form2 = null; - - String form3 = null; - Boolean form4 = null; - - Long id = 21L; - String name = "Hans"; - - // When - String response = api.testFormOneof(form1, form2, form3, form4, id, name); - - // Then - assertThat(response, containsString("id=21&name=Hans")); - } - - /** - * Test form parameter(s) for oneOf schema with all parameters filled - * - *

Test form parameter(s) for oneOf schema - */ - @Test - public void testFormOneofTest_all() { - // Given - String form1 = "test12"; - Integer form2 = 12; - - String form3 = "34test"; - Boolean form4 = false; - - Long id = 21L; - String name = "Hans"; - - // When - String response = api.testFormOneof(form1, form2, form3, form4, id, name); +/** + * API tests for FormApi + */ +@Disabled +public class FormApiTest { - // Then - assertThat( - response, containsString("form1=test12&form2=12&form3=34test&form4=false&id=21&name=Hans")); - } -} + private final FormApi api = new FormApi(); + + + /** + * Test form parameter(s) + * + * Test form parameter(s) + */ + @Test + public void testFormIntegerBooleanStringTest() { + Integer integerForm = null; + Boolean booleanForm = null; + String stringForm = null; + String response = api.testFormIntegerBooleanString(integerForm, booleanForm, stringForm); + + // TODO: test validations + } + + /** + * Test form parameter(s) for multipart schema + * + * Test form parameter(s) for multipart schema + */ + @Test + public void testFormObjectMultipartTest() { + TestFormObjectMultipartRequestMarker marker = null; + String response = api.testFormObjectMultipart(marker); + + // TODO: test validations + } + + /** + * Test form parameter(s) for oneOf schema + * + * Test form parameter(s) for oneOf schema + */ + @Test + public void testFormOneofTest() { + String form1 = null; + Integer form2 = null; + String form3 = null; + Boolean form4 = null; + Long id = null; + String name = null; + String response = api.testFormOneof(form1, form2, form3, form4, id, name); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/HeaderApiTest.java b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/HeaderApiTest.java index c0230e6b003df..a8f1764c216fd 100644 --- a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/HeaderApiTest.java +++ b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/HeaderApiTest.java @@ -10,51 +10,43 @@ * Do not edit the class manually. */ -package org.openapitools.client.api; -import static org.hamcrest.CoreMatchers.allOf; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.MatcherAssert.assertThat; +package org.openapitools.client.api; -import org.junit.Test; import org.openapitools.client.model.StringEnumRef; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -/** API tests for HeaderApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for HeaderApi + */ +@Disabled public class HeaderApiTest { - private final HeaderApi api = new HeaderApi(); - - /** - * Test header parameter(s) - * - *

Test header parameter(s) - */ - @Test - public void testHeaderIntegerBooleanStringEnumsTest() { - // Given - Integer integerHeader = 11; - Boolean booleanHeader = true; - String stringHeader = "simple String Header"; - String enumNonrefStringHeader = "false"; - StringEnumRef enumRefStringHeader = StringEnumRef.UNCLASSIFIED; - - // When - String response = - api.testHeaderIntegerBooleanStringEnums( - integerHeader, - booleanHeader, - stringHeader, - enumNonrefStringHeader, - enumRefStringHeader); - - // Then - assertThat( - response, - allOf( - containsString("integer_header: 11"), - containsString("boolean_header: true"), - containsString("string_header: simple String Header"), - containsString("enum_nonref_string_header: false"), - containsString("enum_ref_string_header: unclassified"))); - } -} + private final HeaderApi api = new HeaderApi(); + + + /** + * Test header parameter(s) + * + * Test header parameter(s) + */ + @Test + public void testHeaderIntegerBooleanStringEnumsTest() { + Integer integerHeader = null; + Boolean booleanHeader = null; + String stringHeader = null; + String enumNonrefStringHeader = null; + StringEnumRef enumRefStringHeader = null; + String response = api.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/PathApiTest.java b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/PathApiTest.java index d9381c9c2f3e2..9605fe30aeb6f 100644 --- a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/PathApiTest.java +++ b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/PathApiTest.java @@ -10,40 +10,42 @@ * Do not edit the class manually. */ -package org.openapitools.client.api; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.MatcherAssert.assertThat; +package org.openapitools.client.api; -import org.junit.Test; import org.openapitools.client.model.StringEnumRef; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -/** API tests for PathApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for PathApi + */ +@Disabled public class PathApiTest { - private final PathApi api = new PathApi(); - - /** - * Test path parameter(s) - * - *

Test path parameter(s) - */ - @Test - public void - testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest() { - // Given - String pathString = "simple String Path"; - Integer pathInteger = 50; - String enumNonrefStringPath = "true"; - StringEnumRef enumRefStringPath = StringEnumRef.SUCCESS; - - // When - String response = - api.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath( - pathString, pathInteger, enumNonrefStringPath, enumRefStringPath); - - // Then - assertThat( - response, containsString("/path/string/simple%20String%20Path/integer/50/true/success")); - } -} + private final PathApi api = new PathApi(); + + + /** + * Test path parameter(s) + * + * Test path parameter(s) + */ + @Test + public void testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest() { + String pathString = null; + Integer pathInteger = null; + String enumNonrefStringPath = null; + StringEnumRef enumRefStringPath = null; + String response = api.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/QueryApiTest.java b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/QueryApiTest.java index 827ef91367e09..d105e6f1fa208 100644 --- a/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/QueryApiTest.java +++ b/samples/client/echo_api/java/restclient/src/test/java/org/openapitools/client/api/QueryApiTest.java @@ -10,206 +10,167 @@ * Do not edit the class manually. */ -package org.openapitools.client.api; -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.MatcherAssert.assertThat; +package org.openapitools.client.api; -import java.time.Instant; -import java.time.LocalDate; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; import org.openapitools.client.model.DataQuery; +import java.time.LocalDate; +import java.time.Instant; import org.openapitools.client.model.Pet; import org.openapitools.client.model.StringEnumRef; import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter; import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -/** API tests for QueryApi */ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for QueryApi + */ +@Disabled public class QueryApiTest { - private final QueryApi api = new QueryApi(); - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - public void testEnumRefStringTest() { - // Given - String enumNonrefStringQuery = "false"; - StringEnumRef enumRefStringQuery = StringEnumRef.SUCCESS; - - // When - String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery); - - // Then - assertThat( - response, containsString("?enum_nonref_string_query=false&enum_ref_string_query=success")); - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - public void testQueryDatetimeDateStringTest() { - // Given - Instant datetimeQuery = Instant.ofEpochMilli(1720361075); - LocalDate dateQuery = LocalDate.of(2024, 7, 7); - String stringQuery = "2024-07-07T16:05:59Z"; - - // When - String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery); - - // Then - assertThat( - response, - containsString( - "?datetime_query=1970-01-20T21%3A52%3A41.075Z&date_query=2024-07-07&string_query=2024-07-07T16%3A05%3A59Z")); - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - public void testQueryIntegerBooleanStringTest() { - // Given - Integer integerQuery = 42; - Boolean booleanQuery = false; - String stringQuery = "Hello World!"; - - // When - String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); - - // Then - assertThat( - response, - containsString("?integer_query=42&boolean_query=false&string_query=Hello%20World%21")); - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - @Disabled("The deep object style and the whole dynamic operations are currently not supported") - public void testQueryStyleDeepObjectExplodeTrueObjectTest() { - Pet queryObject = null; - String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryObject); - - // Like Spring WebClient and RestTemplate, the deep object style is currently not - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - @Disabled("The deep object style and the whole dynamic operations are currently not supported") - public void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() { - TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null; - String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject); - - // Like Spring WebClient and RestTemplate, the deep object style and the whole dynamic - // operations are currently not supported - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - public void testQueryStyleFormExplodeFalseArrayIntegerTest() { - // Given - List queryObject = List.of(1, 6, 2, 5, 3, 4); - - // When - String response = api.testQueryStyleFormExplodeFalseArrayInteger(queryObject); - - // Then - assertThat(response, containsString("?query_object=1%2C6%2C2%2C5%2C3%2C4")); - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - public void testQueryStyleFormExplodeFalseArrayStringTest() { - // Given - List queryObject = List.of("Hello", "World"); - - // When - String response = api.testQueryStyleFormExplodeFalseArrayString(queryObject); - - // Then - assertThat(response, containsString("?query_object=Hello%2CWorld")); - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - @Disabled("The deep object style and the whole dynamic operations are currently not supported") - public void testQueryStyleFormExplodeTrueArrayStringTest() { - // Given - TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = - new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() - .addValuesItem("Hello") - .addValuesItem("Hallo") - .addValuesItem("Bonjour"); - - // When - String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject); - - // Then - // Like Spring WebClient and RestTemplate, the deep object style and the whole dynamic - // operations are currently not supported - assertThat( - response, containsString("?query_object=Hello&query_object=Hallo&query_object=Bonjour")); - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - @Disabled("The deep object style and the whole dynamic operations are currently not supported") - public void testQueryStyleFormExplodeTrueObjectTest() { - Pet queryObject = null; - String response = api.testQueryStyleFormExplodeTrueObject(queryObject); - - // TODO: test validations - // Like Spring WebClient and RestTemplate, the deep object style and the whole dynamic - // operations are currently not supported - } - - /** - * Test query parameter(s) - * - *

Test query parameter(s) - */ - @Test - @Disabled("The deep object style and the whole dynamic operations are currently not supported") - public void testQueryStyleFormExplodeTrueObjectAllOfTest() { - DataQuery queryObject = null; - String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); - - // TODO: test validations - // Like Spring WebClient and RestTemplate, the deep object style and the whole dynamic - // operations are currently not supported - } -} + private final QueryApi api = new QueryApi(); + + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testEnumRefStringTest() { + String enumNonrefStringQuery = null; + StringEnumRef enumRefStringQuery = null; + String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryDatetimeDateStringTest() { + Instant datetimeQuery = null; + LocalDate dateQuery = null; + String stringQuery = null; + String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryIntegerBooleanStringTest() { + Integer integerQuery = null; + Boolean booleanQuery = null; + String stringQuery = null; + String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleDeepObjectExplodeTrueObjectTest() { + Pet queryObject = null; + String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() { + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null; + String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleFormExplodeFalseArrayIntegerTest() { + List queryObject = null; + String response = api.testQueryStyleFormExplodeFalseArrayInteger(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleFormExplodeFalseArrayStringTest() { + List queryObject = null; + String response = api.testQueryStyleFormExplodeFalseArrayString(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleFormExplodeTrueArrayStringTest() { + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null; + String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() { + Pet queryObject = null; + String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + public void testQueryStyleFormExplodeTrueObjectAllOfTest() { + DataQuery queryObject = null; + String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-useAbstractionForFiles/.openapi-generator/FILES b/samples/client/others/java/restclient-useAbstractionForFiles/.openapi-generator/FILES index 611375d94d7ff..bc1ac662a16de 100644 --- a/samples/client/others/java/restclient-useAbstractionForFiles/.openapi-generator/FILES +++ b/samples/client/others/java/restclient-useAbstractionForFiles/.openapi-generator/FILES @@ -26,3 +26,4 @@ src/main/java/org/openapitools/client/auth/ApiKeyAuth.java src/main/java/org/openapitools/client/auth/Authentication.java src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +src/test/java/org/openapitools/client/api/ResourceApiTest.java diff --git a/samples/client/others/java/restclient-useAbstractionForFiles/src/test/java/org/openapitools/client/api/ResourceApiTest.java b/samples/client/others/java/restclient-useAbstractionForFiles/src/test/java/org/openapitools/client/api/ResourceApiTest.java index fee02b33f1466..a5d39415f7b81 100644 --- a/samples/client/others/java/restclient-useAbstractionForFiles/src/test/java/org/openapitools/client/api/ResourceApiTest.java +++ b/samples/client/others/java/restclient-useAbstractionForFiles/src/test/java/org/openapitools/client/api/ResourceApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import java.io.File; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for ResourceApi */ -@Ignore +@Disabled public class ResourceApiTest { private final ResourceApi api = new ResourceApi(); diff --git a/samples/client/petstore/java/restclient-nullable-arrays/.openapi-generator/FILES b/samples/client/petstore/java/restclient-nullable-arrays/.openapi-generator/FILES index 4f38a796a270f..c6d5219ec0583 100644 --- a/samples/client/petstore/java/restclient-nullable-arrays/.openapi-generator/FILES +++ b/samples/client/petstore/java/restclient-nullable-arrays/.openapi-generator/FILES @@ -28,3 +28,5 @@ src/main/java/org/openapitools/client/auth/Authentication.java src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/model/ByteArrayObject.java +src/test/java/org/openapitools/client/api/DefaultApiTest.java +src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java diff --git a/samples/client/petstore/java/restclient-nullable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/restclient-nullable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java index 7552e150548c5..f668338d40adc 100644 --- a/samples/client/petstore/java/restclient-nullable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ b/samples/client/petstore/java/restclient-nullable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.ByteArrayObject; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for DefaultApi */ -@Ignore +@Disabled public class DefaultApiTest { private final DefaultApi api = new DefaultApi(); diff --git a/samples/client/petstore/java/restclient-swagger2/.openapi-generator/FILES b/samples/client/petstore/java/restclient-swagger2/.openapi-generator/FILES index fcdb2bc32220a..27c4d5074bb6d 100644 --- a/samples/client/petstore/java/restclient-swagger2/.openapi-generator/FILES +++ b/samples/client/petstore/java/restclient-swagger2/.openapi-generator/FILES @@ -140,3 +140,60 @@ src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java src/main/java/org/openapitools/client/model/User.java +src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +src/test/java/org/openapitools/client/api/DefaultApiTest.java +src/test/java/org/openapitools/client/api/FakeApiTest.java +src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +src/test/java/org/openapitools/client/api/PetApiTest.java +src/test/java/org/openapitools/client/api/StoreApiTest.java +src/test/java/org/openapitools/client/api/UserApiTest.java +src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java +src/test/java/org/openapitools/client/model/AnimalTest.java +src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +src/test/java/org/openapitools/client/model/ArrayTestTest.java +src/test/java/org/openapitools/client/model/CapitalizationTest.java +src/test/java/org/openapitools/client/model/CatTest.java +src/test/java/org/openapitools/client/model/CategoryTest.java +src/test/java/org/openapitools/client/model/ChildWithNullableTest.java +src/test/java/org/openapitools/client/model/ClassModelTest.java +src/test/java/org/openapitools/client/model/ClientTest.java +src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java +src/test/java/org/openapitools/client/model/DogTest.java +src/test/java/org/openapitools/client/model/EnumArraysTest.java +src/test/java/org/openapitools/client/model/EnumClassTest.java +src/test/java/org/openapitools/client/model/EnumTestTest.java +src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java +src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java +src/test/java/org/openapitools/client/model/FooTest.java +src/test/java/org/openapitools/client/model/FormatTestTest.java +src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +src/test/java/org/openapitools/client/model/HealthCheckResultTest.java +src/test/java/org/openapitools/client/model/MapTestTest.java +src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +src/test/java/org/openapitools/client/model/Model200ResponseTest.java +src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +src/test/java/org/openapitools/client/model/ModelFileTest.java +src/test/java/org/openapitools/client/model/ModelListTest.java +src/test/java/org/openapitools/client/model/ModelReturnTest.java +src/test/java/org/openapitools/client/model/NameTest.java +src/test/java/org/openapitools/client/model/NullableClassTest.java +src/test/java/org/openapitools/client/model/NumberOnlyTest.java +src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java +src/test/java/org/openapitools/client/model/OrderTest.java +src/test/java/org/openapitools/client/model/OuterCompositeTest.java +src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java +src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java +src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java +src/test/java/org/openapitools/client/model/OuterEnumTest.java +src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java +src/test/java/org/openapitools/client/model/ParentWithNullableTest.java +src/test/java/org/openapitools/client/model/PetTest.java +src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +src/test/java/org/openapitools/client/model/SingleRefTypeTest.java +src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +src/test/java/org/openapitools/client/model/TagTest.java +src/test/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequestTest.java +src/test/java/org/openapitools/client/model/UserTest.java diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index f17f97c4def1c..9960e0bec21fc 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for AnotherFakeApi */ -@Ignore +@Disabled public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/DefaultApiTest.java index be7d082abc613..6a143cec05bdb 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.FooGetDefaultResponse; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for DefaultApi */ -@Ignore +@Disabled public class DefaultApiTest { private final DefaultApi api = new DefaultApi(); diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeApiTest.java index fd55e7b08a6e8..232d5f66bdf06 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -28,8 +28,8 @@ import org.openapitools.client.model.Pet; import org.openapitools.client.model.TestInlineFreeformAdditionalPropertiesRequest; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -40,7 +40,7 @@ /** * API tests for FakeApi */ -@Ignore +@Disabled public class FakeApiTest { private final FakeApi api = new FakeApi(); diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 9b9e18fb23390..b5902a7bafa69 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for FakeClassnameTags123Api */ -@Ignore +@Disabled public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/PetApiTest.java index 005740d942a3b..ad5e55343b734 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -17,8 +17,8 @@ import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; import java.util.Set; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -29,7 +29,7 @@ /** * API tests for PetApi */ -@Ignore +@Disabled public class PetApiTest { private final PetApi api = new PetApi(); diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/StoreApiTest.java index 682b18f0b1d37..323ed1ee3403e 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for StoreApi */ -@Ignore +@Disabled public class StoreApiTest { private final StoreApi api = new StoreApi(); diff --git a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/UserApiTest.java index a0323a123514b..8d57a6b24a949 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import java.time.OffsetDateTime; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -27,7 +27,7 @@ /** * API tests for UserApi */ -@Ignore +@Disabled public class UserApiTest { private final UserApi api = new UserApi(); diff --git a/samples/client/petstore/java/restclient/.openapi-generator/FILES b/samples/client/petstore/java/restclient/.openapi-generator/FILES index fcdb2bc32220a..27c4d5074bb6d 100644 --- a/samples/client/petstore/java/restclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/restclient/.openapi-generator/FILES @@ -140,3 +140,60 @@ src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java src/main/java/org/openapitools/client/model/User.java +src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +src/test/java/org/openapitools/client/api/DefaultApiTest.java +src/test/java/org/openapitools/client/api/FakeApiTest.java +src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +src/test/java/org/openapitools/client/api/PetApiTest.java +src/test/java/org/openapitools/client/api/StoreApiTest.java +src/test/java/org/openapitools/client/api/UserApiTest.java +src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java +src/test/java/org/openapitools/client/model/AnimalTest.java +src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +src/test/java/org/openapitools/client/model/ArrayTestTest.java +src/test/java/org/openapitools/client/model/CapitalizationTest.java +src/test/java/org/openapitools/client/model/CatTest.java +src/test/java/org/openapitools/client/model/CategoryTest.java +src/test/java/org/openapitools/client/model/ChildWithNullableTest.java +src/test/java/org/openapitools/client/model/ClassModelTest.java +src/test/java/org/openapitools/client/model/ClientTest.java +src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java +src/test/java/org/openapitools/client/model/DogTest.java +src/test/java/org/openapitools/client/model/EnumArraysTest.java +src/test/java/org/openapitools/client/model/EnumClassTest.java +src/test/java/org/openapitools/client/model/EnumTestTest.java +src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java +src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java +src/test/java/org/openapitools/client/model/FooTest.java +src/test/java/org/openapitools/client/model/FormatTestTest.java +src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +src/test/java/org/openapitools/client/model/HealthCheckResultTest.java +src/test/java/org/openapitools/client/model/MapTestTest.java +src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +src/test/java/org/openapitools/client/model/Model200ResponseTest.java +src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +src/test/java/org/openapitools/client/model/ModelFileTest.java +src/test/java/org/openapitools/client/model/ModelListTest.java +src/test/java/org/openapitools/client/model/ModelReturnTest.java +src/test/java/org/openapitools/client/model/NameTest.java +src/test/java/org/openapitools/client/model/NullableClassTest.java +src/test/java/org/openapitools/client/model/NumberOnlyTest.java +src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java +src/test/java/org/openapitools/client/model/OrderTest.java +src/test/java/org/openapitools/client/model/OuterCompositeTest.java +src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java +src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java +src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java +src/test/java/org/openapitools/client/model/OuterEnumTest.java +src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java +src/test/java/org/openapitools/client/model/ParentWithNullableTest.java +src/test/java/org/openapitools/client/model/PetTest.java +src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +src/test/java/org/openapitools/client/model/SingleRefTypeTest.java +src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +src/test/java/org/openapitools/client/model/TagTest.java +src/test/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequestTest.java +src/test/java/org/openapitools/client/model/UserTest.java diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index f17f97c4def1c..9960e0bec21fc 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for AnotherFakeApi */ -@Ignore +@Disabled public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java index be7d082abc613..6a143cec05bdb 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.FooGetDefaultResponse; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for DefaultApi */ -@Ignore +@Disabled public class DefaultApiTest { private final DefaultApi api = new DefaultApi(); diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeApiTest.java index fd55e7b08a6e8..232d5f66bdf06 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -28,8 +28,8 @@ import org.openapitools.client.model.Pet; import org.openapitools.client.model.TestInlineFreeformAdditionalPropertiesRequest; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -40,7 +40,7 @@ /** * API tests for FakeApi */ -@Ignore +@Disabled public class FakeApiTest { private final FakeApi api = new FakeApi(); diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 9b9e18fb23390..b5902a7bafa69 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for FakeClassnameTags123Api */ -@Ignore +@Disabled public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/PetApiTest.java index 005740d942a3b..ad5e55343b734 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -17,8 +17,8 @@ import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; import java.util.Set; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -29,7 +29,7 @@ /** * API tests for PetApi */ -@Ignore +@Disabled public class PetApiTest { private final PetApi api = new PetApi(); diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/StoreApiTest.java index 682b18f0b1d37..323ed1ee3403e 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +26,7 @@ /** * API tests for StoreApi */ -@Ignore +@Disabled public class StoreApiTest { private final StoreApi api = new StoreApi(); diff --git a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/UserApiTest.java index a0323a123514b..8d57a6b24a949 100644 --- a/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/restclient/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import java.time.OffsetDateTime; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -27,7 +27,7 @@ /** * API tests for UserApi */ -@Ignore +@Disabled public class UserApiTest { private final UserApi api = new UserApi();