diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/bodyParams.mustache index f938cb5b6bea..036f33ad8939 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}{{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}} {{#vendorExtensions.x-field-extra-annotation}}{{{.}}} {{/vendorExtensions.x-field-extra-annotation}} {{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache index 0a58596dfd58..481f6680d95c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}@CookieParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}@CookieParam("{{baseName}}") {{#vendorExtensions.x-field-extra-annotation}}{{{.}}} {{/vendorExtensions.x-field-extra-annotation}} {{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/formParams.mustache index 885966e64426..06c4f5088b03 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@FormParam(value = "{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @FormParam(value = "{{baseName}}") InputStream {{paramName}}InputStream{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@FormParam(value = "{{baseName}}") {{#vendorExtensions.x-field-extra-annotation}}{{{.}}} {{/vendorExtensions.x-field-extra-annotation}} {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @FormParam(value = "{{baseName}}") InputStream {{paramName}}InputStream{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache index 94f69070463d..1a6bb7f14347 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@HeaderParam("{{baseName}}") {{#vendorExtensions.x-field-extra-annotation}}{{{.}}} {{/vendorExtensions.x-field-extra-annotation}} {{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache index fea718e31b94..fe238b00edb9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}@PathParam("{{baseName}}") {{#vendorExtensions.x-field-extra-annotation}}{{{.}}} {{/vendorExtensions.x-field-extra-annotation}} {{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isPathParam}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache index 3e69e743e4ea..d0b6ca65da56 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{baseName}}") {{#vendorExtensions.x-field-extra-annotation}}{{{.}}} {{/vendorExtensions.x-field-extra-annotation}} {{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}{{#description}} @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="{{.}}"){{/description}}{{/useMicroProfileOpenAPIAnnotations}} {{{dataType}}} {{paramName}}{{/isQueryParam}} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 50b04d09619b..2dc70aa99be7 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,10 @@ public interface AnotherFakeApi { @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body); + Response call123testSpecialTags( + +@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest, + + @Valid @NotNull Client body); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java index 71f20cbf6afd..3c39a3b4a381 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java @@ -43,7 +43,9 @@ public interface FakeApi { @ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createXmlItem(@Valid @NotNull XmlItem xmlItem); + Response createXmlItem( + + @Valid @NotNull XmlItem xmlItem); /** @@ -58,7 +60,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - Response fakeOuterBooleanSerialize(@Valid Boolean body); + Response fakeOuterBooleanSerialize( + + @Valid Boolean body); /** @@ -73,7 +77,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - Response fakeOuterCompositeSerialize(@Valid OuterComposite body); + Response fakeOuterCompositeSerialize( + + @Valid OuterComposite body); /** @@ -88,7 +94,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - Response fakeOuterNumberSerialize(@Valid BigDecimal body); + Response fakeOuterNumberSerialize( + + @Valid BigDecimal body); /** @@ -103,7 +111,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output string", response = String.class) }) - Response fakeOuterStringSerialize(@Valid String body); + Response fakeOuterStringSerialize( + + @Valid String body); /** @@ -118,7 +128,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body); + Response testBodyWithFileSchema( + + @Valid @NotNull FileSchemaTestClass body); /** @@ -134,7 +146,11 @@ public interface FakeApi { @ApiOperation(value = "", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); + Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query + +, + + @Valid @NotNull User body); /** @@ -149,7 +165,9 @@ public interface FakeApi { @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Response testClientModel(@Valid @NotNull Client body); + Response testClientModel( + + @Valid @NotNull Client body); /** @@ -181,7 +199,35 @@ public interface FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback); + Response testEndpointParameters( + +@FormParam(value = "number") BigDecimal number, + +@FormParam(value = "double") Double _double, + +@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter, + +@FormParam(value = "byte") byte[] _byte, + +@FormParam(value = "integer") Integer integer, + +@FormParam(value = "int32") Integer int32, + +@FormParam(value = "int64") Long int64, + +@FormParam(value = "float") Float _float, + +@FormParam(value = "string") String string, + + @FormParam(value = "binary") InputStream binaryInputStream, + +@FormParam(value = "date") LocalDate date, + +@FormParam(value = "dateTime") Date dateTime, + +@FormParam(value = "password") String password, + +@FormParam(value = "callback") String paramCallback); /** @@ -204,7 +250,23 @@ public interface FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); + Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray, + +@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString); /** @@ -222,7 +284,19 @@ public interface FakeApi { @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); + Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group + +); /** @@ -237,7 +311,9 @@ public interface FakeApi { @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response testInlineAdditionalProperties(@Valid @NotNull Map param); + Response testInlineAdditionalProperties( + + @Valid @NotNull Map param); /** @@ -253,7 +329,11 @@ public interface FakeApi { @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2); + Response testJsonFormData( + +@FormParam(value = "param") String param, + +@FormParam(value = "param2") String param2); /** @@ -271,7 +351,17 @@ public interface FakeApi { @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context); + Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +); /** @@ -293,6 +383,12 @@ public interface FakeApi { }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata); + Response uploadFileWithRequiredFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 2b89e4a993d2..00f6897cbecd 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,6 +36,8 @@ public interface FakeClassnameTestApi { }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Response testClassname(@Valid @NotNull Client body); + Response testClassname( + + @Valid @NotNull Client body); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java index 1fa15aecd407..38340dd3dd1c 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java @@ -41,7 +41,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - Response addPet(@Valid @NotNull Pet body); + Response addPet( + + @Valid @NotNull Pet body); /** @@ -62,7 +64,11 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); + Response deletePet( +@PathParam("petId") @ApiParam("Pet id to delete") Long petId +, + +@HeaderParam("api_key") String apiKey); /** @@ -83,7 +89,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class, responseContainer = "List") }) - Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status); + Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status + +); /** @@ -104,7 +112,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "Set") }) - Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags); + Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags + +); /** @@ -126,7 +136,9 @@ public interface PetApi { @ApiResponse(code = 200, message = "successful operation", response = Pet.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId); + Response getPetById( +@PathParam("petId") @ApiParam("ID of pet to return") Long petId +); /** @@ -150,7 +162,9 @@ public interface PetApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - Response updatePet(@Valid @NotNull Pet body); + Response updatePet( + + @Valid @NotNull Pet body); /** @@ -171,7 +185,13 @@ public interface PetApi { }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status); + Response updatePetWithForm( +@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status); /** @@ -193,6 +213,12 @@ public interface PetApi { }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream); + Response uploadFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java index 7746fdd94561..401708f2ea41 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java @@ -35,7 +35,9 @@ public interface StoreApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId); + Response deleteOrder( +@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId +); /** @@ -71,7 +73,9 @@ public interface StoreApi { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId); + Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId +); /** @@ -88,6 +92,8 @@ public interface StoreApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - Response placeOrder(@Valid @NotNull Order body); + Response placeOrder( + + @Valid @NotNull Order body); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java index ecd07b9f83a1..783e4fb6a5b6 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java @@ -32,7 +32,9 @@ public interface UserApi { @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUser(@Valid @NotNull User body); + Response createUser( + + @Valid @NotNull User body); /** @@ -46,7 +48,9 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); + Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> body); /** @@ -60,7 +64,9 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body); + Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> body); /** @@ -76,7 +82,9 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username); + Response deleteUser( +@PathParam("username") @ApiParam("The name that needs to be deleted") String username +); /** @@ -95,7 +103,9 @@ public interface UserApi { @ApiResponse(code = 200, message = "successful operation", response = User.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username); + Response getUserByName( +@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username +); /** @@ -113,7 +123,11 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); + Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username + +,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password + +); /** @@ -143,6 +157,10 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body); + Response updateUser( +@PathParam("username") @ApiParam("name that need to be deleted") String username +, + + @Valid @NotNull User body); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 13bd2e2f56d3..6581183f4d57 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -35,6 +35,10 @@ public interface AnotherFakeApi { @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body); + Client call123testSpecialTags( + +@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest, + + @Valid @NotNull Client body); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java index 1dee1894dd94..6cb764c0cfb5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java @@ -43,7 +43,9 @@ public interface FakeApi { @ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createXmlItem(@Valid @NotNull XmlItem xmlItem); + void createXmlItem( + + @Valid @NotNull XmlItem xmlItem); /** @@ -58,7 +60,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - Boolean fakeOuterBooleanSerialize(@Valid Boolean body); + Boolean fakeOuterBooleanSerialize( + + @Valid Boolean body); /** @@ -73,7 +77,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite body); + OuterComposite fakeOuterCompositeSerialize( + + @Valid OuterComposite body); /** @@ -88,7 +94,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body); + BigDecimal fakeOuterNumberSerialize( + + @Valid BigDecimal body); /** @@ -103,7 +111,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Output string", response = String.class) }) - String fakeOuterStringSerialize(@Valid String body); + String fakeOuterStringSerialize( + + @Valid String body); /** @@ -118,7 +128,9 @@ public interface FakeApi { @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body); + void testBodyWithFileSchema( + + @Valid @NotNull FileSchemaTestClass body); /** @@ -134,7 +146,11 @@ public interface FakeApi { @ApiOperation(value = "", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); + void testBodyWithQueryParams(@QueryParam("query") @NotNull String query + +, + + @Valid @NotNull User body); /** @@ -149,7 +165,9 @@ public interface FakeApi { @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client testClientModel(@Valid @NotNull Client body); + Client testClientModel( + + @Valid @NotNull Client body); /** @@ -181,7 +199,35 @@ public interface FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback); + void testEndpointParameters( + +@FormParam(value = "number") BigDecimal number, + +@FormParam(value = "double") Double _double, + +@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter, + +@FormParam(value = "byte") byte[] _byte, + +@FormParam(value = "integer") Integer integer, + +@FormParam(value = "int32") Integer int32, + +@FormParam(value = "int64") Long int64, + +@FormParam(value = "float") Float _float, + +@FormParam(value = "string") String string, + + @FormParam(value = "binary") InputStream binaryInputStream, + +@FormParam(value = "date") LocalDate date, + +@FormParam(value = "dateTime") Date dateTime, + +@FormParam(value = "password") String password, + +@FormParam(value = "callback") String paramCallback); /** @@ -206,7 +252,21 @@ public interface FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); + void testEnumParameters( + +@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString); /** @@ -224,7 +284,19 @@ public interface FakeApi { @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - void testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); + void testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group + +); /** @@ -239,7 +311,9 @@ public interface FakeApi { @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void testInlineAdditionalProperties(@Valid @NotNull Map param); + void testInlineAdditionalProperties( + + @Valid @NotNull Map param); /** @@ -255,7 +329,11 @@ public interface FakeApi { @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2); + void testJsonFormData( + +@FormParam(value = "param") String param, + +@FormParam(value = "param2") String param2); /** @@ -273,7 +351,17 @@ public interface FakeApi { @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context); + void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +); /** @@ -295,6 +383,12 @@ public interface FakeApi { }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata); + ModelApiResponse uploadFileWithRequiredFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 9ebb733d511c..42b5428e363c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,6 +36,8 @@ public interface FakeClassnameTestApi { }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client testClassname(@Valid @NotNull Client body); + Client testClassname( + + @Valid @NotNull Client body); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java index 483071084ce1..bc1ea3107d83 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java @@ -41,7 +41,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - void addPet(@Valid @NotNull Pet body); + void addPet( + + @Valid @NotNull Pet body); /** @@ -64,7 +66,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId); + void deletePet( +@PathParam("petId") @ApiParam("Pet id to delete") Long petId +); /** @@ -85,7 +89,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class, responseContainer = "List") }) - List findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status); + List findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status + +); /** @@ -106,7 +112,9 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "Set") }) - Set findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags); + Set findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags + +); /** @@ -128,7 +136,9 @@ public interface PetApi { @ApiResponse(code = 200, message = "successful operation", response = Pet.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - Pet getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId); + Pet getPetById( +@PathParam("petId") @ApiParam("ID of pet to return") Long petId +); /** @@ -152,7 +162,9 @@ public interface PetApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - void updatePet(@Valid @NotNull Pet body); + void updatePet( + + @Valid @NotNull Pet body); /** @@ -173,7 +185,13 @@ public interface PetApi { }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - void updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status); + void updatePetWithForm( +@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status); /** @@ -195,6 +213,12 @@ public interface PetApi { }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream); + ModelApiResponse uploadFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java index 21789113752c..4d5cc5c44a07 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java @@ -35,7 +35,9 @@ public interface StoreApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - void deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId); + void deleteOrder( +@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId +); /** @@ -71,7 +73,9 @@ public interface StoreApi { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - Order getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId); + Order getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId +); /** @@ -88,6 +92,8 @@ public interface StoreApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - Order placeOrder(@Valid @NotNull Order body); + Order placeOrder( + + @Valid @NotNull Order body); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java index cf0c0654712a..31d23a028e2f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java @@ -32,7 +32,9 @@ public interface UserApi { @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUser(@Valid @NotNull User body); + void createUser( + + @Valid @NotNull User body); /** @@ -46,7 +48,9 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); + void createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> body); /** @@ -60,7 +64,9 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUsersWithListInput(@Valid @NotNull List<@Valid User> body); + void createUsersWithListInput( + + @Valid @NotNull List<@Valid User> body); /** @@ -76,7 +82,9 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - void deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username); + void deleteUser( +@PathParam("username") @ApiParam("The name that needs to be deleted") String username +); /** @@ -95,7 +103,9 @@ public interface UserApi { @ApiResponse(code = 200, message = "successful operation", response = User.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - User getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username); + User getUserByName( +@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username +); /** @@ -113,7 +123,11 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); + String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username + +,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password + +); /** @@ -143,6 +157,10 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body); + void updateUser( +@PathParam("username") @ApiParam("name that need to be deleted") String username +, + + @Valid @NotNull User body); } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 63d5b2043def..faf1405f63e2 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -29,7 +29,11 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) { + public Response call123testSpecialTags( + +@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest, + + @Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeApi.java index 58a3cd64e7c9..a0082da22d0c 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeApi.java @@ -38,7 +38,9 @@ public class FakeApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) { + public Response createXmlItem( + + @Valid @NotNull XmlItem xmlItem) { return Response.ok().entity("magic!").build(); } @@ -49,7 +51,9 @@ public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -60,7 +64,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite body) { return Response.ok().entity("magic!").build(); } @@ -71,7 +77,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -82,7 +90,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -93,7 +103,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) { + public Response testBodyWithFileSchema( + + @Valid @NotNull FileSchemaTestClass body) { return Response.ok().entity("magic!").build(); } @@ -104,7 +116,11 @@ public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) { + public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query + +, + + @Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } @@ -115,7 +131,9 @@ public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String q @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClientModel(@Valid @NotNull Client body) { + public Response testClientModel( + + @Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } @@ -129,7 +147,35 @@ public Response testClientModel(@Valid @NotNull Client body) { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) { + public Response testEndpointParameters( + +@FormParam(value = "number") BigDecimal number, + +@FormParam(value = "double") Double _double, + +@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter, + +@FormParam(value = "byte") byte[] _byte, + +@FormParam(value = "integer") Integer integer, + +@FormParam(value = "int32") Integer int32, + +@FormParam(value = "int64") Long int64, + +@FormParam(value = "float") Float _float, + +@FormParam(value = "string") String string, + + @FormParam(value = "binary") InputStream binaryInputStream, + +@FormParam(value = "date") LocalDate date, + +@FormParam(value = "dateTime") Date dateTime, + +@FormParam(value = "password") String password, + +@FormParam(value = "callback") String paramCallback) { return Response.ok().entity("magic!").build(); } @@ -143,7 +189,21 @@ public Response testEndpointParameters(@FormParam(value = "number") BigDecimal @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -152,7 +212,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @A @ApiResponses(value = { @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -163,7 +235,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map param) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map param) { return Response.ok().entity("magic!").build(); } @@ -174,7 +248,11 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +) { return Response.ok().entity("magic!").build(); } @@ -200,7 +288,13 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index ad5f6cf03c75..312ceb55b075 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,7 +31,9 @@ public class FakeClassnameTestApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@Valid @NotNull Client body) { + public Response testClassname( + + @Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/PetApi.java index 4a8260754bd3..44b157d7c484 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/PetApi.java @@ -35,7 +35,9 @@ public class PetApi { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@Valid @NotNull Pet body) { + public Response addPet( + + @Valid @NotNull Pet body) { return Response.ok().entity("magic!").build(); } @@ -53,7 +55,9 @@ public Response addPet(@Valid @NotNull Pet body) { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId) { + public Response deletePet( +@PathParam("petId") @ApiParam("Pet id to delete") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status + +) { return Response.ok().entity("magic!").build(); } @@ -85,7 +91,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Stat @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -101,7 +109,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) { + public Response getPetById( +@PathParam("petId") @ApiParam("ID of pet to return") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -118,7 +128,9 @@ public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") @ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@Valid @NotNull Pet body) { + public Response updatePet( + + @Valid @NotNull Pet body) { return Response.ok().entity("magic!").build(); } @@ -133,7 +145,13 @@ public Response updatePet(@Valid @NotNull Pet body) { @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -149,7 +167,13 @@ public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/StoreApi.java index 4bf5e744d340..510fe86d1941 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/StoreApi.java @@ -29,7 +29,9 @@ public class StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder( +@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -56,7 +58,9 @@ public Response getInventory() { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -68,7 +72,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam( @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@Valid @NotNull Order body) { + public Response placeOrder( + + @Valid @NotNull Order body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java index ca445602f1f7..105bb5284f27 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java @@ -27,7 +27,9 @@ public class UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@Valid @NotNull User body) { + public Response createUser( + + @Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } @@ -37,7 +39,9 @@ public Response createUser(@Valid @NotNull User body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -47,7 +51,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -58,7 +64,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) { + public Response deleteUser( +@PathParam("username") @ApiParam("The name that needs to be deleted") String username +) { return Response.ok().entity("magic!").build(); } @@ -71,7 +79,9 @@ public Response deleteUser(@PathParam("username") @ApiParam("The name that needs @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username) { + public Response getUserByName( +@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username +) { return Response.ok().entity("magic!").build(); } @@ -83,7 +93,11 @@ public Response getUserByName(@PathParam("username") @ApiParam("The name that ne @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username + +,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password + +) { return Response.ok().entity("magic!").build(); } @@ -104,7 +118,11 @@ public Response logoutUser() { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body) { + public Response updateUser( +@PathParam("username") @ApiParam("name that need to be deleted") String username +, + + @Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java index a76db727f403..620d265648f0 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -71,7 +71,11 @@ public class AnotherFakeApi { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) }) }) - public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) { + public Response call123testSpecialTags( + +@HeaderParam("uuid_test") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="to test uuid example value") UUID uuidTest, + + @Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java index 910d65a26766..a1913ac6b485 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java @@ -80,7 +80,9 @@ public class FakeApi { }) }) - public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) { + public Response createXmlItem( + + @Valid @NotNull XmlItem xmlItem) { return Response.ok().entity("magic!").build(); } @@ -95,7 +97,9 @@ public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Boolean.class)) }) }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -110,7 +114,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = OuterComposite.class)) }) }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite body) { return Response.ok().entity("magic!").build(); } @@ -125,7 +131,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = BigDecimal.class)) }) }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -140,7 +148,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = String.class)) }) }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -155,7 +165,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { }) }) - public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) { + public Response testBodyWithFileSchema( + + @Valid @NotNull FileSchemaTestClass body) { return Response.ok().entity("magic!").build(); } @@ -170,7 +182,11 @@ public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) }) }) - public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) { + public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query + +, + + @Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } @@ -185,7 +201,9 @@ public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String q @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) }) }) - public Response testClientModel(@Valid @NotNull Client body) { + public Response testClientModel( + + @Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } @@ -204,7 +222,35 @@ public Response testClientModel(@Valid @NotNull Client body) { }) }) - public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") LocalDateTime dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) { + public Response testEndpointParameters( + +@FormParam(value = "number") BigDecimal number, + +@FormParam(value = "double") Double _double, + +@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter, + +@FormParam(value = "byte") byte[] _byte, + +@FormParam(value = "integer") Integer integer, + +@FormParam(value = "int32") Integer int32, + +@FormParam(value = "int64") Long int64, + +@FormParam(value = "float") Float _float, + +@FormParam(value = "string") String string, + + @FormParam(value = "binary") InputStream binaryInputStream, + +@FormParam(value = "date") LocalDate date, + +@FormParam(value = "dateTime") LocalDateTime dateTime, + +@FormParam(value = "password") String password, + +@FormParam(value = "callback") String paramCallback) { return Response.ok().entity("magic!").build(); } @@ -221,7 +267,21 @@ public Response testEndpointParameters(@FormParam(value = "number") BigDecimal }) }) - public Response testEnumParameters(@HeaderParam("enum_header_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Double enumQueryDouble + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -234,7 +294,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @o }) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Integer in group parameters") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -249,7 +321,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul }) }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map param) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map param) { return Response.ok().entity("magic!").build(); } @@ -264,7 +338,11 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +) { return Response.ok().entity("magic!").build(); } @@ -296,7 +384,13 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class)) }) }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 144eadfabb70..5ba9d06d8f9c 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -72,7 +72,9 @@ public class FakeClassnameTestApi { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) }) }) - public Response testClassname(@Valid @NotNull Client body) { + public Response testClassname( + + @Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java index 7321e960572b..aa0f837da465 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java @@ -77,7 +77,9 @@ public class PetApi { }) }) - public Response addPet(@Valid @NotNull Pet body) { + public Response addPet( + + @Valid @NotNull Pet body) { return Response.ok().entity("magic!").build(); } @@ -96,7 +98,9 @@ public Response addPet(@Valid @NotNull Pet body) { }) }) - public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId) { + public Response deletePet( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -118,7 +122,9 @@ public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi. @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List status + +) { return Response.ok().entity("magic!").build(); } @@ -140,7 +146,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.mi @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -166,7 +174,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microp @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId) { + public Response getPetById( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -191,7 +201,9 @@ public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi }) }) - public Response updatePet(@Valid @NotNull Pet body) { + public Response updatePet( + + @Valid @NotNull Pet body) { return Response.ok().entity("magic!").build(); } @@ -208,7 +220,13 @@ public Response updatePet(@Valid @NotNull Pet body) { }) }) - public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -226,7 +244,13 @@ public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile. @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class)) }) }) - public Response uploadFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java index 8b411922176d..88d39169cd1e 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java @@ -73,7 +73,9 @@ public class StoreApi { }) }) - public Response deleteOrder(@PathParam("order_id") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder( +@PathParam("order_id") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -114,7 +116,9 @@ public Response getInventory() { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -134,7 +138,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclip @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response placeOrder(@Valid @NotNull Order body) { + public Response placeOrder( + + @Valid @NotNull Order body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java index 3ec7c7595cd2..a99f7bc435eb 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java @@ -69,7 +69,9 @@ public class UserApi { }) }) - public Response createUser(@Valid @NotNull User body) { + public Response createUser( + + @Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } @@ -83,7 +85,9 @@ public Response createUser(@Valid @NotNull User body) { }) }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -97,7 +101,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body }) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -114,7 +120,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) }) }) - public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username) { + public Response deleteUser( +@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username +) { return Response.ok().entity("magic!").build(); } @@ -138,7 +146,9 @@ public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.open @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username) { + public Response getUserByName( +@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username +) { return Response.ok().entity("magic!").build(); } @@ -161,7 +171,11 @@ public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.o @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response loginUser(@QueryParam("username") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username + +,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password + +) { return Response.ok().entity("magic!").build(); } @@ -192,7 +206,11 @@ public Response logoutUser() { }) }) - public Response updateUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username,@Valid @NotNull User body) { + public Response updateUser( +@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username +, + + @Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 87f20ff309f9..de135be5e844 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -75,7 +75,9 @@ public class AnotherFakeApi { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) }) }) - public Response call123testSpecialTags(@Valid @NotNull Client client) { + public Response call123testSpecialTags( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeApi.java index 63ca08c6c5cf..99892db56538 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeApi.java @@ -123,7 +123,13 @@ public Response fakeHealthGet() { }) }) - public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="query parameter") String query1,@HeaderParam("header_1") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="header parameter") String header1) { + public Response fakeHttpSignatureTest( + + @Valid @NotNull Pet pet,@QueryParam("query_1") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="query parameter") String query1 + +, + +@HeaderParam("header_1") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="header parameter") String header1) { return Response.ok().entity("magic!").build(); } @@ -139,7 +145,9 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Boolean.class)) }) }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -155,7 +163,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = OuterComposite.class)) }) }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite outerComposite) { return Response.ok().entity("magic!").build(); } @@ -171,7 +181,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = BigDecimal.class)) }) }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -187,7 +199,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = String.class)) }) }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -203,7 +217,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = OuterObjectWithEnumProperty.class)) }) }) - public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { + public Response fakePropertyEnumIntegerSerialize( + + @Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Response.ok().entity("magic!").build(); } @@ -218,7 +234,9 @@ public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWith }) }) - public Response testAdditionalPropertiesReference(@Valid @NotNull Map requestBody) { + public Response testAdditionalPropertiesReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -233,7 +251,9 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map enumHeaderStringArray,@QueryParam("enum_query_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Double enumQueryDouble + +,@QueryParam("enum_query_model_array") List enumQueryModelArray + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -329,7 +401,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @o }) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Integer in group parameters") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -344,7 +428,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul }) }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map requestBody) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -359,7 +445,9 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +,@QueryParam("allowEmpty") @NotNull String allowEmpty + +,@QueryParam("language") Map language + +) { return Response.ok().entity("magic!").build(); } @@ -418,7 +526,9 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull }) }) - public Response testStringMapReference(@Valid @NotNull Map requestBody) { + public Response testStringMapReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -436,7 +546,13 @@ public Response testStringMapReference(@Valid @NotNull Map reque @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class)) }) }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index e7f73023b503..d8b35ddb0fac 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -77,7 +77,9 @@ public class FakeClassnameTestApi { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) }) }) - public Response testClassname(@Valid @NotNull Client client) { + public Response testClassname( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/PetApi.java index e4718ab61f52..33d7fbe3f04b 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/PetApi.java @@ -82,7 +82,9 @@ public class PetApi { }) }) - public Response addPet(@Valid @NotNull Pet pet) { + public Response addPet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -101,7 +103,9 @@ public Response addPet(@Valid @NotNull Pet pet) { }) }) - public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId) { + public Response deletePet( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -123,7 +127,9 @@ public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi. @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List status + +) { return Response.ok().entity("magic!").build(); } @@ -145,7 +151,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.mi @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -171,7 +179,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microp @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId) { + public Response getPetById( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -196,7 +206,9 @@ public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi }) }) - public Response updatePet(@Valid @NotNull Pet pet) { + public Response updatePet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -216,7 +228,13 @@ public Response updatePet(@Valid @NotNull Pet pet) { }) }) - public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -234,7 +252,13 @@ public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile. @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class)) }) }) - public Response uploadFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/StoreApi.java index 3d4a0256ea77..8e41df46360d 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/StoreApi.java @@ -78,7 +78,9 @@ public class StoreApi { }) }) - public Response deleteOrder(@PathParam("order_id") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder( +@PathParam("order_id") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -119,7 +121,9 @@ public Response getInventory() { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -140,7 +144,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclip @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response placeOrder(@Valid @NotNull Order order) { + public Response placeOrder( + + @Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/UserApi.java index f3a759e45ebf..5f75e02430bc 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/UserApi.java @@ -75,7 +75,9 @@ public class UserApi { }) }) - public Response createUser(@Valid @NotNull User user) { + public Response createUser( + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } @@ -90,7 +92,9 @@ public Response createUser(@Valid @NotNull User user) { }) }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -105,7 +109,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user }) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -122,7 +128,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) }) }) - public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username) { + public Response deleteUser( +@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username +) { return Response.ok().entity("magic!").build(); } @@ -146,7 +154,9 @@ public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.open @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username) { + public Response getUserByName( +@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username +) { return Response.ok().entity("magic!").build(); } @@ -169,7 +179,11 @@ public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.o @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response loginUser(@QueryParam("username") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username + +,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password + +) { return Response.ok().entity("magic!").build(); } @@ -201,7 +215,11 @@ public Response logoutUser() { }) }) - public Response updateUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username,@Valid @NotNull User user) { + public Response updateUser( +@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username +, + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 43c56b63876d..cd1a21392f88 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -28,7 +28,9 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@Valid @NotNull Client client) { + public Response call123testSpecialTags( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeApi.java index 94171846744b..60d3b5c563ed 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeApi.java @@ -70,7 +70,13 @@ public Response fakeHealthGet() { @ApiResponses(value = { @ApiResponse(code = 200, message = "The instance started successfully", response = Void.class) }) - public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") @ApiParam("query parameter") String query1,@HeaderParam("header_1") @ApiParam("header parameter") String header1) { + public Response fakeHttpSignatureTest( + + @Valid @NotNull Pet pet,@QueryParam("query_1") @ApiParam("query parameter") String query1 + +, + +@HeaderParam("header_1") @ApiParam("header parameter") String header1) { return Response.ok().entity("magic!").build(); } @@ -82,7 +88,9 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query @ApiResponses(value = { @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -94,7 +102,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite outerComposite) { return Response.ok().entity("magic!").build(); } @@ -106,7 +116,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite @ApiResponses(value = { @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -118,7 +130,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -130,7 +144,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output enum (int)", response = OuterObjectWithEnumProperty.class) }) - public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { + public Response fakePropertyEnumIntegerSerialize( + + @Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Response.ok().entity("magic!").build(); } @@ -152,7 +168,9 @@ public Response fakeTestsDefaults() { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testAdditionalPropertiesReference(@Valid @NotNull Map requestBody) { + public Response testAdditionalPropertiesReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -163,7 +181,9 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble + +,@QueryParam("enum_query_model_array") List enumQueryModelArray + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -236,7 +308,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @A @ApiResponses(value = { @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -247,7 +331,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map requestBody) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -258,7 +344,9 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +,@QueryParam("allowEmpty") @NotNull String allowEmpty + +,@QueryParam("language") Map language + +) { return Response.ok().entity("magic!").build(); } @@ -301,7 +409,9 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testStringMapReference(@Valid @NotNull Map requestBody) { + public Response testStringMapReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -317,7 +427,13 @@ public Response testStringMapReference(@Valid @NotNull Map reque @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 66a439b72975..cc63c7be7d77 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,7 +31,9 @@ public class FakeClassnameTestApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@Valid @NotNull Client client) { + public Response testClassname( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/PetApi.java index c38692fa42a9..fd4c95d10d6c 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/PetApi.java @@ -35,7 +35,9 @@ public class PetApi { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@Valid @NotNull Pet pet) { + public Response addPet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -53,7 +55,9 @@ public Response addPet(@Valid @NotNull Pet pet) { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId) { + public Response deletePet( +@PathParam("petId") @ApiParam("Pet id to delete") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status + +) { return Response.ok().entity("magic!").build(); } @@ -85,7 +91,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Stat @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -101,7 +109,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) { + public Response getPetById( +@PathParam("petId") @ApiParam("ID of pet to return") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -118,7 +128,9 @@ public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") @ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@Valid @NotNull Pet pet) { + public Response updatePet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -134,7 +146,13 @@ public Response updatePet(@Valid @NotNull Pet pet) { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -150,7 +168,13 @@ public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/StoreApi.java index 91c5f3b7646f..ec0f58a65bbf 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/StoreApi.java @@ -29,7 +29,9 @@ public class StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder( +@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -56,7 +58,9 @@ public Response getInventory() { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam( @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@Valid @NotNull Order order) { + public Response placeOrder( + + @Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/UserApi.java index 4d2494b95ff9..6130632d9e89 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-annotations/src/gen/java/org/openapitools/api/UserApi.java @@ -28,7 +28,9 @@ public class UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@Valid @NotNull User user) { + public Response createUser( + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } @@ -39,7 +41,9 @@ public Response createUser(@Valid @NotNull User user) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -50,7 +54,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -61,7 +67,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) { + public Response deleteUser( +@PathParam("username") @ApiParam("The name that needs to be deleted") String username +) { return Response.ok().entity("magic!").build(); } @@ -74,7 +82,9 @@ public Response deleteUser(@PathParam("username") @ApiParam("The name that needs @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username) { + public Response getUserByName( +@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username +) { return Response.ok().entity("magic!").build(); } @@ -86,7 +96,11 @@ public Response getUserByName(@PathParam("username") @ApiParam("The name that ne @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username + +,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password + +) { return Response.ok().entity("magic!").build(); } @@ -108,7 +122,11 @@ public Response logoutUser() { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User user) { + public Response updateUser( +@PathParam("username") @ApiParam("name that need to be deleted") String username +, + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 94a5a021957b..ccfa7a6b32c3 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -31,7 +31,9 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response call123testSpecialTags(@Valid @NotNull Client client) { + public Response call123testSpecialTags( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeApi.java index 9f777c3f6bac..5b6b51a08dbf 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeApi.java @@ -70,7 +70,13 @@ public Response fakeHealthGet() { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "The instance started successfully") }) - public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") String query1,@HeaderParam("header_1") String header1) { + public Response fakeHttpSignatureTest( + + @Valid @NotNull Pet pet,@QueryParam("query_1") String query1 + +, + +@HeaderParam("header_1") String header1) { return Response.ok().entity("magic!").build(); } @@ -82,7 +88,9 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output boolean") }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -94,7 +102,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output composite") }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite outerComposite) { return Response.ok().entity("magic!").build(); } @@ -106,7 +116,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output number") }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -118,7 +130,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output string") }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -130,7 +144,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output enum (int)") }) - public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { + public Response fakePropertyEnumIntegerSerialize( + + @Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Response.ok().entity("magic!").build(); } @@ -152,7 +168,9 @@ public Response fakeTestsDefaults() { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testAdditionalPropertiesReference(@Valid @NotNull Map requestBody) { + public Response testAdditionalPropertiesReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -163,7 +181,9 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map enumHeaderStringArray,@QueryParam("enum_query_string_array") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@QueryParam("enum_query_double") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@QueryParam("enum_query_string_array") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString + +,@QueryParam("enum_query_integer") Integer enumQueryInteger + +,@QueryParam("enum_query_double") Double enumQueryDouble + +,@QueryParam("enum_query_model_array") List enumQueryModelArray + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -227,7 +299,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") Li @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Something wrong") }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@QueryParam("string_group") Integer stringGroup,@HeaderParam("boolean_group") Boolean booleanGroup,@QueryParam("int64_group") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull Long requiredInt64Group + +,@QueryParam("string_group") Integer stringGroup + +, + +@HeaderParam("boolean_group") Boolean booleanGroup,@QueryParam("int64_group") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -238,7 +322,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map requestBody) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -249,7 +335,9 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +,@QueryParam("allowEmpty") @NotNull String allowEmpty + +,@QueryParam("language") Map language + +) { return Response.ok().entity("magic!").build(); } @@ -292,7 +400,9 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testStringMapReference(@Valid @NotNull Map requestBody) { + public Response testStringMapReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -304,7 +414,13 @@ public Response testStringMapReference(@Valid @NotNull Map reque @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response uploadFileWithRequiredFile(@PathParam("petId") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index a4a16c900d5f..13b680508eae 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,7 +31,9 @@ public class FakeClassnameTestApi { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testClassname(@Valid @NotNull Client client) { + public Response testClassname( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/PetApi.java index 7fbc5a48d90c..d35fec8089fb 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/PetApi.java @@ -34,7 +34,9 @@ public class PetApi { @ApiResponse(responseCode = "200", description = "Successful operation"), @ApiResponse(responseCode = "405", description = "Invalid input") }) - public Response addPet(@Valid @NotNull Pet pet) { + public Response addPet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -45,7 +47,9 @@ public Response addPet(@Valid @NotNull Pet pet) { @ApiResponse(responseCode = "200", description = "Successful operation"), @ApiResponse(responseCode = "400", description = "Invalid pet value") }) - public Response deletePet(@PathParam("petId") Long petId) { + public Response deletePet( +@PathParam("petId") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -57,7 +61,9 @@ public Response deletePet(@PathParam("petId") Long petId) { @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid status value") }) - public Response findPetsByStatus(@QueryParam("status") @NotNull List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull List status + +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +75,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull List s @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) - public Response findPetsByTags(@QueryParam("tags") @NotNull Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -82,7 +90,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull Set tags) @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) - public Response getPetById(@PathParam("petId") Long petId) { + public Response getPetById( +@PathParam("petId") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -95,7 +105,9 @@ public Response getPetById(@PathParam("petId") Long petId) { @ApiResponse(responseCode = "404", description = "Pet not found"), @ApiResponse(responseCode = "405", description = "Validation exception") }) - public Response updatePet(@Valid @NotNull Pet pet) { + public Response updatePet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -107,7 +119,13 @@ public Response updatePet(@Valid @NotNull Pet pet) { @ApiResponse(responseCode = "200", description = "Successful operation"), @ApiResponse(responseCode = "405", description = "Invalid input") }) - public Response updatePetWithForm(@PathParam("petId") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -119,7 +137,13 @@ public Response updatePetWithForm(@PathParam("petId") Long petId,@FormParam(valu @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response uploadFile(@PathParam("petId") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/StoreApi.java index 58aa78b1c55f..f6392c3bca9f 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,9 @@ public class StoreApi { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) - public Response deleteOrder(@PathParam("order_id") String orderId) { + public Response deleteOrder( +@PathParam("order_id") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -56,7 +58,9 @@ public Response getInventory() { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) Long order @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid Order") }) - public Response placeOrder(@Valid @NotNull Order order) { + public Response placeOrder( + + @Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/UserApi.java index dd0331626cfe..a330bbf828cb 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta/src/gen/java/org/openapitools/api/UserApi.java @@ -31,7 +31,9 @@ public class UserApi { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response createUser(@Valid @NotNull User user) { + public Response createUser( + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } @@ -42,7 +44,9 @@ public Response createUser(@Valid @NotNull User user) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -53,7 +57,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -64,7 +70,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) - public Response deleteUser(@PathParam("username") String username) { + public Response deleteUser( +@PathParam("username") String username +) { return Response.ok().entity("magic!").build(); } @@ -77,7 +85,9 @@ public Response deleteUser(@PathParam("username") String username) { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) - public Response getUserByName(@PathParam("username") String username) { + public Response getUserByName( +@PathParam("username") String username +) { return Response.ok().entity("magic!").build(); } @@ -89,7 +99,11 @@ public Response getUserByName(@PathParam("username") String username) { @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) - public Response loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) { + public Response loginUser(@QueryParam("username") @NotNull String username + +,@QueryParam("password") @NotNull String password + +) { return Response.ok().entity("magic!").build(); } @@ -111,7 +125,11 @@ public Response logoutUser() { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) - public Response updateUser(@PathParam("username") String username,@Valid @NotNull User user) { + public Response updateUser( +@PathParam("username") String username +, + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java index c0900ccaf0b9..8af8f6cb1387 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -31,7 +31,9 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response call123testSpecialTags(@Valid @NotNull Client client) { + public Response call123testSpecialTags( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeApi.java index 643c03ee2903..8289464e773d 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeApi.java @@ -70,7 +70,13 @@ public Response fakeHealthGet() { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "The instance started successfully") }) - public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") String query1,@HeaderParam("header_1") String header1) { + public Response fakeHttpSignatureTest( + + @Valid @NotNull Pet pet,@QueryParam("query_1") String query1 + +, + +@HeaderParam("header_1") String header1) { return Response.ok().entity("magic!").build(); } @@ -82,7 +88,9 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output boolean") }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -94,7 +102,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output composite") }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite outerComposite) { return Response.ok().entity("magic!").build(); } @@ -106,7 +116,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output number") }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -118,7 +130,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output string") }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -130,7 +144,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Output enum (int)") }) - public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { + public Response fakePropertyEnumIntegerSerialize( + + @Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Response.ok().entity("magic!").build(); } @@ -152,7 +168,9 @@ public Response fakeTestsDefaults() { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testAdditionalPropertiesReference(@Valid @NotNull Map requestBody) { + public Response testAdditionalPropertiesReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -163,7 +181,9 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map enumHeaderStringArray,@QueryParam("enum_query_string_array") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@QueryParam("enum_query_double") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@QueryParam("enum_query_string_array") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString + +,@QueryParam("enum_query_integer") Integer enumQueryInteger + +,@QueryParam("enum_query_double") Double enumQueryDouble + +,@QueryParam("enum_query_model_array") List enumQueryModelArray + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -227,7 +299,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") Li @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Something wrong") }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@QueryParam("string_group") Integer stringGroup,@HeaderParam("boolean_group") Boolean booleanGroup,@QueryParam("int64_group") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull Long requiredInt64Group + +,@QueryParam("string_group") Integer stringGroup + +, + +@HeaderParam("boolean_group") Boolean booleanGroup,@QueryParam("int64_group") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -238,7 +322,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map requestBody) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -249,7 +335,9 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +,@QueryParam("allowEmpty") @NotNull String allowEmpty + +,@QueryParam("language") Map language + +) { return Response.ok().entity("magic!").build(); } @@ -292,7 +400,9 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testStringMapReference(@Valid @NotNull Map requestBody) { + public Response testStringMapReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -304,7 +414,13 @@ public Response testStringMapReference(@Valid @NotNull Map reque @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response uploadFileWithRequiredFile(@PathParam("petId") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 8363c8fe4050..2d8f000bc0d0 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,7 +31,9 @@ public class FakeClassnameTestApi { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response testClassname(@Valid @NotNull Client client) { + public Response testClassname( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/PetApi.java index c041ec05c1ee..6e710ca0660a 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/PetApi.java @@ -34,7 +34,9 @@ public class PetApi { @ApiResponse(responseCode = "200", description = "Successful operation"), @ApiResponse(responseCode = "405", description = "Invalid input") }) - public Response addPet(@Valid @NotNull Pet pet) { + public Response addPet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -45,7 +47,9 @@ public Response addPet(@Valid @NotNull Pet pet) { @ApiResponse(responseCode = "200", description = "Successful operation"), @ApiResponse(responseCode = "400", description = "Invalid pet value") }) - public Response deletePet(@PathParam("petId") Long petId) { + public Response deletePet( +@PathParam("petId") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -57,7 +61,9 @@ public Response deletePet(@PathParam("petId") Long petId) { @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid status value") }) - public Response findPetsByStatus(@QueryParam("status") @NotNull List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull List status + +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +75,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull List s @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) - public Response findPetsByTags(@QueryParam("tags") @NotNull Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -82,7 +90,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull Set tags) @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) - public Response getPetById(@PathParam("petId") Long petId) { + public Response getPetById( +@PathParam("petId") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -95,7 +105,9 @@ public Response getPetById(@PathParam("petId") Long petId) { @ApiResponse(responseCode = "404", description = "Pet not found"), @ApiResponse(responseCode = "405", description = "Validation exception") }) - public Response updatePet(@Valid @NotNull Pet pet) { + public Response updatePet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -107,7 +119,13 @@ public Response updatePet(@Valid @NotNull Pet pet) { @ApiResponse(responseCode = "200", description = "Successful operation"), @ApiResponse(responseCode = "405", description = "Invalid input") }) - public Response updatePetWithForm(@PathParam("petId") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -119,7 +137,13 @@ public Response updatePetWithForm(@PathParam("petId") Long petId,@FormParam(valu @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response uploadFile(@PathParam("petId") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/StoreApi.java index e2745e17cc58..5771fada50a4 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/StoreApi.java @@ -32,7 +32,9 @@ public class StoreApi { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) - public Response deleteOrder(@PathParam("order_id") String orderId) { + public Response deleteOrder( +@PathParam("order_id") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -56,7 +58,9 @@ public Response getInventory() { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) Long order @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid Order") }) - public Response placeOrder(@Valid @NotNull Order order) { + public Response placeOrder( + + @Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/UserApi.java index f0620ed4f5fb..761ee977187e 100644 --- a/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-swagger-v3-annotations/src/gen/java/org/openapitools/api/UserApi.java @@ -31,7 +31,9 @@ public class UserApi { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response createUser(@Valid @NotNull User user) { + public Response createUser( + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } @@ -42,7 +44,9 @@ public Response createUser(@Valid @NotNull User user) { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -53,7 +57,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -64,7 +70,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) - public Response deleteUser(@PathParam("username") String username) { + public Response deleteUser( +@PathParam("username") String username +) { return Response.ok().entity("magic!").build(); } @@ -77,7 +85,9 @@ public Response deleteUser(@PathParam("username") String username) { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) - public Response getUserByName(@PathParam("username") String username) { + public Response getUserByName( +@PathParam("username") String username +) { return Response.ok().entity("magic!").build(); } @@ -89,7 +99,11 @@ public Response getUserByName(@PathParam("username") String username) { @ApiResponse(responseCode = "200", description = "successful operation"), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) - public Response loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) { + public Response loginUser(@QueryParam("username") @NotNull String username + +,@QueryParam("password") @NotNull String password + +) { return Response.ok().entity("magic!").build(); } @@ -111,7 +125,11 @@ public Response logoutUser() { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) - public Response updateUser(@PathParam("username") String username,@Valid @NotNull User user) { + public Response updateUser( +@PathParam("username") String username +, + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 43c56b63876d..cd1a21392f88 100644 --- a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -28,7 +28,9 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@Valid @NotNull Client client) { + public Response call123testSpecialTags( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeApi.java index c553cd4988de..125ad5fc1d7d 100644 --- a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeApi.java @@ -70,7 +70,13 @@ public Response fakeHealthGet() { @ApiResponses(value = { @ApiResponse(code = 200, message = "The instance started successfully", response = Void.class) }) - public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") @ApiParam("query parameter") String query1,@HeaderParam("header_1") @ApiParam("header parameter") String header1) { + public Response fakeHttpSignatureTest( + + @Valid @NotNull Pet pet,@QueryParam("query_1") @ApiParam("query parameter") String query1 + +, + +@HeaderParam("header_1") @ApiParam("header parameter") String header1) { return Response.ok().entity("magic!").build(); } @@ -82,7 +88,9 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query @ApiResponses(value = { @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -94,7 +102,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite outerComposite) { return Response.ok().entity("magic!").build(); } @@ -106,7 +116,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite @ApiResponses(value = { @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -118,7 +130,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -130,7 +144,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output enum (int)", response = OuterObjectWithEnumProperty.class) }) - public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { + public Response fakePropertyEnumIntegerSerialize( + + @Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Response.ok().entity("magic!").build(); } @@ -152,7 +168,9 @@ public Response fakeTestsDefaults() { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testAdditionalPropertiesReference(@Valid @NotNull Map requestBody) { + public Response testAdditionalPropertiesReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -163,7 +181,9 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray, + +@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble + +,@QueryParam("enum_query_model_array") List enumQueryModelArray + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -233,7 +307,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @A @ApiResponses(value = { @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -244,7 +330,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map requestBody) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -255,7 +343,9 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +,@QueryParam("allowEmpty") @NotNull String allowEmpty + +,@QueryParam("language") Map language + +) { return Response.ok().entity("magic!").build(); } @@ -298,7 +408,9 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testStringMapReference(@Valid @NotNull Map requestBody) { + public Response testStringMapReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -314,7 +426,13 @@ public Response testStringMapReference(@Valid @NotNull Map reque @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 66a439b72975..cc63c7be7d77 100644 --- a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,7 +31,9 @@ public class FakeClassnameTestApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@Valid @NotNull Client client) { + public Response testClassname( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/PetApi.java index 695bb14fca6a..507f9e422bfc 100644 --- a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/PetApi.java @@ -35,7 +35,9 @@ public class PetApi { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@Valid @NotNull Pet pet) { + public Response addPet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -50,7 +52,11 @@ public Response addPet(@Valid @NotNull Pet pet) { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) { + public Response deletePet( +@PathParam("petId") @ApiParam("Pet id to delete") Long petId +, + +@HeaderParam("api_key") String apiKey) { return Response.ok().entity("magic!").build(); } @@ -66,7 +72,9 @@ public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status + +) { return Response.ok().entity("magic!").build(); } @@ -82,7 +90,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Stat @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -98,7 +108,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) { + public Response getPetById( +@PathParam("petId") @ApiParam("ID of pet to return") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -115,7 +127,9 @@ public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") @ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@Valid @NotNull Pet pet) { + public Response updatePet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -131,7 +145,13 @@ public Response updatePet(@Valid @NotNull Pet pet) { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -147,7 +167,13 @@ public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/StoreApi.java index 91c5f3b7646f..ec0f58a65bbf 100644 --- a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/StoreApi.java @@ -29,7 +29,9 @@ public class StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder( +@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -56,7 +58,9 @@ public Response getInventory() { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam( @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@Valid @NotNull Order order) { + public Response placeOrder( + + @Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/UserApi.java index 4d2494b95ff9..6130632d9e89 100644 --- a/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-withxml/src/gen/java/org/openapitools/api/UserApi.java @@ -28,7 +28,9 @@ public class UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@Valid @NotNull User user) { + public Response createUser( + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } @@ -39,7 +41,9 @@ public Response createUser(@Valid @NotNull User user) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -50,7 +54,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -61,7 +67,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) { + public Response deleteUser( +@PathParam("username") @ApiParam("The name that needs to be deleted") String username +) { return Response.ok().entity("magic!").build(); } @@ -74,7 +82,9 @@ public Response deleteUser(@PathParam("username") @ApiParam("The name that needs @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username) { + public Response getUserByName( +@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username +) { return Response.ok().entity("magic!").build(); } @@ -86,7 +96,11 @@ public Response getUserByName(@PathParam("username") @ApiParam("The name that ne @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username + +,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password + +) { return Response.ok().entity("magic!").build(); } @@ -108,7 +122,11 @@ public Response logoutUser() { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User user) { + public Response updateUser( +@PathParam("username") @ApiParam("name that need to be deleted") String username +, + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java index 94171846744b..7a0a99f66e7a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java @@ -70,7 +70,12 @@ public Response fakeHealthGet() { @ApiResponses(value = { @ApiResponse(code = 200, message = "The instance started successfully", response = Void.class) }) - public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") @ApiParam("query parameter") String query1,@HeaderParam("header_1") @ApiParam("header parameter") String header1) { + public Response fakeHttpSignatureTest( + @Valid @NotNull Pet pet, @QueryParam("query_1") @ApiParam("query parameter") String query1 + + , + + @HeaderParam("header_1") @ApiParam("header parameter") String header1) { return Response.ok().entity("magic!").build(); } @@ -82,7 +87,9 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query @ApiResponses(value = { @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { + public Response fakeOuterBooleanSerialize( + + @Valid Boolean body) { return Response.ok().entity("magic!").build(); } @@ -94,7 +101,9 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) { + public Response fakeOuterCompositeSerialize( + + @Valid OuterComposite outerComposite) { return Response.ok().entity("magic!").build(); } @@ -106,7 +115,9 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite @ApiResponses(value = { @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { + public Response fakeOuterNumberSerialize( + + @Valid BigDecimal body) { return Response.ok().entity("magic!").build(); } @@ -118,7 +129,9 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output string", response = String.class) }) - public Response fakeOuterStringSerialize(@Valid String body) { + public Response fakeOuterStringSerialize( + + @Valid String body) { return Response.ok().entity("magic!").build(); } @@ -130,7 +143,9 @@ public Response fakeOuterStringSerialize(@Valid String body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "Output enum (int)", response = OuterObjectWithEnumProperty.class) }) - public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { + public Response fakePropertyEnumIntegerSerialize( + + @Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Response.ok().entity("magic!").build(); } @@ -152,7 +167,9 @@ public Response fakeTestsDefaults() { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testAdditionalPropertiesReference(@Valid @NotNull Map requestBody) { + public Response testAdditionalPropertiesReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -163,7 +180,9 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters( + +@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray + +,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString + +,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger + +,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble + +,@QueryParam("enum_query_model_array") List enumQueryModelArray + +, + +@FormParam(value = "enum_form_string_array") List enumFormStringArray, + +@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -236,7 +307,19 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @A @ApiResponses(value = { @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup + +, + +@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group + +,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup + +, + +@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group + +) { return Response.ok().entity("magic!").build(); } @@ -247,7 +330,9 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map requestBody) { + public Response testInlineAdditionalProperties( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -258,7 +343,9 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe + +,@QueryParam("ioutil") @NotNull List ioutil + +,@QueryParam("http") @NotNull List http + +,@QueryParam("url") @NotNull List url + +,@QueryParam("context") @NotNull List context + +,@QueryParam("allowEmpty") @NotNull String allowEmpty + +,@QueryParam("language") Map language + +) { return Response.ok().entity("magic!").build(); } @@ -301,7 +408,9 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testStringMapReference(@Valid @NotNull Map requestBody) { + public Response testStringMapReference( + + @Valid @NotNull Map requestBody) { return Response.ok().entity("magic!").build(); } @@ -317,7 +426,13 @@ public Response testStringMapReference(@Valid @NotNull Map reque @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { + public Response uploadFileWithRequiredFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + + @FormParam(value = "requiredFile") InputStream requiredFileInputStream, + +@FormParam(value = "additionalMetadata") String additionalMetadata) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 66a439b72975..cc63c7be7d77 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -31,7 +31,9 @@ public class FakeClassnameTestApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response testClassname(@Valid @NotNull Client client) { + public Response testClassname( + + @Valid @NotNull Client client) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java index c38692fa42a9..fd4c95d10d6c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java @@ -35,7 +35,9 @@ public class PetApi { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@Valid @NotNull Pet pet) { + public Response addPet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -53,7 +55,9 @@ public Response addPet(@Valid @NotNull Pet pet) { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId) { + public Response deletePet( +@PathParam("petId") @ApiParam("Pet id to delete") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List status + +) { return Response.ok().entity("magic!").build(); } @@ -85,7 +91,9 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Stat @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags + +) { return Response.ok().entity("magic!").build(); } @@ -101,7 +109,9 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) - public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) { + public Response getPetById( +@PathParam("petId") @ApiParam("ID of pet to return") Long petId +) { return Response.ok().entity("magic!").build(); } @@ -118,7 +128,9 @@ public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") @ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@Valid @NotNull Pet pet) { + public Response updatePet( + + @Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -134,7 +146,13 @@ public Response updatePet(@Valid @NotNull Pet pet) { @ApiResponse(code = 200, message = "Successful operation", response = Void.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { + public Response updatePetWithForm( +@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId +, + +@FormParam(value = "name") String name, + +@FormParam(value = "status") String status) { return Response.ok().entity("magic!").build(); } @@ -150,7 +168,13 @@ public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) { + public Response uploadFile( +@PathParam("petId") @ApiParam("ID of pet to update") Long petId +, + +@FormParam(value = "additionalMetadata") String additionalMetadata, + + @FormParam(value = "file") InputStream _fileInputStream) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java index 91c5f3b7646f..ec0f58a65bbf 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java @@ -29,7 +29,9 @@ public class StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder( +@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId +) { return Response.ok().entity("magic!").build(); } @@ -56,7 +58,9 @@ public Response getInventory() { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById( +@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId +) { return Response.ok().entity("magic!").build(); } @@ -69,7 +73,9 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam( @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - public Response placeOrder(@Valid @NotNull Order order) { + public Response placeOrder( + + @Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java index 4d2494b95ff9..6130632d9e89 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java @@ -28,7 +28,9 @@ public class UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@Valid @NotNull User user) { + public Response createUser( + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } @@ -39,7 +41,9 @@ public Response createUser(@Valid @NotNull User user) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithArrayInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -50,7 +54,9 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { + public Response createUsersWithListInput( + + @Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @@ -61,7 +67,9 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) { + public Response deleteUser( +@PathParam("username") @ApiParam("The name that needs to be deleted") String username +) { return Response.ok().entity("magic!").build(); } @@ -74,7 +82,9 @@ public Response deleteUser(@PathParam("username") @ApiParam("The name that needs @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username) { + public Response getUserByName( +@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing.") String username +) { return Response.ok().entity("magic!").build(); } @@ -86,7 +96,11 @@ public Response getUserByName(@PathParam("username") @ApiParam("The name that ne @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username + +,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password + +) { return Response.ok().entity("magic!").build(); } @@ -108,7 +122,11 @@ public Response logoutUser() { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User user) { + public Response updateUser( +@PathParam("username") @ApiParam("name that need to be deleted") String username +, + + @Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } }