From f82de07ee59d7bfbd6349f21fabcb7115cb0ba79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Masset?= Date: Fri, 17 May 2019 00:07:01 +0200 Subject: [PATCH] Use newly introduced lambdas in Spring's API template to avoid generating uncompilable example code --- .../codegen/languages/SpringCodegen.java | 6 ++++++ .../resources/JavaSpring/exampleString.mustache | 2 +- .../java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeApi.java | 6 +++--- .../org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 14 +++++++------- .../main/java/org/openapitools/api/StoreApi.java | 8 ++++---- .../main/java/org/openapitools/api/UserApi.java | 4 ++-- .../java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeApi.java | 6 +++--- .../org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 14 +++++++------- .../main/java/org/openapitools/api/StoreApi.java | 8 ++++---- .../main/java/org/openapitools/api/UserApi.java | 4 ++-- .../openapitools/api/AnotherFakeApiController.java | 2 +- .../org/openapitools/api/FakeApiController.java | 6 +++--- .../api/FakeClassnameTestApiController.java | 2 +- .../org/openapitools/api/PetApiController.java | 14 +++++++------- .../org/openapitools/api/StoreApiController.java | 8 ++++---- .../org/openapitools/api/UserApiController.java | 4 ++-- .../openapitools/api/AnotherFakeApiController.java | 2 +- .../org/openapitools/api/FakeApiController.java | 6 +++--- .../api/FakeClassnameTestApiController.java | 2 +- .../org/openapitools/api/PetApiController.java | 14 +++++++------- .../org/openapitools/api/StoreApiController.java | 8 ++++---- .../org/openapitools/api/UserApiController.java | 4 ++-- .../openapitools/api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApiDelegate.java | 6 +++--- .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApiDelegate.java | 14 +++++++------- .../org/openapitools/api/StoreApiDelegate.java | 8 ++++---- .../java/org/openapitools/api/UserApiDelegate.java | 4 ++-- .../java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeApi.java | 6 +++--- .../org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 14 +++++++------- .../main/java/org/openapitools/api/StoreApi.java | 8 ++++---- .../main/java/org/openapitools/api/UserApi.java | 4 ++-- .../openapitools/api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApiDelegate.java | 6 +++--- .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApiDelegate.java | 14 +++++++------- .../org/openapitools/api/StoreApiDelegate.java | 8 ++++---- .../java/org/openapitools/api/UserApiDelegate.java | 4 ++-- .../java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeApi.java | 6 +++--- .../org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 14 +++++++------- .../main/java/org/openapitools/api/StoreApi.java | 8 ++++---- .../main/java/org/openapitools/api/UserApi.java | 4 ++-- .../openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../org/openapitools/virtualan/api/FakeApi.java | 6 +++--- .../virtualan/api/FakeClassnameTestApi.java | 2 +- .../org/openapitools/virtualan/api/PetApi.java | 14 +++++++------- .../org/openapitools/virtualan/api/StoreApi.java | 8 ++++---- .../org/openapitools/virtualan/api/UserApi.java | 4 ++-- .../java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeApi.java | 6 +++--- .../org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 14 +++++++------- .../main/java/org/openapitools/api/StoreApi.java | 8 ++++---- .../main/java/org/openapitools/api/UserApi.java | 4 ++-- 62 files changed, 187 insertions(+), 181 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 8d315b1c2c48..98996a97b48b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -26,6 +26,8 @@ import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.OptionalFeatures; import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.templating.mustache.SplitStringLambda; +import org.openapitools.codegen.templating.mustache.TrimWhitespaceLambda; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -425,6 +427,10 @@ public void processOpts() { (Mustache.Lambda) (fragment, writer) -> writer.write(fragment.execute().replaceAll("\"", Matcher.quoteReplacement("\\\"")))); additionalProperties.put("lambdaRemoveLineBreak", (Mustache.Lambda) (fragment, writer) -> writer.write(fragment.execute().replaceAll("\\r|\\n", ""))); + + additionalProperties.put("lambdaTrimWhitespace", new TrimWhitespaceLambda()); + + additionalProperties.put("lambdaSplitString", new SplitStringLambda()); } @Override diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/exampleString.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/exampleString.mustache index 13432306bcba..1f72a330ef62 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/exampleString.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/exampleString.mustache @@ -1 +1 @@ -"{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{example}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}" \ No newline at end of file +{{#lambdaSplitString}}{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{#lambdaTrimWhitespace}}{{{example}}}{{/lambdaTrimWhitespace}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}{{/lambdaSplitString}} \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index ae2598f45fba..2697e53f5c72 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,7 +48,7 @@ default CompletableFuture> call123testSpecialTags(@ApiPar getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 8b7c192cede9..d8f302f67d63 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -81,7 +81,7 @@ default CompletableFuture> fakeOuterCompositeSeri getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -153,7 +153,7 @@ default CompletableFuture> testClientModel(@ApiParam(valu getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -245,7 +245,7 @@ default CompletableFuture> uploadFileWithRequir getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a2fd5a1ff6dc..f60e649f9dba 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -50,7 +50,7 @@ default CompletableFuture> testClassname(@ApiParam(value getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 8b652fe12af7..e3957de1fb88 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -90,12 +90,12 @@ default CompletableFuture>> findPetsByStatus(@NotNull @ getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -124,12 +124,12 @@ default CompletableFuture>> findPetsByTags(@NotNull @Ap getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -156,12 +156,12 @@ default CompletableFuture> getPetById(@ApiParam(value = "ID getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -227,7 +227,7 @@ default CompletableFuture> uploadFile(@ApiParam getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index 0971071ff5d5..ba31a3b276c5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -76,12 +76,12 @@ default CompletableFuture> getOrderById(@Min(1L) @Max(5L) getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -105,12 +105,12 @@ default CompletableFuture> placeOrder(@ApiParam(value = "o getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 96a870a733e1..90beb14093bb 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -95,12 +95,12 @@ default CompletableFuture> getUserByName(@ApiParam(value = getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index e47815e2c59b..2ca18dd0908b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -46,7 +46,7 @@ default ResponseEntity call123testSpecialTags(@ApiParam(value = "client getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index 02d23010b000..9630b91c9a18 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -79,7 +79,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -149,7 +149,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -239,7 +239,7 @@ default ResponseEntity uploadFileWithRequiredFile(@ApiParam(va getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a3e02b12f67a..6fb2ec7d71da 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,7 +48,7 @@ default ResponseEntity testClassname(@ApiParam(value = "client model" ,r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index c921014375c2..176cbb041aba 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -88,12 +88,12 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -120,12 +120,12 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -150,12 +150,12 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -219,7 +219,7 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 38fd1c5d7023..b398e0be8819 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -74,12 +74,12 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -101,12 +101,12 @@ default ResponseEntity placeOrder(@ApiParam(value = "order placed for pur getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index d6fb6ee7efd0..4c5fafbc2ee1 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -93,12 +93,12 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e119acde8bac..fb922708cb05 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -34,7 +34,7 @@ public AnotherFakeApiController(NativeWebRequest request) { public ResponseEntity call123testSpecialTags(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index 8085112905d7..ab94794c003f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -54,7 +54,7 @@ public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Inpu public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -86,7 +86,7 @@ public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = " public ResponseEntity testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -123,7 +123,7 @@ public ResponseEntity testJsonFormData(@ApiParam(value = "field1", require public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 47c13e91db9d..d2642a4ceeb2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -34,7 +34,7 @@ public FakeClassnameTestApiController(NativeWebRequest request) { public ResponseEntity testClassname(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java index 5f6684edefdd..b1e82a3f7376 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java @@ -46,12 +46,12 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",requi public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -63,12 +63,12 @@ public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "St public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -80,12 +80,12 @@ public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -107,7 +107,7 @@ public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java index 0e7190be448f..63aa57e3c02d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java @@ -45,12 +45,12 @@ public ResponseEntity> getInventory() { public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathVariable("order_id") Long orderId) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -62,12 +62,12 @@ public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "I public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java index 9c02d67f16d8..6c7ad6eaf7eb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java @@ -55,12 +55,12 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e8b75eccbc67..a01520a180f9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -34,7 +34,7 @@ public AnotherFakeApiController(NativeWebRequest request) { public ResponseEntity call123testSpecialTags(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index 47978f2b7b31..beee0bc78b58 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -54,7 +54,7 @@ public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Inpu public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -86,7 +86,7 @@ public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = " public ResponseEntity testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -123,7 +123,7 @@ public ResponseEntity testJsonFormData(@ApiParam(value = "field1", require public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 119d0af54315..378b0d9a486d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -34,7 +34,7 @@ public FakeClassnameTestApiController(NativeWebRequest request) { public ResponseEntity testClassname(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java index 53b35e1dd1f0..b263f984ecd7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java @@ -46,12 +46,12 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",requi public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -63,12 +63,12 @@ public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "St public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -80,12 +80,12 @@ public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -107,7 +107,7 @@ public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java index a9291fb61e24..6d52b0acce56 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java @@ -45,12 +45,12 @@ public ResponseEntity> getInventory() { public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathVariable("order_id") Long orderId) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -62,12 +62,12 @@ public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "I public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java index 56f32a137221..d87450cf58ed 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java @@ -55,12 +55,12 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2bd482bf4bf2..a8c46f16e4a7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -30,7 +30,7 @@ default ResponseEntity call123testSpecialTags(Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 315b2b4dac44..25c9229b7975 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -56,7 +56,7 @@ default ResponseEntity fakeOuterCompositeSerialize(OuterComposit getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -106,7 +106,7 @@ default ResponseEntity testClientModel(Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -191,7 +191,7 @@ default ResponseEntity uploadFileWithRequiredFile(Long petId, getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index cf9bd2c74b87..df29ad43a893 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -30,7 +30,7 @@ default ResponseEntity testClassname(Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index b59c151860f5..ea1a5ebed508 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -49,12 +49,12 @@ default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -71,12 +71,12 @@ default ResponseEntity> findPetsByTags(List tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -93,12 +93,12 @@ default ResponseEntity getPetById(Long petId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -135,7 +135,7 @@ default ResponseEntity uploadFile(Long petId, getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index 85d371da1578..036309ceb6ff 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -47,12 +47,12 @@ default ResponseEntity getOrderById(Long orderId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -69,12 +69,12 @@ default ResponseEntity placeOrder(Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index f81d54d60d86..c90d5e722193 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -63,12 +63,12 @@ default ResponseEntity getUserByName(String username) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 26046082cf20..e9cd7634ad1e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,7 +48,7 @@ default ResponseEntity call123testSpecialTags(@ApiParam(value = "client getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index daeab80ae4b2..0a8293c35609 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -85,7 +85,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -165,7 +165,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -271,7 +271,7 @@ default ResponseEntity uploadFileWithRequiredFile(@ApiParam(va getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7c9659e47002..b740c4a63e74 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -50,7 +50,7 @@ default ResponseEntity testClassname(@ApiParam(value = "client model" ,r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 69cc8aee3c99..2a3fe563c30c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -95,12 +95,12 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -129,12 +129,12 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -161,12 +161,12 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -236,7 +236,7 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index e5d8bbbeb93a..c87a4f7c544f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -80,12 +80,12 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -109,12 +109,12 @@ default ResponseEntity placeOrder(@ApiParam(value = "order placed for pur getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index efaeee9e1a1c..70d87c628a82 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -103,12 +103,12 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 6ba2d489b240..549a66207fa0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -35,7 +35,7 @@ default Mono> call123testSpecialTags(Mono body, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index e24cc6f6b5fb..5d6f4de45675 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -67,7 +67,7 @@ default Mono> fakeOuterCompositeSerialize(Mono> testClientModel(Mono body, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } @@ -231,7 +231,7 @@ default Mono> uploadFileWithRequiredFile(Long p exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 00a38b639691..0373ca1aec33 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -35,7 +35,7 @@ default Mono> testClassname(Mono body, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 0064dca933e9..f8f3d8fd98c8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -60,12 +60,12 @@ default Mono>> findPetsByStatus(List status, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } @@ -83,12 +83,12 @@ default Mono>> findPetsByTags(List tags, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } @@ -106,12 +106,12 @@ default Mono> getPetById(Long petId, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } @@ -155,7 +155,7 @@ default Mono> uploadFile(Long petId, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index 71b92936931e..672d1dbb8d37 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -57,12 +57,12 @@ default Mono> getOrderById(Long orderId, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } @@ -80,12 +80,12 @@ default Mono> placeOrder(Mono body, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index bf578f233b16..26b565341b0e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -80,12 +80,12 @@ default Mono> getUserByName(String username, exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; result = ApiUtil.getExampleResponse(exchange, exampleString); break; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index e47815e2c59b..2ca18dd0908b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -46,7 +46,7 @@ default ResponseEntity call123testSpecialTags(@ApiParam(value = "client getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 33e1ce451b66..2df073724943 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -79,7 +79,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -149,7 +149,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -239,7 +239,7 @@ default ResponseEntity uploadFileWithRequiredFile(@ApiParam(va getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a3e02b12f67a..6fb2ec7d71da 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,7 +48,7 @@ default ResponseEntity testClassname(@ApiParam(value = "client model" ,r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 075bcdecf106..a1efbcac7ad3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -88,12 +88,12 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -120,12 +120,12 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -150,12 +150,12 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -219,7 +219,7 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 38fd1c5d7023..b398e0be8819 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -74,12 +74,12 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -101,12 +101,12 @@ default ResponseEntity placeOrder(@ApiParam(value = "order placed for pur getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index d6fb6ee7efd0..4c5fafbc2ee1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -93,12 +93,12 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 19113dec16cc..adafc8233106 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -50,7 +50,7 @@ default ResponseEntity call123testSpecialTags(@ApiParam(value = "client getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 7494360d7e66..e57834f21dea 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -85,7 +85,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -160,7 +160,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -256,7 +256,7 @@ default ResponseEntity uploadFileWithRequiredFile(@ApiParam(va getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 2a4b59d0d090..8d8bb1e5deb4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -52,7 +52,7 @@ default ResponseEntity testClassname(@ApiParam(value = "client model" ,r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index d7452f65d6ba..fb8f50065759 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -94,12 +94,12 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -127,12 +127,12 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -158,12 +158,12 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -230,7 +230,7 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 941e7c9cba44..58f584fba6ef 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -80,12 +80,12 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -108,12 +108,12 @@ default ResponseEntity placeOrder(@ApiParam(value = "order placed for pur getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 61eae6704762..4370c87d831d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -101,12 +101,12 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index e47815e2c59b..2ca18dd0908b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -46,7 +46,7 @@ default ResponseEntity call123testSpecialTags(@ApiParam(value = "client getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index e108b67b0eb3..338b2272ea02 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -79,7 +79,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true}"; + String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; ApiUtil.setExampleResponse(request, "*/*", exampleString); break; } @@ -149,7 +149,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -239,7 +239,7 @@ default ResponseEntity uploadFileWithRequiredFile(@ApiParam(va getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a3e02b12f67a..6fb2ec7d71da 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,7 +48,7 @@ default ResponseEntity testClassname(@ApiParam(value = "client model" ,r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"client\" : \"client\"}"; + String exampleString = "{ \"client\" : \"client\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index c921014375c2..176cbb041aba 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -88,12 +88,12 @@ default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "S getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -120,12 +120,12 @@ default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tag getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -150,12 +150,12 @@ default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",r getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"; + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 doggie aeiou aeiou"; + String exampleString = " 123456789 doggie aeiou aeiou "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -219,7 +219,7 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"; + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 38fd1c5d7023..b398e0be8819 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -74,12 +74,12 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = " getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } @@ -101,12 +101,12 @@ default ResponseEntity placeOrder(@ApiParam(value = "order placed for pur getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"; + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"; + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index d6fb6ee7efd0..4c5fafbc2ee1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -93,12 +93,12 @@ default ResponseEntity getUserByName(@ApiParam(value = "The name that need getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"; + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"; + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; ApiUtil.setExampleResponse(request, "application/xml", exampleString); break; }