From 84635aba99d0f290ed360fa7feca4a2ffcaf359e Mon Sep 17 00:00:00 2001 From: Zomzog Date: Mon, 5 Sep 2022 00:57:09 +0200 Subject: [PATCH 1/8] [SPRING] Generate inner enum for query and path params --- .../codegen/CodegenOperation.java | 2 +- .../codegen/languages/SpringCodegen.java | 15 + .../main/resources/JavaSpring/api.mustache | 13 + .../resources/JavaSpring/apiDelegate.mustache | 2 +- .../JavaSpring/optionalDataType.mustache | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/DefaultApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/DefaultApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/BarApi.java | 1 + .../java/org/openapitools/api/FooApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 200 ++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/NullableApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 200 ++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../api/AnotherFakeApiDelegate.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../org/openapitools/api/FakeApiDelegate.java | 30 +- .../api/FakeClassnameTestApi.java | 1 + .../api/FakeClassnameTestApiDelegate.java | 2 +- .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../org/openapitools/api/PetApiDelegate.java | 8 +- .../java/org/openapitools/api/StoreApi.java | 1 + .../openapitools/api/StoreApiDelegate.java | 2 +- .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/UserApiDelegate.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../virtualan/api/AnotherFakeApi.java | 1 + .../openapitools/virtualan/api/FakeApi.java | 276 +++++++++++++++++- .../virtualan/api/FakeApiController.java | 2 + .../virtualan/api/FakeClassnameTestApi.java | 1 + .../openapitools/virtualan/api/PetApi.java | 44 ++- .../virtualan/api/PetApiController.java | 2 + .../openapitools/virtualan/api/StoreApi.java | 1 + .../openapitools/virtualan/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 276 +++++++++++++++++- .../openapitools/api/FakeApiController.java | 2 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 44 ++- .../openapitools/api/PetApiController.java | 2 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + 261 files changed, 7069 insertions(+), 438 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 7051777e5ca0..bc00004fafc1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -52,7 +52,7 @@ public class CodegenOperation { public List tags; public List responses = new ArrayList(); public List callbacks = new ArrayList<>(); - public Set imports = new HashSet(); + public Set imports = new HashSet<>(); public List> examples; public List> requestBodyExamples; public ExternalDocumentation externalDocs; 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 a076cf99dd64..9ecaaa081ff9 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 @@ -676,6 +676,10 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List ops = operations.getOperation(); for (final CodegenOperation operation : ops) { + if (operation.allParams.stream().anyMatch(it -> it.isEnum)) { + objs.getImports().add(importFromMapping("JsonCreator")); + objs.getImports().add(importFromMapping("JsonValue")); + } final List responses = operation.responses; if (responses != null) { for (final CodegenResponse resp : responses) { @@ -717,6 +721,12 @@ public void setReturnContainer(final String returnContainer) { return objs; } + private Map importFromMapping(String value) { + HashMap e = new HashMap<>(); + e.put("import", importMapping.get(value)); + return e; + } + private interface DataTypeAssigner { void setReturnType(String returnType); @@ -890,6 +900,11 @@ public void setUnhandledException(boolean unhandledException) { this.unhandledException = unhandledException; } + @Override + protected void updateModelForObject(CodegenModel m, Schema schema) { + super.updateModelForObject(m, schema); // PONY + } + @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 9d77a98eb907..841cd65e6171 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -100,6 +100,7 @@ import javax.annotation.Generated; @RequestMapping("${openapi.<%title%>.base-path:<%>defaultBasePath%>}") <%={{ }}=%> public interface {{classname}} { + {{#jdk8-default-interface}} {{^isDelegate}} {{^reactive}} @@ -118,6 +119,18 @@ public interface {{classname}} { {{/jdk8-default-interface}} {{#operation}} + {{#allParams}} + {{#isEnum}} + {{^isContainer}} +{{>enumClass}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>enumClass}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{/allParams}} /** * {{httpMethod}} {{{path}}}{{#summary}} : {{.}}{{/summary}} {{#notes}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index 5d3332c0cc0d..946256c2cdfb 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -26,7 +26,7 @@ import jakarta.annotation.Generated; {{^useJakartaEe}} import javax.annotation.Generated; {{/useJakartaEe}} - +import static {{package}}.{{classname}}.*; {{#operations}} /** * A delegate to be called by the {@link {{classname}}Controller}}. diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache index 84505f8fc299..52ffe291a15c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache @@ -1 +1 @@ -{{#useOptional}}{{#required}}{{{dataType}}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{{dataType}}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{dataType}}}{{/useOptional}} \ No newline at end of file +{{#useOptional}}{{#required}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}{{/useOptional}} \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 2bf85a2692a1..b9153eeb6c1b 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -93,6 +96,43 @@ CompletableFuture> deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -125,7 +165,7 @@ CompletableFuture> deletePet( produces = "application/json" ) CompletableFuture>> 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 + @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 ); @@ -163,7 +203,7 @@ CompletableFuture>> findPetsByStatus( produces = "application/json" ) CompletableFuture>> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 0ac5503ca79c..93da8115d6f2 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 93b2e4a05f96..6c2297c296bc 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -31,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 64c24b8def11..e99fec9a2d9c 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.apiDocumentation.base-path:}") public interface DefaultApi { + /** * GET /thingy/{date} * diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index ad6138a61e28..7a23c87ec6cb 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -29,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -98,6 +101,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -129,7 +169,7 @@ ResponseEntity deletePet( produces = "application/json" ) 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 + @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 ); @@ -166,7 +206,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ); diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index d8e9c793ae01..0410f27fd3bf 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index 0cd72b5915ad..af60de45fa96 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 2bea3bd4afa4..8c5e1cca6aab 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -31,6 +33,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -94,6 +97,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -126,7 +166,7 @@ ResponseEntity deletePet( produces = "application/json" ) 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, + @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, @ApiIgnore final Pageable pageable ); @@ -165,7 +205,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @ApiIgnore final Pageable pageable ); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 5bffcc3c2d7c..bdedacce0284 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 41e2b3ff4639..a9f1eb7c2774 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index ad6138a61e28..7a23c87ec6cb 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -29,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -98,6 +101,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -129,7 +169,7 @@ ResponseEntity deletePet( produces = "application/json" ) 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 + @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 ); @@ -166,7 +206,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index d8e9c793ae01..0410f27fd3bf 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 0cd72b5915ad..af60de45fa96 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index 97fe354eb959..699c9eff1886 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -99,6 +102,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,7 +168,7 @@ ResponseEntity deletePet( produces = "application/json" ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ); @@ -163,7 +203,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index fd98c2696cc6..918b854a7a3d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index 8eba657977c0..d3fd69428c9b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index c5faa1eb43f0..1112fcdadfd2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -92,6 +95,43 @@ CompletableFuture> deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -121,7 +161,7 @@ CompletableFuture> deletePet( produces = "application/json" ) CompletableFuture>> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ); @@ -156,7 +196,7 @@ CompletableFuture>> findPetsByStatus( produces = "application/json" ) CompletableFuture>> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 1769ef3e7ad0..f6224c3079e7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 477fa1271411..4c42ddd842c9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -38,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 6f2d649c5e1c..d8ec1038be6d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.apiDocumentation.base-path:}") public interface DefaultApi { + /** * GET /thingy/{date} * diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index e4e246214021..d51cc663989e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + /** * PATCH /another-fake/dummy : To test special tags * To test special tags and operation ID starting with number diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 60a7ef15cebd..971e12d27627 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -15,6 +15,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -44,6 +46,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + /** * POST /fake/create_xml_item : creates an XmlItem * this route creates an XmlItem @@ -306,6 +309,257 @@ ResponseEntity testEndpointParameters( ); + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -336,12 +590,12 @@ ResponseEntity testEndpointParameters( consumes = "application/x-www-form-urlencoded" ) ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ); @@ -454,11 +708,11 @@ ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 87152820d393..337c5937959b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTags123Api { + /** * PATCH /fake_classname_test : To test class name in snake case * To test class name in snake case diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index 21a43319e286..df6dd72aa4d9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -96,6 +99,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -125,7 +165,7 @@ ResponseEntity deletePet( produces = "application/json" ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ); @@ -160,7 +200,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index b8bcd9744170..29f26329a001 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{order_id} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index a0f0b24599ed..0e2f5a6a40d9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 061dea9710df..118a12b55235 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.springframework.data.domain.Pageable; import org.springdoc.api.annotations.ParameterObject; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -93,6 +96,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -122,7 +162,7 @@ ResponseEntity deletePet( produces = "application/json" ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status, + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status, @ParameterObject final Pageable pageable ); @@ -158,7 +198,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @ParameterObject final Pageable pageable ); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 06f441761f44..6c23bf521de2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 16867cf7e655..4e71eaea68b2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 637aadf83583..d07e7ebd8c06 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -99,6 +102,43 @@ ResponseEntity deletePet( ); + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,7 +168,7 @@ ResponseEntity deletePet( produces = "application/json" ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ); @@ -163,7 +203,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 77cf47174374..e106fbaaea1f 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 542d301175e2..39d74720dd82 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index a4dd8030c425..b9ad5dbb2e74 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -91,6 +94,43 @@ ResponseEntity deletePet( ) throws Exception; + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -120,7 +160,7 @@ ResponseEntity deletePet( produces = "application/json" ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) throws Exception; @@ -155,7 +195,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index b436e8eb38af..d947c5b34f13 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{orderId} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index e77d1a935b70..709b58337e53 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 6ee4b0e7d443..aa85fadf4177 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -101,6 +104,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -130,7 +170,7 @@ default ResponseEntity deletePet( produces = "application/json" ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -182,7 +222,7 @@ default ResponseEntity> findPetsByStatus( produces = "application/json" ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 05536fdd761d..61a2c1b1242d 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 0c960d46f065..507bd3642035 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java index 4f31a3ff0899..3b1969da8c04 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.byRefOrValue.base-path:}") public interface BarApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java index 5807e2dd0c34..0f5164baee17 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.byRefOrValue.base-path:}") public interface FooApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index cefe0d5a8c50..6f98eafb392c 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -123,6 +126,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -152,7 +192,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -204,7 +244,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java index 7713fe93c419..c4442213abaf 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 77bd390bdac4..a78dd64b2071 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 4d0d4acc3dee..c54bd612760b 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index f57a48fce3c3..3afc7d858cd0 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -123,6 +126,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -152,7 +192,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -204,7 +244,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java index d12543b50f45..9e52f1c077d8 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index 40ac53af88ec..2d5e69140de5 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index f3eecb76df3b..2b1437b37143 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index c2b4605ea0b5..165336ec96ad 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index f4680d0dbbaa..5e995c6098e5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -45,6 +47,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -356,6 +359,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -386,12 +640,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -516,11 +770,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 1e46e272a88d..3f3a303b024b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 5a2a48ee2dea..fdfd67362ae7 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -106,6 +109,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -135,7 +175,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +227,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 967af2c7ee78..2e2155e8ca0e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index cadc9d4695b0..a967f1e7c403 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8903e24adf23..c84d01446260 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -31,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2d5e24bcd5f6..530485bfbc83 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index be0c8a2ba5f9..9d1cbb170663 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -41,6 +43,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -325,6 +328,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -355,12 +609,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -481,11 +735,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 8e624ba5fb59..9c6a27f79725 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 03f67c302ce9..b47196d554a9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -21,7 +23,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -212,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -285,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context) { + default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ed3afcf23a46..5e734ce0b50d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index fb689b13f943..82f384263053 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index fbe3be025937..7760c0dcaa75 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -33,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -100,6 +103,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -129,7 +169,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { return getDelegate().findPetsByStatus(status); } @@ -166,7 +206,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { return getDelegate().findPetsByTags(tags); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index e27c4c3b49d6..84f8afffdb2e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index 1f97f43b6db8..ea34cdaa0eaa 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -13,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -62,7 +64,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status) { + default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -92,7 +94,7 @@ default ResponseEntity> findPetsByStatus(List status) { * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(Set tags) { + default ResponseEntity> findPetsByTags(Set<String> tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 9100a4fb10f0..3d86a427849a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -32,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52a8..28551937ad88 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 5d377aeb6663..59a72c8e4ca3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -33,6 +33,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index c39231c6b299..9e08af2f7d63 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index c2b4605ea0b5..165336ec96ad 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 8c1c5685d6d1..ab6c646e4a20 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -45,6 +47,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -356,6 +359,185 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -388,10 +570,10 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -516,11 +698,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 1e46e272a88d..3f3a303b024b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index eaa3cbf23957..781591484cae 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -107,6 +110,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -136,7 +176,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -188,7 +228,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 967af2c7ee78..2e2155e8ca0e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index cadc9d4695b0..a967f1e7c403 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index c544871cab6f..7922ec5ab4d1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 575a4e23910b..995e6abb6d0a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index a0c82a3ceb0e..80fa26d88381 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -45,6 +47,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -338,6 +341,257 @@ default Mono> testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -368,12 +622,12 @@ default Mono> testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default Mono> testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString, @Parameter(hidden = true) final ServerWebExchange exchange @@ -498,11 +752,11 @@ default Mono> testJsonFormData( value = "/fake/test-query-parameters" ) default Mono> testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context, @Parameter(hidden = true) final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index 8e624ba5fb59..9c6a27f79725 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 8a91326998aa..ad070860d492 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -25,7 +27,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -239,14 +241,14 @@ default Mono> testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default Mono> testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString, + default Mono> testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); @@ -324,11 +326,11 @@ default Mono> testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default Mono> testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context, + default Mono> testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 885d186bc85c..cbc6119a7790 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index bd1f7f3542f8..bbbdc4e4cc0c 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 9cf5fcab9d3b..3e88293dabd4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -106,6 +109,43 @@ default Mono> deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -135,7 +175,7 @@ default Mono> deletePet( produces = { "application/xml", "application/json" } ) default Mono>> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status, + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status, @Parameter(hidden = true) final ServerWebExchange exchange ) { return getDelegate().findPetsByStatus(status, exchange); @@ -173,7 +213,7 @@ default Mono>> findPetsByStatus( produces = { "application/xml", "application/json" } ) default Mono>> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags, @Parameter(hidden = true) final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java index e27c4c3b49d6..84f8afffdb2e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 23e86e8d558f..fd6f8ff88f53 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -17,7 +19,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -72,7 +74,7 @@ default Mono> deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default Mono>> findPetsByStatus(List status, + default Mono>> findPetsByStatus(List status, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); @@ -103,7 +105,7 @@ default Mono>> findPetsByStatus(List status, * @see PetApi#findPetsByTags */ @Deprecated - default Mono>> findPetsByTags(Set tags, + default Mono>> findPetsByTags(Set<String> tags, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 9b73258cbe4a..2044ceaf9522 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index d4f1e2efbf99..6a87c543143e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index e93f4f88588d..8a473664dc64 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 063cd6d0ee87..c6e16fec5767 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index ab1ab9c6759f..b30e89afc276 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -27,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -88,6 +91,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -102,7 +142,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -139,7 +179,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApiController.java index 7713fe93c419..c4442213abaf 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java index f571685418a9..9e6cf7624d74 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java @@ -27,6 +27,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java index 69837198bea5..982b2cd4fa9a 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index c2b4605ea0b5..165336ec96ad 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 93c00a753ead..1ec5162790e7 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -45,6 +47,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -356,6 +359,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -386,12 +640,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -516,11 +770,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 1e46e272a88d..3f3a303b024b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 08a2506086f7..11c365e65e03 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -106,6 +109,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -135,7 +175,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +227,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 967af2c7ee78..2e2155e8ca0e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index cadc9d4695b0..a967f1e7c403 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index cefe0d5a8c50..6f98eafb392c 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -36,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -123,6 +126,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -152,7 +192,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -204,7 +244,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java index 7713fe93c419..c4442213abaf 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 77bd390bdac4..a78dd64b2071 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 4d0d4acc3dee..c54bd612760b 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9407801171c6..7003b1d5818a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + /** * PATCH /another-fake/dummy : To test special tags * To test special tags and operation ID starting with number diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index cffefce18123..64e285760f9b 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -45,6 +47,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + /** * POST /fake/create_xml_item : creates an XmlItem * this route creates an XmlItem @@ -307,6 +310,257 @@ ResponseEntity testEndpointParameters( ) throws Exception; + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -337,12 +591,12 @@ ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) throws Exception; @@ -455,11 +709,11 @@ ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 40dfc1a8ae8c..7cd80eb4fd2f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + /** * PATCH /fake_classname_test : To test class name in snake case * To test class name in snake case diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index 00278f94ac91..8bdde92817f3 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -37,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + /** * POST /pet : Add a new pet to the store * @@ -96,6 +99,43 @@ ResponseEntity deletePet( ) throws Exception; + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -125,7 +165,7 @@ ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) throws Exception; @@ -160,7 +200,7 @@ ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 8dcfbc92e995..1092ade01f82 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -36,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + /** * DELETE /store/order/{order_id} : Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index 32007a570f4f..f7cc68f89b44 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -37,6 +37,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + /** * POST /user : Create user * This can only be done by the logged in user. diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java index c9f92fdfe287..7710f011f307 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java @@ -35,6 +35,7 @@ @RequestMapping("${openapi.apiDocumentation.base-path:}") public interface NullableApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 0a62a3bb6289..f6bf08397dcc 100644 --- a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -29,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -102,6 +105,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -134,7 +174,7 @@ default ResponseEntity deletePet( produces = "application/json" ) default 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 + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -189,7 +229,7 @@ default ResponseEntity> findPetsByStatus( produces = "application/json" ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 128aa8b87f1f..66a149563f81 100644 --- a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index ed955ae4f898..b0678fe03652 100644 --- a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6785adaf0a94..ebb4df89172d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 6d706b8c5d11..5a47d8799a13 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -390,12 +644,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 42c92acbd22c..b1c6810771c8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 83472dd0247f..67a35758c1dd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -107,6 +110,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -139,7 +179,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -194,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 91816bef3223..583b891e5ca0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 68ab1ce6d8e2..22fa71dd51b2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6785adaf0a94..ebb4df89172d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 6d706b8c5d11..5a47d8799a13 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -390,12 +644,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 b30f53bb595c..07f90cb98460 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 @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 42c92acbd22c..b1c6810771c8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 83472dd0247f..67a35758c1dd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -107,6 +110,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -139,7 +179,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -194,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 0b88e5980bf1..39d74a72c4ab 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 @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 91816bef3223..583b891e5ca0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 68ab1ce6d8e2..22fa71dd51b2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 365220e63aa7..eebe41a5ac4c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } 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 2d5e24bcd5f6..530485bfbc83 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 @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index e716498aa68f..0dcc27ea58f8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -34,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -328,6 +331,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -359,12 +613,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -490,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java index 8e624ba5fb59..9c6a27f79725 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 03f67c302ce9..b47196d554a9 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 @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -21,7 +23,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -212,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -285,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context) { + default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 96456e5f7bd6..4bb1a847bfec 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } 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 fb689b13f943..82f384263053 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 @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 7be81c9c088a..44a6ead01717 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -26,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -101,6 +104,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -133,7 +173,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { return getDelegate().findPetsByStatus(status); } @@ -173,7 +213,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { return getDelegate().findPetsByTags(tags); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java index e27c4c3b49d6..84f8afffdb2e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 1f97f43b6db8..ea34cdaa0eaa 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 @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -13,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -62,7 +64,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status) { + default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -92,7 +94,7 @@ default ResponseEntity> findPetsByStatus(List status) { * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(Set tags) { + default ResponseEntity> findPetsByTags(Set<String> tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index a762977831cb..727eb3fbc5a5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -25,6 +25,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } 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 e9b7146b52a8..28551937ad88 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 @@ -12,7 +12,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 7385ea73b137..0afc3fb65528 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -26,6 +26,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } 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 c39231c6b299..9e08af2f7d63 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 @@ -13,7 +13,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 365220e63aa7..eebe41a5ac4c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2d5e24bcd5f6..530485bfbc83 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index e716498aa68f..0dcc27ea58f8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -34,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -328,6 +331,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -359,12 +613,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -490,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 8e624ba5fb59..9c6a27f79725 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 03f67c302ce9..b47196d554a9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -21,7 +23,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -212,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -285,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context) { + default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 96456e5f7bd6..4bb1a847bfec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index fb689b13f943..82f384263053 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 7be81c9c088a..44a6ead01717 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -26,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -101,6 +104,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -133,7 +173,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { return getDelegate().findPetsByStatus(status); } @@ -173,7 +213,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { return getDelegate().findPetsByTags(tags); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index e27c4c3b49d6..84f8afffdb2e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index 1f97f43b6db8..ea34cdaa0eaa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -13,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -62,7 +64,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status) { + default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -92,7 +94,7 @@ default ResponseEntity> findPetsByStatus(List status) { * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(Set tags) { + default ResponseEntity> findPetsByTags(Set<String> tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index a762977831cb..727eb3fbc5a5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -25,6 +25,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52a8..28551937ad88 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 7385ea73b137..0afc3fb65528 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -26,6 +26,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index c39231c6b299..9e08af2f7d63 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index 82822e02f7d7..0328df246685 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -27,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -86,6 +89,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -100,7 +140,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -137,7 +177,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List tags + @NotNull @Valid @RequestParam(value = "tags", required = true) List<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApiController.java index 7713fe93c419..c4442213abaf 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java index f571685418a9..9e6cf7624d74 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java @@ -27,6 +27,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java index 69837198bea5..982b2cd4fa9a 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } 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 6785adaf0a94..ebb4df89172d 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 @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } 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 3f4c9d4437b7..30f40b0b0d14 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 @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,185 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -392,10 +574,10 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +707,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 42c92acbd22c..b1c6810771c8 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 @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } 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 0ef0731c68ea..969d0aca18c5 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 @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -108,6 +111,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -140,7 +180,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -195,7 +235,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 91816bef3223..583b891e5ca0 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 @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } 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 68ab1ce6d8e2..22fa71dd51b2 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 @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1e2ea462c481..ce0be8d1f184 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } 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 c05f795e57b3..938c586dee8f 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 @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 131716a99467..c8f7cf4c6b31 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -17,6 +17,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -39,6 +41,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -342,6 +345,257 @@ default Mono> testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -373,12 +627,12 @@ default Mono> testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default Mono> testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString, @ApiIgnore final ServerWebExchange exchange @@ -508,11 +762,11 @@ default Mono> testJsonFormData( value = "/fake/test-query-parameters" ) default Mono> testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index 113e86683929..189e69147041 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -12,6 +12,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 9571f3da3eb7..70ce758f23f9 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 @@ -12,6 +12,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -26,7 +28,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -240,14 +242,14 @@ default Mono> testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default Mono> testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString, + default Mono> testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); @@ -325,11 +327,11 @@ default Mono> testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default Mono> testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context, + default Mono> testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index cadbfebdd17f..b4799d3de6c9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } 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 527bedeecf90..78dac26ab509 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 @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 7cf64e6f3271..b80b5bdd8940 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -31,6 +33,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -108,6 +111,43 @@ default Mono> deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -140,7 +180,7 @@ default Mono> deletePet( produces = { "application/xml", "application/json" } ) default Mono>> 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, + @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, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByStatus(status, exchange); @@ -181,7 +221,7 @@ default Mono>> findPetsByStatus( produces = { "application/xml", "application/json" } ) default Mono>> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java index df2e9ebac57a..0acaceb5aa6b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 b64cb0f503f8..6af7e0d7a429 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 @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -18,7 +20,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -73,7 +75,7 @@ default Mono> deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default Mono>> findPetsByStatus(List status, + default Mono>> findPetsByStatus(List status, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); @@ -104,7 +106,7 @@ default Mono>> findPetsByStatus(List status, * @see PetApi#findPetsByTags */ @Deprecated - default Mono>> findPetsByTags(Set tags, + default Mono>> findPetsByTags(Set<String> tags, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 8a7ca5c63c3e..b1330d64ebe0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } 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 ecc745c202ff..9c0da0f72373 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 @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 1e229c0d4d4a..2a0552002d1c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -31,6 +31,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } 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 3e561778a3e7..288824b9c45c 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 @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 365220e63aa7..eebe41a5ac4c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2d5e24bcd5f6..530485bfbc83 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 12db61228632..a1aa77cf9f30 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -34,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -328,6 +331,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -359,12 +613,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -490,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 8e624ba5fb59..9c6a27f79725 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 397c677c9949..c2b0582891a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -21,7 +23,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -212,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -285,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context) { + default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 96456e5f7bd6..4bb1a847bfec 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index fb689b13f943..82f384263053 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index b137d4893138..3c4b48147659 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -27,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -102,6 +105,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -134,7 +174,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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, + @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, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByStatus(status, pageable); @@ -175,7 +215,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 1218abedfa61..8e6b6b5b1a90 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index e14cc23e791d..78908a94d9ec 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -14,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -63,7 +65,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -93,7 +95,7 @@ default ResponseEntity> findPetsByStatus(List status, final Pa * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { + default ResponseEntity> findPetsByTags(List<String> tags, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index a762977831cb..727eb3fbc5a5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -25,6 +25,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52a8..28551937ad88 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 7385ea73b137..0afc3fb65528 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -26,6 +26,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index c39231c6b299..9e08af2f7d63 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 365220e63aa7..eebe41a5ac4c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default AnotherFakeApiDelegate getDelegate() { return new AnotherFakeApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2d5e24bcd5f6..530485bfbc83 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 12db61228632..a1aa77cf9f30 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -34,6 +36,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default FakeApiDelegate getDelegate() { return new FakeApiDelegate() {}; } @@ -328,6 +331,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -359,12 +613,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -490,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java index 8e624ba5fb59..9c6a27f79725 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index 397c677c9949..c2b0582891a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -21,7 +23,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeApi.*; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -212,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -285,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List pipe, - List ioutil, - List http, - List url, - List context) { + default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, + List<String> ioutil, + List<String> http, + List<String> url, + List<String> context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 96456e5f7bd6..4bb1a847bfec 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -24,6 +24,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default FakeClassnameTestApiDelegate getDelegate() { return new FakeClassnameTestApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index fb689b13f943..82f384263053 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index b137d4893138..3c4b48147659 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -27,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default PetApiDelegate getDelegate() { return new PetApiDelegate() {}; } @@ -102,6 +105,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -134,7 +174,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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, + @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, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByStatus(status, pageable); @@ -175,7 +215,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java index 1218abedfa61..8e6b6b5b1a90 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index e14cc23e791d..78908a94d9ec 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -14,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.PetApi.*; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. @@ -63,7 +65,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -93,7 +95,7 @@ default ResponseEntity> findPetsByStatus(List status, final Pa * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { + default ResponseEntity> findPetsByTags(List<String> tags, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index a762977831cb..727eb3fbc5a5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -25,6 +25,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default StoreApiDelegate getDelegate() { return new StoreApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52a8..28551937ad88 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 7385ea73b137..0afc3fb65528 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -26,6 +26,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default UserApiDelegate getDelegate() { return new UserApiDelegate() {}; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index c39231c6b299..9e08af2f7d63 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; - +import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6785adaf0a94..ebb4df89172d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 26c3a96c223b..f2419b4d8e75 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -390,12 +644,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 42c92acbd22c..b1c6810771c8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index d42bccf617bc..b265e8c1312c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -31,6 +33,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -108,6 +111,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -140,7 +180,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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, + @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, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { @@ -196,7 +236,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 58de86d8ac79..635128ff6bc5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 91816bef3223..583b891e5ca0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 68ab1ce6d8e2..22fa71dd51b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6785adaf0a94..ebb4df89172d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 26c3a96c223b..f2419b4d8e75 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -390,12 +644,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 42c92acbd22c..b1c6810771c8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index d42bccf617bc..b265e8c1312c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -31,6 +33,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -108,6 +111,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -140,7 +180,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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, + @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, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { @@ -196,7 +236,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java index 58de86d8ac79..635128ff6bc5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java @@ -4,6 +4,8 @@ import org.openapitools.model.ModelApiResponse; import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 91816bef3223..583b891e5ca0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 68ab1ce6d8e2..22fa71dd51b2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } 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 6785adaf0a94..ebb4df89172d 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 @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } 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 83342f00f497..006e225157fd 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 @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -390,12 +644,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 42c92acbd22c..b1c6810771c8 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 @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } 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 2a673ab1da0d..4b32d773b52a 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 @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -107,6 +110,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -139,7 +179,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -194,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 91816bef3223..583b891e5ca0 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 @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } 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 68ab1ce6d8e2..22fa71dd51b2 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 @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } 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 da1001f33f89..ca4027e9944e 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 @@ -38,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } 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 3537e3eebde1..4a7854fde9ac 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 @@ -16,6 +16,8 @@ import org.openapitools.virtualan.model.OuterComposite; import org.openapitools.virtualan.model.User; import org.openapitools.virtualan.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -48,6 +50,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -368,6 +371,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -399,12 +653,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -533,11 +787,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java index d733bfab3a46..1b7be06a3dad 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.virtualan.model.OuterComposite; import org.openapitools.virtualan.model.User; import org.openapitools.virtualan.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 7a7f87f532ef..a207bf425a51 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 @@ -38,6 +38,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } 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 84227a3f9847..1882c91011ed 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 @@ -8,6 +8,8 @@ import org.openapitools.virtualan.model.ModelApiResponse; import org.openapitools.virtualan.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -40,6 +42,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -111,6 +114,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -141,7 +181,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -194,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java index 0b171a217de1..c784abf4ab55 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.virtualan.model.ModelApiResponse; import org.openapitools.virtualan.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 92f8cbedc598..b11048a5a166 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 @@ -39,6 +39,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } 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 c8b443be43da..6d38c0fe61c1 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 @@ -40,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } 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 6785adaf0a94..ebb4df89172d 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 @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface AnotherFakeApi { + default Optional getRequest() { return Optional.empty(); } 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 6d706b8c5d11..5a47d8799a13 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 @@ -16,6 +16,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -38,6 +40,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeApi { + default Optional getRequest() { return Optional.empty(); } @@ -359,6 +362,257 @@ default ResponseEntity testEndpointParameters( } + /** + * Gets or Sets enumHeaderStringArray + */ + public enum EnumHeaderStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumHeaderStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringArrayEnum fromValue(String value) { + for (EnumHeaderStringArrayEnum b : EnumHeaderStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Header parameter enum test (string) + */ + public enum EnumHeaderStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumHeaderStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumHeaderStringEnum fromValue(String value) { + for (EnumHeaderStringEnum b : EnumHeaderStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Gets or Sets enumQueryStringArray + */ + public enum EnumQueryStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumQueryStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringArrayEnum fromValue(String value) { + for (EnumQueryStringArrayEnum b : EnumQueryStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (string) + */ + public enum EnumQueryStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumQueryStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryStringEnum fromValue(String value) { + for (EnumQueryStringEnum b : EnumQueryStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_2(-2); + + private Integer value; + + EnumQueryIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryIntegerEnum fromValue(Integer value) { + for (EnumQueryIntegerEnum b : EnumQueryIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Query parameter enum test (double) + */ + public enum EnumQueryDoubleEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumQueryDoubleEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumQueryDoubleEnum fromValue(Double value) { + for (EnumQueryDoubleEnum b : EnumQueryDoubleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + /** + * Form parameter enum test (string) + */ + public enum EnumFormStringEnum { + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumFormStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringEnum fromValue(String value) { + for (EnumFormStringEnum b : EnumFormStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /fake : To test enum parameters * To test enum parameters @@ -390,12 +644,12 @@ default ResponseEntity testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, - @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") EnumHeaderStringEnum enumHeaderString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { @@ -525,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java index b30f53bb595c..07f90cb98460 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java @@ -11,6 +11,8 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 42c92acbd22c..b1c6810771c8 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 @@ -28,6 +28,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface FakeClassnameTestApi { + default Optional getRequest() { return Optional.empty(); } 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 83472dd0247f..67a35758c1dd 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 @@ -8,6 +8,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +32,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface PetApi { + default Optional getRequest() { return Optional.empty(); } @@ -107,6 +110,43 @@ default ResponseEntity deletePet( } + /** + * Gets or Sets status + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * GET /pet/findByStatus : Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -139,7 +179,7 @@ default ResponseEntity deletePet( produces = { "application/xml", "application/json" } ) default 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 + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -194,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java index 0b88e5980bf1..39d74a72c4ab 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -3,6 +3,8 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.beans.factory.annotation.Autowired; 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 91816bef3223..583b891e5ca0 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 @@ -29,6 +29,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface StoreApi { + default Optional getRequest() { return Optional.empty(); } 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 68ab1ce6d8e2..22fa71dd51b2 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 @@ -30,6 +30,7 @@ @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public interface UserApi { + default Optional getRequest() { return Optional.empty(); } From ca6d1ebec178c48094485731a582740b32f3e189 Mon Sep 17 00:00:00 2001 From: Zomzog Date: Mon, 5 Sep 2022 01:33:32 +0200 Subject: [PATCH 2/8] typo --- .../src/main/resources/JavaSpring/optionalDataType.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache index 52ffe291a15c..badc910b4af9 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache @@ -1 +1 @@ -{{#useOptional}}{{#required}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}{{/useOptional}} \ No newline at end of file +{{#useOptional}}{{#required}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}{{/useOptional}} \ No newline at end of file From 2007265a18b8e83236368728117ce6a49cc06128 Mon Sep 17 00:00:00 2001 From: Zomzog Date: Mon, 12 Sep 2022 20:44:04 +0200 Subject: [PATCH 3/8] regenerate samples --- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/api/FakeApiDelegate.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../main/java/org/openapitools/api/PetApiDelegate.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/virtualan/api/FakeApi.java | 10 +++++----- .../java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 10 +++++----- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- 70 files changed, 178 insertions(+), 178 deletions(-) diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index b9153eeb6c1b..3f23850c085e 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -203,7 +203,7 @@ CompletableFuture>> findPetsByStatus( produces = "application/json" ) CompletableFuture>> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index 7a23c87ec6cb..98e7fb2b422a 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -206,7 +206,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 8c5e1cca6aab..30de2b096317 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -205,7 +205,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 7a23c87ec6cb..98e7fb2b422a 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -206,7 +206,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index 699c9eff1886..047dfff0203c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -203,7 +203,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 1112fcdadfd2..0ee7e7ef428e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -196,7 +196,7 @@ CompletableFuture>> findPetsByStatus( produces = "application/json" ) CompletableFuture>> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 971e12d27627..6a694e057ea2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -708,11 +708,11 @@ ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index df6dd72aa4d9..f6a825af48a0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -200,7 +200,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 118a12b55235..92f9b90d8930 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -198,7 +198,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ParameterObject final Pageable pageable ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index d07e7ebd8c06..97ef36a7fe67 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -203,7 +203,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index b9ad5dbb2e74..27f1f8745fca 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -195,7 +195,7 @@ ResponseEntity> findPetsByStatus( produces = "application/json" ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index aa85fadf4177..172b1db5f450 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -222,7 +222,7 @@ default ResponseEntity> findPetsByStatus( produces = "application/json" ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index 6f98eafb392c..4f3c14381087 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -244,7 +244,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index 3afc7d858cd0..0e1dc31152fd 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -244,7 +244,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 5e995c6098e5..3160a5145244 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -770,11 +770,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index fdfd67362ae7..68be611d663d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -227,7 +227,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 9d1cbb170663..b603137e9cae 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -735,11 +735,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index b47196d554a9..847323efef7d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -287,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context) { + default ResponseEntity testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 7760c0dcaa75..801741a64596 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -206,7 +206,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { return getDelegate().findPetsByTags(tags); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index ea34cdaa0eaa..b8c66446f3b7 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -94,7 +94,7 @@ default ResponseEntity> findPetsByStatus(List status) { * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(Set<String> tags) { + default ResponseEntity> findPetsByTags(Set tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index ab6c646e4a20..4f54a01aa439 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -698,11 +698,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 781591484cae..92792ec3edc0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -228,7 +228,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 80fa26d88381..c2d3525e306c 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -752,11 +752,11 @@ default Mono> testJsonFormData( value = "/fake/test-query-parameters" ) default Mono> testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context, + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, @Parameter(hidden = true) final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index ad070860d492..7aaa24f36f76 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -326,11 +326,11 @@ default Mono> testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default Mono> testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context, + default Mono> testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 3e88293dabd4..5b4f19b76f8b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -213,7 +213,7 @@ default Mono>> findPetsByStatus( produces = { "application/xml", "application/json" } ) default Mono>> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags, + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, @Parameter(hidden = true) final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index fd6f8ff88f53..b13fc70b970d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -105,7 +105,7 @@ default Mono>> findPetsByStatus(List status * @see PetApi#findPetsByTags */ @Deprecated - default Mono>> findPetsByTags(Set<String> tags, + default Mono>> findPetsByTags(Set tags, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index b30e89afc276..82ef3f6c569e 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -179,7 +179,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 1ec5162790e7..1d819dc054c4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -770,11 +770,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 11c365e65e03..dff9d3cfd031 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -227,7 +227,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 6f98eafb392c..4f3c14381087 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -244,7 +244,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 64e285760f9b..d53222f31023 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -709,11 +709,11 @@ ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index 8bdde92817f3..a1b987f80933 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -200,7 +200,7 @@ ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) throws Exception; diff --git a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index f6bf08397dcc..a586dccc8250 100644 --- a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -229,7 +229,7 @@ default ResponseEntity> findPetsByStatus( produces = "application/json" ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 5a47d8799a13..e7355cf57a14 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -779,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 67a35758c1dd..7172f14b095d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 5a47d8799a13..e7355cf57a14 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -779,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 67a35758c1dd..7172f14b095d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 0dcc27ea58f8..bb1b007c3e5d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -744,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } 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 b47196d554a9..847323efef7d 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 @@ -287,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context) { + default ResponseEntity testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 44a6ead01717..f7416d4c02b1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -213,7 +213,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { return getDelegate().findPetsByTags(tags); } 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 ea34cdaa0eaa..b8c66446f3b7 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 @@ -94,7 +94,7 @@ default ResponseEntity> findPetsByStatus(List status) { * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(Set<String> tags) { + default ResponseEntity> findPetsByTags(Set tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 0dcc27ea58f8..bb1b007c3e5d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -744,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index b47196d554a9..847323efef7d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -287,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context) { + default ResponseEntity testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 44a6ead01717..f7416d4c02b1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -213,7 +213,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { return getDelegate().findPetsByTags(tags); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index ea34cdaa0eaa..b8c66446f3b7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -94,7 +94,7 @@ default ResponseEntity> findPetsByStatus(List status) { * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(Set<String> tags) { + default ResponseEntity> findPetsByTags(Set tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index 0328df246685..28b4dcd5f1a7 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -177,7 +177,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List<String> tags + @NotNull @Valid @RequestParam(value = "tags", required = true) List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 30f40b0b0d14..b2e6e48c329f 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 @@ -707,11 +707,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 969d0aca18c5..fe8a283515bc 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 @@ -235,7 +235,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index c8f7cf4c6b31..da18a35bb4d1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -762,11 +762,11 @@ default Mono> testJsonFormData( value = "/fake/test-query-parameters" ) default Mono> testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); 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 70ce758f23f9..2cd4293fd046 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 @@ -327,11 +327,11 @@ default Mono> testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default Mono> testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context, + default Mono> testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index b80b5bdd8940..5276ab0453b4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -221,7 +221,7 @@ default Mono>> findPetsByStatus( produces = { "application/xml", "application/json" } ) default Mono>> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); 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 6af7e0d7a429..66ac8842ff12 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 @@ -106,7 +106,7 @@ default Mono>> findPetsByStatus(List status * @see PetApi#findPetsByTags */ @Deprecated - default Mono>> findPetsByTags(Set<String> tags, + default Mono>> findPetsByTags(Set tags, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index a1aa77cf9f30..8bc07b141053 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -744,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index c2b0582891a8..e662bac8688a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -287,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context) { + default ResponseEntity testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 3c4b48147659..8f6f9b4ae01e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 78908a94d9ec..c1536b5fb362 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -95,7 +95,7 @@ default ResponseEntity> findPetsByStatus(List status, fina * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(List<String> tags, final Pageable pageable) { + default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index a1aa77cf9f30..8bc07b141053 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -744,11 +744,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index c2b0582891a8..e662bac8688a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -287,11 +287,11 @@ default ResponseEntity testJsonFormData(String param, * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - default ResponseEntity testQueryParameterCollectionFormat(List<String> pipe, - List<String> ioutil, - List<String> http, - List<String> url, - List<String> context) { + default ResponseEntity testQueryParameterCollectionFormat(List pipe, + List ioutil, + List http, + List url, + List context) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 3c4b48147659..8f6f9b4ae01e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index 78908a94d9ec..c1536b5fb362 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -95,7 +95,7 @@ default ResponseEntity> findPetsByStatus(List status, fina * @see PetApi#findPetsByTags */ @Deprecated - default ResponseEntity> findPetsByTags(List<String> tags, final Pageable pageable) { + default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index f2419b4d8e75..c0ee801e6f0a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -779,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index b265e8c1312c..ff9eef776acb 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -236,7 +236,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index f2419b4d8e75..c0ee801e6f0a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -779,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index b265e8c1312c..ff9eef776acb 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -236,7 +236,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { 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 006e225157fd..135a12ddb2c0 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 @@ -779,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 4b32d773b52a..407edfc493e3 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 @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 4a7854fde9ac..242f67c08340 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 @@ -787,11 +787,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 1882c91011ed..6a6fddb1839c 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 @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 5a47d8799a13..e7355cf57a14 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 @@ -779,11 +779,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 67a35758c1dd..7172f14b095d 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 @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { From 7c49f88216974d61edb5a45963ac9261dc01a863 Mon Sep 17 00:00:00 2001 From: Zomzog Date: Mon, 12 Sep 2022 20:44:47 +0200 Subject: [PATCH 4/8] review --- .../org/openapitools/codegen/languages/SpringCodegen.java | 5 ----- 1 file changed, 5 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 9ecaaa081ff9..a3d29f6e1b74 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 @@ -900,11 +900,6 @@ public void setUnhandledException(boolean unhandledException) { this.unhandledException = unhandledException; } - @Override - protected void updateModelForObject(CodegenModel m, Schema schema) { - super.updateModelForObject(m, schema); // PONY - } - @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); From d73e5fa136022952fac1181e939674f4b3872fd4 Mon Sep 17 00:00:00 2001 From: Zomzog Date: Mon, 12 Sep 2022 21:14:06 +0200 Subject: [PATCH 5/8] Review --- .../resources/JavaSpring/apiDelegate.mustache | 15 ++++++++++++++- .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - .../openapitools/api/AnotherFakeApiDelegate.java | 1 - .../org/openapitools/api/FakeApiDelegate.java | 8 +++++++- .../api/FakeClassnameTestApiDelegate.java | 1 - .../java/org/openapitools/api/PetApiDelegate.java | 2 +- .../org/openapitools/api/StoreApiDelegate.java | 1 - .../org/openapitools/api/UserApiDelegate.java | 1 - 43 files changed, 70 insertions(+), 43 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index 946256c2cdfb..5ba8221169ff 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -26,8 +26,21 @@ import jakarta.annotation.Generated; {{^useJakartaEe}} import javax.annotation.Generated; {{/useJakartaEe}} -import static {{package}}.{{classname}}.*; {{#operations}} + {{#operation}} + {{#allParams}} + {{#isEnum}} + {{^isContainer}} +import static {{package}}.{{classname}}.{{datatypeWithEnum}}; + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +import static {{package}}.{{classname}}.{{datatypeWithEnum}}; + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{/allParams}} + {{/operation}} /** * A delegate to be called by the {@link {{classname}}Controller}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 530485bfbc83..3635c88266ad 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 847323efef7d..d206827c3752 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -23,7 +23,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 82f384263053..717d33b9d20b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index b8c66446f3b7..86a72121acb2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index 28551937ad88..94cedd34cf45 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 9e08af2f7d63..93b7a4515515 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 995e6abb6d0a..6a9dbb5c7108 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -15,7 +15,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 7aaa24f36f76..7f89883b21ba 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -27,7 +27,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index bbbdc4e4cc0c..07bc1b1f248f 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -15,7 +15,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index b13fc70b970d..9e54f8773d62 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index 6a87c543143e..d176661eac40 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index c6e16fec5767..88c272876d58 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -17,7 +17,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 530485bfbc83..3635c88266ad 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 @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 847323efef7d..d206827c3752 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 @@ -23,7 +23,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 82f384263053..717d33b9d20b 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 @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 b8c66446f3b7..86a72121acb2 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 @@ -15,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 28551937ad88..94cedd34cf45 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 @@ -12,7 +12,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 9e08af2f7d63..93b7a4515515 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 @@ -13,7 +13,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 530485bfbc83..3635c88266ad 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 847323efef7d..d206827c3752 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -23,7 +23,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 82f384263053..717d33b9d20b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index b8c66446f3b7..86a72121acb2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index 28551937ad88..94cedd34cf45 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 9e08af2f7d63..93b7a4515515 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 938c586dee8f..139aebac249d 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 @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 2cd4293fd046..47d1971e993b 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 @@ -28,7 +28,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 78dac26ab509..cbafb0e6519c 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 @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 66ac8842ff12..e52d4c0b43ae 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 @@ -20,7 +20,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 9c0da0f72373..f5bd05992f20 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 @@ -17,7 +17,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. 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 288824b9c45c..1e7dca783355 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 @@ -18,7 +18,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 530485bfbc83..3635c88266ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index e662bac8688a..713c92c6d2be 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -23,7 +23,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 82f384263053..717d33b9d20b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index c1536b5fb362..afdcb092193c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index 28551937ad88..94cedd34cf45 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index 9e08af2f7d63..93b7a4515515 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 530485bfbc83..3635c88266ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.AnotherFakeApi.*; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index e662bac8688a..713c92c6d2be 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -23,7 +23,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeApi.*; +import static org.openapitools.api.FakeApi.EnumHeaderStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumHeaderStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringArrayEnum; +import static org.openapitools.api.FakeApi.EnumQueryStringEnum; +import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; +import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 82f384263053..717d33b9d20b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.FakeClassnameTestApi.*; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index c1536b5fb362..afdcb092193c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.PetApi.*; +import static org.openapitools.api.PetApi.StatusEnum; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java index 28551937ad88..94cedd34cf45 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -12,7 +12,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.StoreApi.*; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index 9e08af2f7d63..93b7a4515515 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -13,7 +13,6 @@ import java.util.Map; import java.util.Optional; import javax.annotation.Generated; -import static org.openapitools.api.UserApi.*; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. From ea29642b904a4f2426724bf8796bfa190bd6702e Mon Sep 17 00:00:00 2001 From: Zomzog Date: Sun, 25 Sep 2022 21:52:22 +0200 Subject: [PATCH 6/8] Solve array enums --- .../openapitools/codegen/DefaultCodegen.java | 17 ++++-- .../resources/JavaSpring/dataType.mustache | 1 + .../resources/JavaSpring/formParams.mustache | 2 +- .../JavaSpring/optionalDataType.mustache | 2 +- .../main/default/classes/OASOrder.cls | 2 +- .../force-app/main/default/classes/OASPet.cls | 2 +- .../docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../docs/apis/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 12 ++-- .../docs/apis/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 10 +-- .../docs/apis/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 10 +-- .../OpenAPIClient-httpclient/docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../OpenAPIClient-net47/docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../OpenAPIClient-net5.0/docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../OpenAPIClient/docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../OpenAPIClientCore/docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../csharp/OpenAPIClient/docs/FakeApi.md | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++--- .../petstore/go/go-petstore/docs/FakeApi.md | 2 +- .../docs/apis/FakeApi.md | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/apache-httpclient/docs/FakeApi.md | 6 +- .../java/apache-httpclient/docs/PetApi.md | 2 +- .../java/google-api-client/docs/FakeApi.md | 6 +- .../java/google-api-client/docs/PetApi.md | 2 +- .../petstore/java/jersey1/docs/FakeApi.md | 6 +- .../petstore/java/jersey1/docs/PetApi.md | 2 +- .../docs/FakeApi.md | 6 +- .../docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 6 +- .../java/jersey2-java8/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../petstore/java/jersey3/docs/FakeApi.md | 6 +- .../petstore/java/jersey3/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../docs/PetApi.md | 2 +- .../microprofile-rest-client/docs/PetApi.md | 2 +- .../java/native-async/docs/FakeApi.md | 12 ++-- .../petstore/java/native-async/docs/PetApi.md | 4 +- .../petstore/java/native/docs/FakeApi.md | 12 ++-- .../petstore/java/native/docs/PetApi.md | 4 +- .../docs/FakeApi.md | 6 +- .../docs/PetApi.md | 2 +- .../docs/PetApi.md | 2 +- .../docs/FakeApi.md | 6 +- .../docs/PetApi.md | 2 +- .../petstore/java/okhttp-gson/docs/FakeApi.md | 6 +- .../petstore/java/okhttp-gson/docs/PetApi.md | 2 +- .../java/rest-assured-jackson/docs/FakeApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/rest-assured/docs/FakeApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../petstore/java/resteasy/docs/FakeApi.md | 6 +- .../petstore/java/resteasy/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 2 +- .../java/resttemplate-withXml/docs/FakeApi.md | 6 +- .../java/resttemplate-withXml/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/resttemplate/docs/FakeApi.md | 6 +- .../petstore/java/resttemplate/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/retrofit2-play26/docs/FakeApi.md | 6 +- .../java/retrofit2-play26/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 2 +- .../petstore/java/retrofit2/docs/FakeApi.md | 6 +- .../petstore/java/retrofit2/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 2 +- .../java/retrofit2rx2/docs/FakeApi.md | 6 +- .../petstore/java/retrofit2rx2/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 2 +- .../java/retrofit2rx3/docs/FakeApi.md | 6 +- .../petstore/java/retrofit2rx3/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 2 +- .../java/vertx-no-nullable/docs/FakeApi.md | 6 +- .../java/vertx-no-nullable/docs/PetApi.md | 2 +- .../openapitools/client/api/FakeApiImpl.java | 4 +- .../client/api/rxjava/FakeApi.java | 8 +-- .../petstore/java/vertx/docs/FakeApi.md | 6 +- .../client/petstore/java/vertx/docs/PetApi.md | 2 +- .../openapitools/client/api/FakeApiImpl.java | 4 +- .../client/api/rxjava/FakeApi.java | 8 +-- .../petstore/java/webclient/docs/FakeApi.md | 8 +-- .../petstore/java/webclient/docs/PetApi.md | 2 +- .../swift5/alamofireLibrary/docs/FakeAPI.md | 2 +- .../swift5/asyncAwaitLibrary/docs/FakeAPI.md | 2 +- .../swift5/combineLibrary/docs/FakeAPI.md | 2 +- .../petstore/swift5/default/docs/FakeAPI.md | 2 +- .../swift5/frozenEnums/docs/FakeAPI.md | 2 +- .../swift5/nonPublicApi/docs/FakeAPI.md | 2 +- .../swift5/objcCompatible/docs/FakeAPI.md | 2 +- .../swift5/promisekitLibrary/docs/FakeAPI.md | 2 +- .../swift5/readonlyProperties/docs/FakeAPI.md | 2 +- .../swift5/resultLibrary/docs/FakeAPI.md | 2 +- .../swift5/rxswiftLibrary/docs/FakeAPI.md | 2 +- .../swift5/urlsessionLibrary/docs/FakeAPI.md | 2 +- .../swift5/vaporLibrary/docs/FakeAPI.md | 2 +- .../swift5/x-swift-hashable/docs/FakeAPI.md | 2 +- .../java/jersey2-java8/docs/FakeApi.md | 6 +- .../java/jersey2-java8/docs/PetApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 61 +++++++++++++++---- .../java/org/openapitools/api/PetApi.java | 12 ++-- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 10 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../org/openapitools/api/FakeApiDelegate.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 61 +++++++++++++++---- .../java/org/openapitools/api/PetApi.java | 12 ++-- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 10 +-- .../openapitools/virtualan/api/FakeApi.java | 41 ++++++++++++- .../java/org/openapitools/api/FakeApi.java | 41 ++++++++++++- 149 files changed, 1088 insertions(+), 373 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/dataType.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index f6a26a8dfe95..93f573780c71 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3767,9 +3767,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo Map allowableValues = new HashMap<>(); allowableValues.put("values", _enum); - if (allowableValues.size() > 0) { - property.allowableValues = allowableValues; - } + property.allowableValues = allowableValues; } Schema referencedSchema = ModelUtils.getReferencedSchema(this.openAPI, p); @@ -3868,6 +3866,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo property.isModel = (ModelUtils.isComposedSchema(referencedSchema) || ModelUtils.isObjectSchema(referencedSchema)) && ModelUtils.isModel(referencedSchema); } + updateCodegenPropertyEnum(property); LOGGER.debug("debugging from property return: {}", property); schemaCodegenPropertyCache.put(ns, property); return property; @@ -6724,9 +6723,13 @@ public CodegenParameter fromFormProperty(String name, Schema propertySchema, Set ; } else if (ModelUtils.isArraySchema(ps)) { Schema inner = getSchemaItems((ArraySchema) ps); - CodegenProperty arrayInnerProperty = fromProperty("inner", inner, false); + CodegenProperty arrayInnerProperty = fromProperty(getNameOrInner(ps), inner, false); codegenParameter.items = arrayInnerProperty; - codegenParameter.mostInnerItems = arrayInnerProperty.mostInnerItems; + if (arrayInnerProperty.mostInnerItems == null) { + codegenParameter.mostInnerItems = arrayInnerProperty; + } else { + codegenParameter.mostInnerItems = arrayInnerProperty.mostInnerItems; + } codegenParameter.isPrimitiveType = false; codegenParameter.isContainer = true; // hoist items data into the array property @@ -6799,6 +6802,10 @@ public CodegenParameter fromFormProperty(String name, Schema propertySchema, Set return codegenParameter; } + private static String getNameOrInner(Schema ps) { + return ps.getName() == null ? "inner": ps.getName(); + } + protected void addBodyModelSchema(CodegenParameter codegenParameter, String name, Schema schema, Set imports, String bodyParameterName, boolean forceSimpleRef) { CodegenModel codegenModel = null; if (StringUtils.isNotBlank(name)) { diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/dataType.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/dataType.mustache new file mode 100644 index 000000000000..dbf41962fe7a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/dataType.mustache @@ -0,0 +1 @@ +{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache index b0819f315b76..319b559190a8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}){{>dateTimeParam}} {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{>paramDoc}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}){{>dateTimeParam}} {{>dataType}} {{paramName}}{{/isFile}}{{#isFile}}{{>paramDoc}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache index badc910b4af9..1c0c8a207dc2 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache @@ -1 +1 @@ -{{#useOptional}}{{#required}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}{{/useOptional}} \ No newline at end of file +{{#useOptional}}{{#required}}{{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{}dataType}}}{{/datatypeWithEnum}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{>dataType}}>{{/required}}{{/useOptional}}{{^useOptional}}{{>dataType}}{{/useOptional}} \ No newline at end of file diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASOrder.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASOrder.cls index 641462b2e6c6..7943776b9535 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/OASOrder.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASOrder.cls @@ -69,7 +69,7 @@ public class OASOrder { order.petId = 123456789L; order.quantity = 0; order.shipDate = Datetime.newInstanceGmt(2000, 1, 23, 4, 56, 7); - order.status = StatusEnum.PLACED; + order.status = StatusEnum.STATUSENUM_PLACED; order.complete = true; return order; } diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASPet.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASPet.cls index b97944478972..8ec583f00821 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/OASPet.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASPet.cls @@ -71,7 +71,7 @@ public class OASPet { pet.name = 'doggie'; pet.photoUrls = new List{''}; pet.tags = new List{OASTag.getExample()}; - pet.status = StatusEnum.AVAILABLE; + pet.status = StatusEnum.STATUSENUM_AVAILABLE; return pet; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md index 46d135e359f8..d4a2a87c52f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b78c..56952018a842 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/FakeApi.cs @@ -285,7 +285,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -711,7 +711,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -731,7 +731,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2527,7 +2527,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -2546,7 +2546,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -2635,7 +2635,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2655,7 +2655,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md index c1202fdbf367..9b10a1947c0f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) - var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | | **enumHeaderString** | **string?** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryString** | **string?** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string?** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs index da538a367ba5..9a21aa2b0740 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs @@ -437,7 +437,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> @@ -456,7 +456,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> @@ -474,7 +474,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> @@ -2007,7 +2007,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOpt /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> @@ -2031,7 +2031,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOpt /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> @@ -2061,7 +2061,7 @@ public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOpt /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md index dd5e3225a65a..363a02634c43 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs index 23fd9c57a981..ba3c538b82f6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -293,7 +293,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> @@ -312,7 +312,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> @@ -1712,7 +1712,7 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> @@ -1736,7 +1736,7 @@ public async Task TestEnumParametersAsync(List enumHeaderStringA /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> @@ -1766,7 +1766,7 @@ public async Task TestEnumParametersOrDefaultAsync(List enumHead /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md index dd5e3225a65a..363a02634c43 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs index cad800bddfba..20946017b347 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -293,7 +293,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> @@ -312,7 +312,7 @@ public interface IFakeApi : IApi /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> @@ -1712,7 +1712,7 @@ public async Task> TestEndpointParametersWithHttpInfoAsync(d /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> @@ -1736,7 +1736,7 @@ public async Task TestEnumParametersAsync(List enumHeaderStringA /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> @@ -1766,7 +1766,7 @@ public async Task TestEnumParametersOrDefaultAsync(List enumHead /// Query parameter enum test (double) (optional) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md index 53a8b4e4eb4b..01ce63c99e57 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md @@ -998,7 +998,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1044,7 +1044,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs index 542c9dadd54b..05ca3e295c58 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -265,7 +265,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); @@ -283,7 +283,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); @@ -661,7 +661,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of void @@ -680,7 +680,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse @@ -2286,7 +2286,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) @@ -2304,7 +2304,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) @@ -2381,7 +2381,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of void @@ -2400,7 +2400,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md index 46d135e359f8..d4a2a87c52f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b78c..56952018a842 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/FakeApi.cs @@ -285,7 +285,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -711,7 +711,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -731,7 +731,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2527,7 +2527,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -2546,7 +2546,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -2635,7 +2635,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2655,7 +2655,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md index 46d135e359f8..d4a2a87c52f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b78c..56952018a842 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -285,7 +285,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -711,7 +711,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -731,7 +731,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2527,7 +2527,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -2546,7 +2546,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -2635,7 +2635,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2655,7 +2655,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index 46d135e359f8..d4a2a87c52f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b78c..56952018a842 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -285,7 +285,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -711,7 +711,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -731,7 +731,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2527,7 +2527,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -2546,7 +2546,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -2635,7 +2635,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2655,7 +2655,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index 46d135e359f8..d4a2a87c52f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b78c..56952018a842 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -285,7 +285,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -711,7 +711,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -731,7 +731,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2527,7 +2527,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -2546,7 +2546,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -2635,7 +2635,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2655,7 +2655,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index 426116d6367d..b9cb142790f4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -983,7 +983,7 @@ namespace Example var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumQueryModelArray = new List(); // List | (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1014,7 +1014,7 @@ Name | Type | Description | Notes **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index f8008a03ec63..dcb26b2e1704 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -321,7 +321,7 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)); @@ -340,7 +340,7 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)); @@ -774,7 +774,7 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of void @@ -794,7 +794,7 @@ public interface IFakeApi : IApiAccessor /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse @@ -2899,7 +2899,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)) @@ -2918,7 +2918,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)) @@ -2985,7 +2985,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of void @@ -3006,7 +3006,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient modelCl /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) /// (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel request (optional) /// Task of ApiResponse diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index e51cddca5bda..065153a9a231 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -661,7 +661,7 @@ func main() { enumQueryString := "enumQueryString_example" // string | Query parameter enum test (string) (optional) (default to "-efg") enumQueryInteger := int32(56) // int32 | Query parameter enum test (double) (optional) enumQueryDouble := float64(1.2) // float64 | Query parameter enum test (double) (optional) - enumFormStringArray := []string{"Inner_example"} // []string | Form parameter enum test (string array) (optional) (default to "$") + enumFormStringArray := []string{"EnumFormStringArray_example"} // []string | Form parameter enum test (string array) (optional) (default to "$") enumFormString := "enumFormString_example" // string | Form parameter enum test (string) (optional) (default to "-efg") configuration := openapiclient.NewConfiguration() diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md index 373605d3107c..a62672fbc472 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md @@ -301,7 +301,7 @@ To test enum parameters | **enumQueryString** | `String`| Query parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | | **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, `-2`] | | **enumQueryDouble** | `Double`| Query parameter enum test (double) | [optional parameter] [enum: `1.1`, `-1.2`] | -| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional parameter] [default to `$`] [enum: `>`, `$`] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional parameter] [default to `EnumFormStringArrayEnum.DOLLAR`] [enum: `>`, `$`] | | **enumFormString** | `String`| Form parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java index bf573e43dff4..718c53e0a2b8 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java @@ -184,7 +184,7 @@ Mono testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) */ @Get(uri="/fake") diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 25301e7502c3..1293a8605cae 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/apache-httpclient/docs/PetApi.md b/samples/client/petstore/java/apache-httpclient/docs/PetApi.md index 1e79e30ef6c2..e11e87277eb6 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/PetApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 25301e7502c3..1293a8605cae 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md index 1e79e30ef6c2..e11e87277eb6 100644 --- a/samples/client/petstore/java/google-api-client/docs/PetApi.md +++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index 25301e7502c3..1293a8605cae 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md index 1e79e30ef6c2..e11e87277eb6 100644 --- a/samples/client/petstore/java/jersey1/docs/PetApi.md +++ b/samples/client/petstore/java/jersey1/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index 438fa9fae14c..c80767afc21e 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -667,13 +667,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md index 57e78be6d9e5..f6ff71cba538 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/PetApi.md @@ -183,7 +183,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java index 6c1055a81fe9..6cf1f5f2d484 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java @@ -712,7 +712,7 @@ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, D * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call * @http.response.details @@ -735,7 +735,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index f0c93223e4ad..2251a2041bfa 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -667,13 +667,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index 57e78be6d9e5..f6ff71cba538 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -183,7 +183,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index a7709eb02847..a0bbe354a4dd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -712,7 +712,7 @@ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, D * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call * @http.response.details @@ -735,7 +735,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/jersey3/docs/FakeApi.md b/samples/client/petstore/java/jersey3/docs/FakeApi.md index 00365edeae97..0af982136ca1 100644 --- a/samples/client/petstore/java/jersey3/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey3/docs/FakeApi.md @@ -723,13 +723,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("InnerEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey3/docs/PetApi.md b/samples/client/petstore/java/jersey3/docs/PetApi.md index eb2957e47054..40f97ee368e2 100644 --- a/samples/client/petstore/java/jersey3/docs/PetApi.md +++ b/samples/client/petstore/java/jersey3/docs/PetApi.md @@ -187,7 +187,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java index 9f2482642dfa..3abfc22c520e 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java @@ -769,7 +769,7 @@ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, D * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to InnerEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call * @http.response.details @@ -792,7 +792,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to InnerEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md index fb5361b0808f..abf5b15731cf 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/PetApi.md @@ -189,7 +189,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md b/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md index fdc9c56bd004..42f89847d076 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/PetApi.md @@ -184,7 +184,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index 3ecae4a48cc0..05b5e27ee5c4 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1405,13 +1405,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { CompletableFuture result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -1486,13 +1486,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { CompletableFuture> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/native-async/docs/PetApi.md b/samples/client/petstore/java/native-async/docs/PetApi.md index 555643777888..1d5ec42fe1f8 100644 --- a/samples/client/petstore/java/native-async/docs/PetApi.md +++ b/samples/client/petstore/java/native-async/docs/PetApi.md @@ -357,7 +357,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { CompletableFuture> result = apiInstance.findPetsByStatus(status); System.out.println(result.get()); @@ -430,7 +430,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { CompletableFuture>> response = apiInstance.findPetsByStatusWithHttpInfo(status); System.out.println("Status code: " + response.get().getStatusCode()); diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index 7a35dbf48d2b..6900bbc48652 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1323,13 +1323,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -1403,13 +1403,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { ApiResponse response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/native/docs/PetApi.md b/samples/client/petstore/java/native/docs/PetApi.md index 9ee7f49c4ebc..2f2782985406 100644 --- a/samples/client/petstore/java/native/docs/PetApi.md +++ b/samples/client/petstore/java/native/docs/PetApi.md @@ -338,7 +338,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); @@ -410,7 +410,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { ApiResponse> response = apiInstance.findPetsByStatusWithHttpInfo(status); System.out.println("Status code: " + response.getStatusCode()); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index f804c0e19404..fa949e967fb3 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -630,13 +630,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md index 4309006d5720..12bfc3199357 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/PetApi.md @@ -175,7 +175,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-group-parameter/docs/PetApi.md index 5e2ed87c422a..8c007f9c2929 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/docs/PetApi.md @@ -181,7 +181,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status) .execute(); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index f804c0e19404..fa949e967fb3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -630,13 +630,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md index 4309006d5720..12bfc3199357 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md @@ -175,7 +175,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 2b7eebac9564..1ce6e89ac1a1 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -682,13 +682,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("InnerEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md index c781e07e7b26..f48f825416cb 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md @@ -179,7 +179,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md index a890ff7a5191..b9385618e2af 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md @@ -442,7 +442,7 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | -| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to EnumFormStringArrayEnum.DOLLAR] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java index 502babbe4bec..f2c3afae335e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1019,7 +1019,7 @@ public TestEndpointParametersOper respSpec(Consumer respSpe * @see #enumQueryStringQuery Query parameter enum test (string) (optional, default to -efg) * @see #enumQueryIntegerQuery Query parameter enum test (double) (optional) * @see #enumQueryDoubleQuery Query parameter enum test (double) (optional) - * @see #enumFormStringArrayForm Form parameter enum test (string array) (optional, default to $) + * @see #enumFormStringArrayForm Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @see #enumFormStringForm Form parameter enum test (string) (optional, default to -efg) */ public static class TestEnumParametersOper implements Oper { @@ -1117,7 +1117,7 @@ public TestEnumParametersOper enumQueryDoubleQuery(Object... enumQueryDouble) { public static final String ENUM_FORM_STRING_ARRAY_FORM = "enum_form_string_array"; /** - * @param enumFormStringArray (List<String>) Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray (List<String>) Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @return operation */ public TestEnumParametersOper enumFormStringArrayForm(Object... enumFormStringArray) { diff --git a/samples/client/petstore/java/rest-assured/docs/FakeApi.md b/samples/client/petstore/java/rest-assured/docs/FakeApi.md index a890ff7a5191..b9385618e2af 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeApi.md @@ -442,7 +442,7 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | -| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | +| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to EnumFormStringArrayEnum.DOLLAR] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | ### Return type diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java index f870a0f5aaa5..d1f96326b0f0 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1020,7 +1020,7 @@ public TestEndpointParametersOper respSpec(Consumer respSpe * @see #enumQueryStringQuery Query parameter enum test (string) (optional, default to -efg) * @see #enumQueryIntegerQuery Query parameter enum test (double) (optional) * @see #enumQueryDoubleQuery Query parameter enum test (double) (optional) - * @see #enumFormStringArrayForm Form parameter enum test (string array) (optional, default to $) + * @see #enumFormStringArrayForm Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @see #enumFormStringForm Form parameter enum test (string) (optional, default to -efg) */ public static class TestEnumParametersOper implements Oper { @@ -1118,7 +1118,7 @@ public TestEnumParametersOper enumQueryDoubleQuery(Object... enumQueryDouble) { public static final String ENUM_FORM_STRING_ARRAY_FORM = "enum_form_string_array"; /** - * @param enumFormStringArray (List<String>) Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray (List<String>) Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @return operation */ public TestEnumParametersOper enumFormStringArrayForm(Object... enumFormStringArray) { diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 25301e7502c3..1293a8605cae 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md index 1e79e30ef6c2..e11e87277eb6 100644 --- a/samples/client/petstore/java/resteasy/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index d5d420a9852c..2c1737d5edb9 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -477,7 +477,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call */ diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 25301e7502c3..1293a8605cae 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md index 1e79e30ef6c2..e11e87277eb6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index 1fcb8328c73c..8044c41d9177 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -539,7 +539,7 @@ public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ @@ -558,7 +558,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 25301e7502c3..1293a8605cae 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md index 1e79e30ef6c2..e11e87277eb6 100644 --- a/samples/client/petstore/java/resttemplate/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index 1fcb8328c73c..8044c41d9177 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -539,7 +539,7 @@ public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ @@ -558,7 +558,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index 44193574acce..ebacbcf8fa50 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md index 27140114a49d..a62b9a9e8dff 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java index 6279aae50c8b..c372ea071e69 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java @@ -163,7 +163,7 @@ CompletionStage> testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Call<Void> */ diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 44193574acce..ebacbcf8fa50 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md index 27140114a49d..a62b9a9e8dff 100644 --- a/samples/client/petstore/java/retrofit2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java index 033d6d3b7393..904e22f7ed87 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -160,7 +160,7 @@ Call testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Call<Void> */ diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 44193574acce..ebacbcf8fa50 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md index 27140114a49d..a62b9a9e8dff 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java index c6c66d3764b0..95072633c369 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -161,7 +161,7 @@ Completable testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Completable */ diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index 44193574acce..ebacbcf8fa50 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md index 27140114a49d..a62b9a9e8dff 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java index 2d388c9b7f2f..66551b7fa8bd 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java @@ -161,7 +161,7 @@ Completable testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Completable */ diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index f6ce519861c9..bf40193575ea 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md index ecb2af3e7a99..ed9fca0b6006 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 4383f3537d59..8d19631c5eae 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -532,7 +532,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param resultHandler Asynchronous result handler */ @@ -549,7 +549,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java index a7388f52cd83..01bc77dad725 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java @@ -500,7 +500,7 @@ public Single rxTestEndpointParameters(BigDecimal number, Double _double, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param resultHandler Asynchronous result handler */ @@ -517,7 +517,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler @@ -535,7 +535,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Asynchronous result handler (RxJava Single) */ @@ -554,7 +554,7 @@ public Single rxTestEnumParameters(List enumHeaderStringArray, Str * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index f6ce519861c9..bf40193575ea 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -668,13 +668,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("EnumFormStringArrayEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md index ecb2af3e7a99..ed9fca0b6006 100644 --- a/samples/client/petstore/java/vertx/docs/PetApi.md +++ b/samples/client/petstore/java/vertx/docs/PetApi.md @@ -185,7 +185,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 4383f3537d59..8d19631c5eae 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -532,7 +532,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param resultHandler Asynchronous result handler */ @@ -549,7 +549,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java index a7388f52cd83..01bc77dad725 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java @@ -500,7 +500,7 @@ public Single rxTestEndpointParameters(BigDecimal number, Double _double, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param resultHandler Asynchronous result handler */ @@ -517,7 +517,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler @@ -535,7 +535,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Asynchronous result handler (RxJava Single) */ @@ -554,7 +554,7 @@ public Single rxTestEnumParameters(List enumHeaderStringArray, Str * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 1b6b9507990d..8953e7926b78 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -866,14 +866,14 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumQueryModelArray = Arrays.asList(-efg); // List | - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumQueryModelArray = Arrays.asList(EnumClass._EFG); // List | + List enumFormStringArray = Arrays.asList("InnerEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/webclient/docs/PetApi.md b/samples/client/petstore/java/webclient/docs/PetApi.md index e2515d9bb9bb..98db43f6a548 100644 --- a/samples/client/petstore/java/webclient/docs/PetApi.md +++ b/samples/client/petstore/java/webclient/docs/PetApi.md @@ -189,7 +189,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md index 5004221689ee..e7516b408916 100644 --- a/samples/client/petstore/swift5/default/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -510,7 +510,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/frozenEnums/docs/FakeAPI.md b/samples/client/petstore/swift5/frozenEnums/docs/FakeAPI.md index e33bd2d35fbc..368f978da09c 100644 --- a/samples/client/petstore/swift5/frozenEnums/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/frozenEnums/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md index 1cc75c5aab2c..79669f9b03ef 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md index a75c5864f1c6..7c07f55b7dad 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md index 5164a64867d8..19db8aa735a1 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md @@ -434,7 +434,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md index 350928e8e7f7..aeb5623196f4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md @@ -384,7 +384,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md index 2cb0e52af6d4..5a6aa285437a 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md @@ -593,7 +593,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md index 69b1faa2b991..df07f7f680cb 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md @@ -458,7 +458,7 @@ let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormStringArray = ["enumFormStringArray_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) // To test enum parameters diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 00365edeae97..0af982136ca1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -723,13 +723,13 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) + List enumHeaderStringArray = Arrays.asList("EnumHeaderStringArrayEnum.DOLLAR"); // List | Header parameter enum test (string array) String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) + List enumQueryStringArray = Arrays.asList("EnumQueryStringArrayEnum.DOLLAR"); // List | Query parameter enum test (string array) String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("InnerEnum.DOLLAR"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md index eb2957e47054..40f97ee368e2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -187,7 +187,7 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + List status = Arrays.asList("StatusEnum.AVAILABLE"); // List | Status values that need to be considered for filter try { List result = apiInstance.findPetsByStatus(status); System.out.println(result); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index 129e896a7a3e..4e3cc22b9f81 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -769,7 +769,7 @@ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, D * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to InnerEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call * @http.response.details @@ -792,7 +792,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to InnerEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 1a22a0dfea47..1064e0e9906a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -523,6 +523,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -570,7 +605,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -596,8 +631,8 @@ ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 3371b5dbd40d..d9a208956a2f 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -573,6 +573,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -620,7 +655,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -646,8 +681,8 @@ default ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index a365e0dedfaa..fd8ca53fcbb9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -542,6 +542,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -589,7 +624,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -615,8 +650,8 @@ default ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index d206827c3752..276817f6b6bf 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -29,6 +29,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -214,7 +215,7 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index b4cf92a48df1..464a9313c86b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -501,6 +501,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -546,7 +581,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -574,8 +609,8 @@ default ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 83d4bcf2ee98..229b84dd324c 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -555,6 +555,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -602,7 +637,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -628,8 +663,8 @@ default Mono> testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString, @Parameter(hidden = true) final ServerWebExchange exchange ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 7f89883b21ba..ea7d66458c6d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -33,6 +33,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -241,7 +242,7 @@ default Mono> testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index aac4f7a72472..5d6e94232430 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -252,7 +252,7 @@ default ResponseEntity testBodyWithFileSchema( consumes = { "application/json" } ) default ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) {{{{datatypeWithEnum}}} query, @Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -573,6 +573,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -620,7 +655,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -646,8 +681,8 @@ default ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -679,9 +714,9 @@ default ResponseEntity testEnumParameters( value = "/fake" ) default ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) {{{{datatypeWithEnum}}} requiredStringGroup, + @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) {{{{datatypeWithEnum}}} requiredBooleanGroup, + @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) {{{{datatypeWithEnum}}} requiredInt64Group, @Parameter(name = "string_group", description = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup, @Parameter(name = "boolean_group", description = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup, @Parameter(name = "int64_group", description = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group @@ -770,11 +805,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) {{{{datatypeWithEnum}}} pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) {{{{datatypeWithEnum}}} ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) {{{{datatypeWithEnum}}} http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) {{{{datatypeWithEnum}}} url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) {{{{datatypeWithEnum}}} context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -809,7 +844,7 @@ default ResponseEntity testQueryParameterCollectionFormat( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 5bf631a9b676..c043d1bcf442 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -101,7 +101,7 @@ default ResponseEntity addPet( value = "/pet/{petId}" ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @Parameter(name = "api_key", description = "") @RequestHeader(value = "api_key", required = false) Optional apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -175,7 +175,7 @@ public static StatusEnum fromValue(String value) { produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) {{{{datatypeWithEnum}}} status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -227,7 +227,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) {{{{datatypeWithEnum}}} tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -279,7 +279,7 @@ default ResponseEntity> findPetsByTags( produces = { "application/xml", "application/json" } ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -361,7 +361,7 @@ default ResponseEntity updatePet( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -398,7 +398,7 @@ default ResponseEntity updatePetWithForm( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 4c5be4758038..76be02524985 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -63,7 +63,7 @@ default Optional getRequest() { value = "/store/order/{order_id}" ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity> getInventory( produces = { "application/xml", "application/json" } ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 8f7c89b3f370..b66fc58a74d0 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -143,7 +143,7 @@ default ResponseEntity createUsersWithListInput( value = "/user/{username}" ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -177,7 +177,7 @@ default ResponseEntity deleteUser( produces = { "application/xml", "application/json" } ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -224,8 +224,8 @@ default ResponseEntity getUserByName( produces = { "application/xml", "application/json" } ) default ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @NotNull @Parameter(name = "username", description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) {{{{datatypeWithEnum}}} username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) {{{{datatypeWithEnum}}} password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -280,7 +280,7 @@ default ResponseEntity logoutUser( value = "/user/{username}" ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username, + @Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username, @Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index de8256e6923c..11b64188d899 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -182,7 +182,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble -,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray +,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="EnumFormStringArrayEnum.DOLLAR") @DefaultValue("EnumFormStringArrayEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java index 9493b5ecc771..ff8c9e0e8fa7 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -186,7 +186,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="EnumFormStringArrayEnum.DOLLAR") @DefaultValue("EnumFormStringArrayEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index 8d44fa17173d..4f8d503df511 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -226,7 +226,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") @Valid List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") @Valid List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="InnerEnum.DOLLAR") @DefaultValue("InnerEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java index 6c784c0d2b8c..dd4c9a1e2cce 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -190,7 +190,7 @@ public Response testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="EnumFormStringArrayEnum.DOLLAR") @DefaultValue("EnumFormStringArrayEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @Context SecurityContext securityContext) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java index 6cd432d975ee..d9a2be3d3e1b 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java @@ -191,7 +191,7 @@ public Response testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="EnumFormStringArrayEnum.DOLLAR") @DefaultValue("EnumFormStringArrayEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @Context SecurityContext securityContext) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java index 6b2c8133b982..700b02dbb259 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -184,7 +184,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="EnumFormStringArrayEnum.DOLLAR") @DefaultValue("EnumFormStringArrayEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java index 6f1e2384acd4..32184d88b306 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java @@ -185,7 +185,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="EnumFormStringArrayEnum.DOLLAR") @DefaultValue("EnumFormStringArrayEnum.DOLLAR") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 2cb6b9108ebf..f72d95192515 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -524,6 +524,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -571,7 +606,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -597,8 +632,8 @@ ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) throws Exception; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index f6e814206611..69123baa555f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -576,6 +576,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -623,7 +658,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -650,8 +685,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index f6e814206611..69123baa555f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -576,6 +576,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -623,7 +658,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -650,8 +685,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 9abe514c1790..9afe3c08d09c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -545,6 +545,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -592,7 +627,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -619,8 +654,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } 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 d206827c3752..276817f6b6bf 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 @@ -29,6 +29,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -214,7 +215,7 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 9abe514c1790..9afe3c08d09c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -545,6 +545,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -592,7 +627,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -619,8 +654,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index d206827c3752..276817f6b6bf 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -29,6 +29,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -214,7 +215,7 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) 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 49cfc197f5bc..ad145ef914e5 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 @@ -504,6 +504,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -549,7 +584,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -578,8 +613,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 73cbe93ee246..4e522a326c0d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -559,6 +559,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -606,7 +641,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -633,8 +668,8 @@ default Mono> testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); 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 47d1971e993b..cca853b5dd66 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 @@ -34,6 +34,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -242,7 +243,7 @@ default Mono> testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index c7077da186dd..66ab4aac9c7f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -545,6 +545,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -592,7 +627,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -619,8 +654,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 713c92c6d2be..c2713018e3fb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -29,6 +29,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -214,7 +215,7 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index c7077da186dd..66ab4aac9c7f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -545,6 +545,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -592,7 +627,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -619,8 +654,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index 713c92c6d2be..c2713018e3fb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -29,6 +29,7 @@ import static org.openapitools.api.FakeApi.EnumQueryStringEnum; import static org.openapitools.api.FakeApi.EnumQueryIntegerEnum; import static org.openapitools.api.FakeApi.EnumQueryDoubleEnum; +import static org.openapitools.api.FakeApi.EnumFormStringArrayEnum; import static org.openapitools.api.FakeApi.EnumFormStringEnum; /** * A delegate to be called by the {@link FakeApiController}}. @@ -214,7 +215,7 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index e7508a3e66df..bfaf83891aa6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -576,6 +576,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -623,7 +658,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -650,8 +685,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index e7508a3e66df..bfaf83891aa6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -576,6 +576,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -623,7 +658,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -650,8 +685,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 ffccefb32843..b7b486ede6aa 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 @@ -254,7 +254,7 @@ default ResponseEntity testBodyWithFileSchema( consumes = { "application/json" } ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) {{{{datatypeWithEnum}}} query, @ApiParam(value = "", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -576,6 +576,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -623,7 +658,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -650,8 +685,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -684,9 +719,9 @@ default ResponseEntity testEnumParameters( value = "/fake" ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) {{{{datatypeWithEnum}}} requiredStringGroup, + @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) {{{{datatypeWithEnum}}} requiredBooleanGroup, + @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) {{{{datatypeWithEnum}}} requiredInt64Group, @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup, @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group @@ -779,11 +814,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) {{{{datatypeWithEnum}}} pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) {{{{datatypeWithEnum}}} ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) {{{{datatypeWithEnum}}} http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) {{{{datatypeWithEnum}}} url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) {{{{datatypeWithEnum}}} context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -821,7 +856,7 @@ default ResponseEntity testQueryParameterCollectionFormat( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { 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 a66ce0e81b34..815d43e3dca2 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 @@ -102,7 +102,7 @@ default ResponseEntity addPet( value = "/pet/{petId}" ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -179,7 +179,7 @@ public static StatusEnum fromValue(String value) { produces = { "application/xml", "application/json" } ) default 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 + @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) {{{{datatypeWithEnum}}} status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) {{{{datatypeWithEnum}}} tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -285,7 +285,7 @@ default ResponseEntity> findPetsByTags( produces = { "application/xml", "application/json" } ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -375,7 +375,7 @@ default ResponseEntity updatePet( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -415,7 +415,7 @@ default ResponseEntity updatePetWithForm( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { 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 389797e2b9b4..5b2040668106 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 @@ -57,7 +57,7 @@ default Optional getRequest() { value = "/store/order/{order_id}" ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -124,7 +124,7 @@ default ResponseEntity> getInventory( produces = { "application/xml", "application/json" } ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 af19fb243b47..52a86344e612 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 @@ -140,7 +140,7 @@ default ResponseEntity createUsersWithListInput( value = "/user/{username}" ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -173,7 +173,7 @@ default ResponseEntity deleteUser( produces = { "application/xml", "application/json" } ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -219,8 +219,8 @@ default ResponseEntity getUserByName( produces = { "application/xml", "application/json" } ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) {{{{datatypeWithEnum}}} username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) {{{{datatypeWithEnum}}} password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -277,7 +277,7 @@ default ResponseEntity logoutUser( value = "/user/{username}" ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 4f05dbc490b1..0a636af74f02 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 @@ -585,6 +585,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -632,7 +667,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -659,8 +694,8 @@ default ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 f6e814206611..69123baa555f 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 @@ -576,6 +576,41 @@ public static EnumQueryDoubleEnum fromValue(Double value) { } } + /** + * Gets or Sets enumFormStringArray + */ + public enum EnumFormStringArrayEnum { + GREATER_THAN(">"), + + DOLLAR("$"); + + private String value; + + EnumFormStringArrayEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String value) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + /** * Form parameter enum test (string) */ @@ -623,7 +658,7 @@ public static EnumFormStringEnum fromValue(String value) { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to EnumFormStringArrayEnum.DOLLAR) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Invalid request (status code 400) * or Not found (status code 404) @@ -650,8 +685,8 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") EnumQueryStringEnum enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) EnumQueryIntegerEnum enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) EnumQueryDoubleEnum enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "EnumFormStringArrayEnum.DOLLAR") @Valid @RequestParam(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) EnumFormStringEnum enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); From dc53bba4a2ffe326e3069e3753ece3e9e74bf534 Mon Sep 17 00:00:00 2001 From: Zomzog Date: Sun, 25 Sep 2022 23:58:45 +0200 Subject: [PATCH 7/8] fix option --- .../JavaSpring/optionalDataType.mustache | 2 +- .../main/java/org/openapitools/api/FakeApi.java | 15 +++++++-------- .../main/java/org/openapitools/api/PetApi.java | 12 ++++++------ .../main/java/org/openapitools/api/StoreApi.java | 4 ++-- .../main/java/org/openapitools/api/UserApi.java | 10 +++++----- .../main/java/org/openapitools/api/FakeApi.java | 14 +++++++------- .../main/java/org/openapitools/api/PetApi.java | 12 ++++++------ .../main/java/org/openapitools/api/StoreApi.java | 4 ++-- .../main/java/org/openapitools/api/UserApi.java | 10 +++++----- 9 files changed, 41 insertions(+), 42 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache index 1c0c8a207dc2..3482a3b9ad9c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/optionalDataType.mustache @@ -1 +1 @@ -{{#useOptional}}{{#required}}{{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{}dataType}}}{{/datatypeWithEnum}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{>dataType}}>{{/required}}{{/useOptional}}{{^useOptional}}{{>dataType}}{{/useOptional}} \ No newline at end of file +{{#useOptional}}{{#required}}{{{dataType}}}{{/required}}{{^required}}Optional<{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{>dataType}}>{{/required}}{{/useOptional}}{{^useOptional}}{{>dataType}}{{/useOptional}} \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 1b299475f782..b8d63a102694 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -252,7 +252,7 @@ default ResponseEntity testBodyWithFileSchema( consumes = { "application/json" } ) default ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) {{{{datatypeWithEnum}}} query, + @NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -714,7 +714,6 @@ default ResponseEntity testEnumParameters( value = "/fake" ) default ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) {{{{datatypeWithEnum}}} requiredStringGroup, @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, @@ -806,11 +805,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) {{{{datatypeWithEnum}}} pipe, - @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) {{{{datatypeWithEnum}}} ioutil, - @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) {{{{datatypeWithEnum}}} http, - @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) {{{{datatypeWithEnum}}} url, - @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) {{{{datatypeWithEnum}}} context + @NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -845,7 +844,7 @@ default ResponseEntity testQueryParameterCollectionFormat( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index f602eed04fc7..afbadfd95413 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -101,7 +101,7 @@ default ResponseEntity addPet( value = "/pet/{petId}" ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "") @RequestHeader(value = "api_key", required = false) Optional apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -175,7 +175,7 @@ public static StatusEnum fromValue(String value) { produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) {{{{datatypeWithEnum}}} status + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -227,7 +227,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) {{{{datatypeWithEnum}}} tags + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -279,7 +279,7 @@ default ResponseEntity> findPetsByTags( produces = { "application/xml", "application/json" } ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId + @Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -361,7 +361,7 @@ default ResponseEntity updatePet( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -398,7 +398,7 @@ default ResponseEntity updatePetWithForm( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 91d6e9384414..61d89523a5b1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -63,7 +63,7 @@ default Optional getRequest() { value = "/store/order/{order_id}" ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity> getInventory( produces = { "application/xml", "application/json" } ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId + @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 95af5e587e17..4c72c1c42e14 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -143,7 +143,7 @@ default ResponseEntity createUsersWithListInput( value = "/user/{username}" ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -177,7 +177,7 @@ default ResponseEntity deleteUser( produces = { "application/xml", "application/json" } ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -224,8 +224,8 @@ default ResponseEntity getUserByName( produces = { "application/xml", "application/json" } ) default ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) {{{{datatypeWithEnum}}} username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) {{{{datatypeWithEnum}}} password + @NotNull @Parameter(name = "username", description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -280,7 +280,7 @@ default ResponseEntity logoutUser( value = "/user/{username}" ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username, + @Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username, @Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 5a0de9cb199d..bfed4183977a 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 @@ -254,7 +254,7 @@ default ResponseEntity testBodyWithFileSchema( consumes = { "application/json" } ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) {{{{datatypeWithEnum}}} query, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -814,11 +814,11 @@ default ResponseEntity testJsonFormData( value = "/fake/test-query-parameters" ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) {{{{datatypeWithEnum}}} pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) {{{{datatypeWithEnum}}} ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) {{{{datatypeWithEnum}}} http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) {{{{datatypeWithEnum}}} url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) {{{{datatypeWithEnum}}} context + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -856,7 +856,7 @@ default ResponseEntity testQueryParameterCollectionFormat( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { 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 9a607e1370f8..c612bc5c7fc8 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 @@ -102,7 +102,7 @@ default ResponseEntity addPet( value = "/pet/{petId}" ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -179,7 +179,7 @@ public static StatusEnum fromValue(String value) { produces = { "application/xml", "application/json" } ) default 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) {{{{datatypeWithEnum}}} status + @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 ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -234,7 +234,7 @@ default ResponseEntity> findPetsByStatus( produces = { "application/xml", "application/json" } ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) {{{{datatypeWithEnum}}} tags + @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -285,7 +285,7 @@ default ResponseEntity> findPetsByTags( produces = { "application/xml", "application/json" } ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -375,7 +375,7 @@ default ResponseEntity updatePet( consumes = { "application/x-www-form-urlencoded" } ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status ) { @@ -415,7 +415,7 @@ default ResponseEntity updatePetWithForm( consumes = { "multipart/form-data" } ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") {{{{datatypeWithEnum}}} petId, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { 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 8315f475896c..0c963feec636 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 @@ -57,7 +57,7 @@ default Optional getRequest() { value = "/store/order/{order_id}" ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -124,7 +124,7 @@ default ResponseEntity> getInventory( produces = { "application/xml", "application/json" } ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") {{{{datatypeWithEnum}}} orderId + @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { 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 7d8a075d4062..9557423a1297 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 @@ -140,7 +140,7 @@ default ResponseEntity createUsersWithListInput( value = "/user/{username}" ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -173,7 +173,7 @@ default ResponseEntity deleteUser( produces = { "application/xml", "application/json" } ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -219,8 +219,8 @@ default ResponseEntity getUserByName( produces = { "application/xml", "application/json" } ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) {{{{datatypeWithEnum}}} username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) {{{{datatypeWithEnum}}} password + @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -277,7 +277,7 @@ default ResponseEntity logoutUser( value = "/user/{username}" ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") {{{{datatypeWithEnum}}} username, + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); From 8941dfbfd67145c05ac440e9e07de1512ec8a2fe Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Sun, 9 Oct 2022 23:07:19 +0200 Subject: [PATCH 8/8] fix merge --- .../OpenAPIClient-net48/docs/FakeApi.md | 4 ++-- .../src/Org.OpenAPITools/Api/FakeApi.cs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md index 46d135e359f8..d4a2a87c52f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md @@ -954,7 +954,7 @@ namespace Example var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to InnerEnum.Dollar) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -1000,7 +1000,7 @@ catch (ApiException e) | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to InnerEnum.Dollar] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b78c..56952018a842 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/FakeApi.cs @@ -285,7 +285,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -304,7 +304,7 @@ public interface IFakeApiSync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -711,7 +711,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -731,7 +731,7 @@ public interface IFakeApiAsync : IApiAccessor /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2527,7 +2527,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// @@ -2546,7 +2546,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) @@ -2635,7 +2635,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -2655,7 +2655,7 @@ public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpI /// Query parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string array) (optional, default to InnerEnum.Dollar) /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// Cancellation Token to cancel the request.