diff --git a/bin/configs/jaxrs-spec-jakarta.yaml b/bin/configs/jaxrs-spec-jakarta.yaml
new file mode 100644
index 00000000000..760dbdea9df
--- /dev/null
+++ b/bin/configs/jaxrs-spec-jakarta.yaml
@@ -0,0 +1,11 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-jakarta
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-petstore-server-jakarta
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ implicitHeadersRegex: (api_key|enum_header_string)
+ generateBuilders: "true"
+ useJakartaEe: "true"
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache
index c0a2e6218b0..2b2978c9123 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache
@@ -89,11 +89,20 @@
joda-time
${joda-version}
+ {{#useJakartaEe}}
+
+ jakarta.annotation
+ jakarta.annotation-api
+ ${javax.annotation-api-version}
+
+ {{/useJakartaEe}}
+ {{^useJakartaEe}}
javax.annotation
javax.annotation-api
${javax.annotation-api-version}
+ {{/useJakartaEe}}
{{#useSwaggerAnnotations}}
io.swagger
@@ -154,10 +163,25 @@
2.9.9
4.13.2
2.10.13
+{{#useJakartaEe}}
+ 2.1.1
+{{/useJakartaEe}}
+{{^useJakartaEe}}
1.3.2
+{{/useJakartaEe}}
{{#useBeanValidation}}
+{{#useJakartaEe}}
+ 3.0.2
+{{/useJakartaEe}}
+{{^useJakartaEe}}
2.0.2
+{{/useJakartaEe}}
{{/useBeanValidation}}
+{{#useJakartaEe}}
+ 3.1.0
+{{/useJakartaEe}}
+{{^useJakartaEe}}
2.1.6
+{{/useJakartaEe}}
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator-ignore b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator-ignore
new file mode 100644
index 00000000000..7484ee590a3
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES
new file mode 100644
index 00000000000..cf689a825e5
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES
@@ -0,0 +1,59 @@
+README.md
+pom.xml
+src/gen/java/org/openapitools/api/AnotherFakeApi.java
+src/gen/java/org/openapitools/api/FakeApi.java
+src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
+src/gen/java/org/openapitools/api/PetApi.java
+src/gen/java/org/openapitools/api/RestApplication.java
+src/gen/java/org/openapitools/api/RestResourceRoot.java
+src/gen/java/org/openapitools/api/StoreApi.java
+src/gen/java/org/openapitools/api/UserApi.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java
+src/gen/java/org/openapitools/model/AdditionalPropertiesString.java
+src/gen/java/org/openapitools/model/Animal.java
+src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java
+src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java
+src/gen/java/org/openapitools/model/ArrayTest.java
+src/gen/java/org/openapitools/model/BigCat.java
+src/gen/java/org/openapitools/model/BigCatAllOf.java
+src/gen/java/org/openapitools/model/Capitalization.java
+src/gen/java/org/openapitools/model/Cat.java
+src/gen/java/org/openapitools/model/CatAllOf.java
+src/gen/java/org/openapitools/model/Category.java
+src/gen/java/org/openapitools/model/ClassModel.java
+src/gen/java/org/openapitools/model/Client.java
+src/gen/java/org/openapitools/model/Dog.java
+src/gen/java/org/openapitools/model/DogAllOf.java
+src/gen/java/org/openapitools/model/EnumArrays.java
+src/gen/java/org/openapitools/model/EnumClass.java
+src/gen/java/org/openapitools/model/EnumTest.java
+src/gen/java/org/openapitools/model/FileSchemaTestClass.java
+src/gen/java/org/openapitools/model/FormatTest.java
+src/gen/java/org/openapitools/model/HasOnlyReadOnly.java
+src/gen/java/org/openapitools/model/MapTest.java
+src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java
+src/gen/java/org/openapitools/model/Model200Response.java
+src/gen/java/org/openapitools/model/ModelApiResponse.java
+src/gen/java/org/openapitools/model/ModelFile.java
+src/gen/java/org/openapitools/model/ModelList.java
+src/gen/java/org/openapitools/model/ModelReturn.java
+src/gen/java/org/openapitools/model/Name.java
+src/gen/java/org/openapitools/model/NumberOnly.java
+src/gen/java/org/openapitools/model/Order.java
+src/gen/java/org/openapitools/model/OuterComposite.java
+src/gen/java/org/openapitools/model/OuterEnum.java
+src/gen/java/org/openapitools/model/Pet.java
+src/gen/java/org/openapitools/model/ReadOnlyFirst.java
+src/gen/java/org/openapitools/model/SpecialModelName.java
+src/gen/java/org/openapitools/model/Tag.java
+src/gen/java/org/openapitools/model/TypeHolderDefault.java
+src/gen/java/org/openapitools/model/TypeHolderExample.java
+src/gen/java/org/openapitools/model/User.java
+src/gen/java/org/openapitools/model/XmlItem.java
+src/main/openapi/openapi.yaml
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION
new file mode 100644
index 00000000000..95894ebaa9c
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION
@@ -0,0 +1 @@
+6.4.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/README.md b/samples/server/petstore/jaxrs-spec-jakarta/README.md
new file mode 100644
index 00000000000..da90cb71c16
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/README.md
@@ -0,0 +1,27 @@
+# JAX-RS server with OpenAPI
+
+## Overview
+This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an
+[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub.
+
+This is an example of building a OpenAPI-enabled JAX-RS server.
+This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework.
+
+
+The JAX-RS implementation needs to be provided by the application server you are deploying on.
+
+To run the server from the command line, you can use maven to provision and start a TomEE Server.
+Please execute the following:
+
+```
+mvn -Dtomee-embedded-plugin.http=80 package org.apache.tomee.maven:tomee-embedded-maven-plugin:7.0.5:run
+```
+
+You can then call your server endpoints under:
+
+```
+http://localhost:80/v2/
+```
+
+Note that if you have configured the `host` to be something other than localhost, the calls through
+swagger-ui will be directed to that host and not localhost!
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/pom.xml b/samples/server/petstore/jaxrs-spec-jakarta/pom.xml
new file mode 100644
index 00000000000..653b43d3ccd
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/pom.xml
@@ -0,0 +1,139 @@
+
+ 4.0.0
+ org.openapitools
+ jaxrs-spec-petstore-server-jakarta
+ war
+ jaxrs-spec-petstore-server-jakarta
+ 1.0.0
+
+
+
+ src/main/java
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.9.1
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/gen/java
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
+
+ false
+
+
+
+ maven-failsafe-plugin
+ 2.6
+
+
+
+ integration-test
+ verify
+
+
+
+
+
+
+
+
+ jakarta.ws.rs
+ jakarta.ws.rs-api
+ ${jakarta.ws.rs-version}
+ provided
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.jaxrs
+ jackson-jaxrs-json-provider
+ ${jackson-version}
+
+
+ joda-time
+ joda-time
+ ${joda-version}
+
+
+ jakarta.annotation
+ jakarta.annotation-api
+ ${javax.annotation-api-version}
+
+
+ io.swagger
+ swagger-annotations
+ provided
+ 1.5.3
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+ org.testng
+ testng
+ 6.8.8
+ test
+
+
+ junit
+ junit
+
+
+ snakeyaml
+ org.yaml
+
+
+ bsh
+ org.beanshell
+
+
+
+
+
+ jakarta.validation
+ jakarta.validation-api
+ ${beanvalidation-version}
+ provided
+
+
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ UTF-8
+ 2.9.9
+ 4.13.2
+ 2.10.13
+ 2.1.1
+ 3.0.2
+ 3.1.0
+
+
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
new file mode 100644
index 00000000000..2b4dd0808bf
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java
@@ -0,0 +1,31 @@
+package org.openapitools.api;
+
+import org.openapitools.model.Client;
+
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.Response;
+
+import io.swagger.annotations.*;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.List;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+@Path("/another-fake/dummy")
+@Api(description = "the another-fake API")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class AnotherFakeApi {
+
+ @PATCH
+ @Consumes({ "application/json" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Client.class)
+ })
+ public Response call123testSpecialTags(@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
new file mode 100644
index 00000000000..3b839c28295
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeApi.java
@@ -0,0 +1,203 @@
+package org.openapitools.api;
+
+import java.math.BigDecimal;
+import org.openapitools.model.Client;
+import java.util.Date;
+import java.io.File;
+import org.openapitools.model.FileSchemaTestClass;
+import org.joda.time.LocalDate;
+import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
+import org.openapitools.model.OuterComposite;
+import org.openapitools.model.User;
+import org.openapitools.model.XmlItem;
+
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.Response;
+
+import io.swagger.annotations.*;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.List;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+@Path("/fake")
+@Api(description = "the fake API")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class FakeApi {
+
+ @POST
+ @Path("/create_xml_item")
+ @Consumes({ "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" })
+ @ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/outer/boolean")
+ @Produces({ "*/*" })
+ @ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class)
+ })
+ public Response fakeOuterBooleanSerialize(@Valid Boolean body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/outer/composite")
+ @Produces({ "*/*" })
+ @ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class)
+ })
+ public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/outer/number")
+ @Produces({ "*/*" })
+ @ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class)
+ })
+ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/outer/string")
+ @Produces({ "*/*" })
+ @ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Output string", response = String.class)
+ })
+ public Response fakeOuterStringSerialize(@Valid String body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @PUT
+ @Path("/body-with-file-schema")
+ @Consumes({ "application/json" })
+ @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Success", response = Void.class)
+ })
+ public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @PUT
+ @Path("/body-with-query-params")
+ @Consumes({ "application/json" })
+ @ApiOperation(value = "", notes = "", response = Void.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Success", response = Void.class)
+ })
+ public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @PATCH
+ @Consumes({ "application/json" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Client.class)
+ })
+ public Response testClientModel(@Valid @NotNull Client body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Consumes({ "application/x-www-form-urlencoded" })
+ @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = {
+
+ @Authorization(value = "http_basic_test")
+ }, tags={ "fake" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Consumes({ "application/x-www-form-urlencoded" })
+ @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake" })
+ @io.swagger.annotations.ApiImplicitParams({
+ @io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header")
+ })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @DELETE
+ @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake" })
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/inline-additionalProperties")
+ @Consumes({ "application/json" })
+ @ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response testInlineAdditionalProperties(@Valid @NotNull Map param) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/jsonFormData")
+ @Consumes({ "application/x-www-form-urlencoded" })
+ @ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @PUT
+ @Path("/test-query-parameters")
+ @ApiOperation(value = "", notes = "To test the collection format in query parameters", response = Void.class, tags={ "fake" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Success", response = Void.class)
+ })
+ 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();
+ }
+
+ @POST
+ @Path("/{petId}/uploadImageWithRequiredFile")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @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) {
+ 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
new file mode 100644
index 00000000000..fe39b3ce47b
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -0,0 +1,34 @@
+package org.openapitools.api;
+
+import org.openapitools.model.Client;
+
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.Response;
+
+import io.swagger.annotations.*;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.List;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+@Path("/fake_classname_test")
+@Api(description = "the fake_classname_test API")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class FakeClassnameTestApi {
+
+ @PATCH
+ @Consumes({ "application/json" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", response = Client.class, authorizations = {
+
+ @Authorization(value = "api_key_query")
+ }, tags={ "fake_classname_tags 123#$%^" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Client.class)
+ })
+ 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
new file mode 100644
index 00000000000..9af910e89eb
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/PetApi.java
@@ -0,0 +1,152 @@
+package org.openapitools.api;
+
+import java.io.File;
+import org.openapitools.model.ModelApiResponse;
+import org.openapitools.model.Pet;
+import java.util.Set;
+
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.Response;
+
+import io.swagger.annotations.*;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.List;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+@Path("/pet")
+@Api(description = "the pet API")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class PetApi {
+
+ @POST
+ @Consumes({ "application/json", "application/xml" })
+ @ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @DELETE
+ @Path("/{petId}")
+ @ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @io.swagger.annotations.ApiImplicitParams({
+ @io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
+ })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/findByStatus")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/findByTags")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/{petId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
+
+ @Authorization(value = "api_key")
+ }, tags={ "pet" })
+ @ApiResponses(value = {
+ @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)
+ })
+ public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @PUT
+ @Consumes({ "application/json", "application/xml" })
+ @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class),
+ @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)
+ })
+ public Response updatePet(@Valid @NotNull Pet body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/{petId}")
+ @Consumes({ "application/x-www-form-urlencoded" })
+ @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/{petId}/uploadImage")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets") })
+ }, tags={ "pet" })
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+}
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/RestApplication.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/RestApplication.java
new file mode 100644
index 00000000000..f6d53b4501d
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/RestApplication.java
@@ -0,0 +1,9 @@
+package org.openapitools.api;
+
+import jakarta.ws.rs.ApplicationPath;
+import jakarta.ws.rs.core.Application;
+
+@ApplicationPath(RestResourceRoot.APPLICATION_PATH)
+public class RestApplication extends Application {
+
+}
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/RestResourceRoot.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/RestResourceRoot.java
new file mode 100644
index 00000000000..96ba6c8d8e4
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/RestResourceRoot.java
@@ -0,0 +1,5 @@
+package org.openapitools.api;
+
+public class RestResourceRoot {
+ public static final String APPLICATION_PATH = "/v2";
+}
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
new file mode 100644
index 00000000000..ae3e6058151
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/StoreApi.java
@@ -0,0 +1,71 @@
+package org.openapitools.api;
+
+import java.util.Map;
+import org.openapitools.model.Order;
+
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.Response;
+
+import io.swagger.annotations.*;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.List;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+@Path("/store")
+@Api(description = "the store API")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class StoreApi {
+
+ @DELETE
+ @Path("/order/{order_id}")
+ @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/inventory")
+ @Produces({ "application/json" })
+ @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
+
+ @Authorization(value = "api_key")
+ }, tags={ "store" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map")
+ })
+ public Response getInventory() {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/order/{order_id}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store" })
+ @ApiResponses(value = {
+ @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)
+ })
+ 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();
+ }
+
+ @POST
+ @Path("/order")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
+ @ApiResponses(value = {
+ @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) {
+ 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
new file mode 100644
index 00000000000..bd46c2f21de
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java
@@ -0,0 +1,108 @@
+package org.openapitools.api;
+
+import java.util.Date;
+import java.util.List;
+import org.openapitools.model.User;
+
+import jakarta.ws.rs.*;
+import jakarta.ws.rs.core.Response;
+
+import io.swagger.annotations.*;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.List;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+@Path("/user")
+@Api(description = "the user API")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class UserApi {
+
+ @POST
+ @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response createUser(@Valid @NotNull User body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/createWithArray")
+ @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response createUsersWithArrayInput(@Valid @NotNull List body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @POST
+ @Path("/createWithList")
+ @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response createUsersWithListInput(@Valid @NotNull List body) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @DELETE
+ @Path("/{username}")
+ @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user" })
+ @ApiResponses(value = {
+ @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)
+ })
+ 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();
+ }
+
+ @GET
+ @Path("/login")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @GET
+ @Path("/logout")
+ @ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user" })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = Void.class)
+ })
+ public Response logoutUser() {
+ return Response.ok().entity("magic!").build();
+ }
+
+ @PUT
+ @Path("/{username}")
+ @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
+ @ApiResponses(value = {
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
+}
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java
new file mode 100644
index 00000000000..7a3edf4c3d8
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java
@@ -0,0 +1,86 @@
+package org.openapitools.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+import java.io.Serializable;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+import io.swagger.annotations.*;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+
+
+@JsonTypeName("AdditionalPropertiesAnyType")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class AdditionalPropertiesAnyType extends HashMap implements Serializable {
+ private @Valid String name;
+
+ /**
+ **/
+ public AdditionalPropertiesAnyType name(String name) {
+ this.name = name;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
+ return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesAnyType {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+}
+
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java
new file mode 100644
index 00000000000..f49b4cd70fb
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java
@@ -0,0 +1,87 @@
+package org.openapitools.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.io.Serializable;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+import io.swagger.annotations.*;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+
+
+@JsonTypeName("AdditionalPropertiesArray")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class AdditionalPropertiesArray extends HashMap implements Serializable {
+ private @Valid String name;
+
+ /**
+ **/
+ public AdditionalPropertiesArray name(String name) {
+ this.name = name;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
+ return Objects.equals(this.name, additionalPropertiesArray.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesArray {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+}
+
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java
new file mode 100644
index 00000000000..5807359f01e
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java
@@ -0,0 +1,86 @@
+package org.openapitools.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+import java.io.Serializable;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+import io.swagger.annotations.*;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+
+
+@JsonTypeName("AdditionalPropertiesBoolean")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class AdditionalPropertiesBoolean extends HashMap implements Serializable {
+ private @Valid String name;
+
+ /**
+ **/
+ public AdditionalPropertiesBoolean name(String name) {
+ this.name = name;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
+ return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesBoolean {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+}
+
diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java
new file mode 100644
index 00000000000..40e0c01aed6
--- /dev/null
+++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java
@@ -0,0 +1,530 @@
+package org.openapitools.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.io.Serializable;
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+import io.swagger.annotations.*;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+
+
+@JsonTypeName("AdditionalPropertiesClass")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
+public class AdditionalPropertiesClass implements Serializable {
+ private @Valid Map mapString = null;
+ private @Valid Map mapNumber = null;
+ private @Valid Map mapInteger = null;
+ private @Valid Map mapBoolean = null;
+ private @Valid Map> mapArrayInteger = null;
+ private @Valid Map> mapArrayAnytype = null;
+ private @Valid Map> mapMapString = null;
+ private @Valid Map> mapMapAnytype = null;
+ private @Valid Object anytype1;
+ private @Valid Object anytype2;
+ private @Valid Object anytype3;
+
+ protected AdditionalPropertiesClass(AdditionalPropertiesClassBuilder, ?> b) {
+ this.mapString = b.mapString;
+ this.mapNumber = b.mapNumber;
+ this.mapInteger = b.mapInteger;
+ this.mapBoolean = b.mapBoolean;
+ this.mapArrayInteger = b.mapArrayInteger;
+ this.mapArrayAnytype = b.mapArrayAnytype;
+ this.mapMapString = b.mapMapString;
+ this.mapMapAnytype = b.mapMapAnytype;
+ this.anytype1 = b.anytype1;
+ this.anytype2 = b.anytype2;
+ this.anytype3 = b.anytype3;
+ }
+
+ public AdditionalPropertiesClass() {
+ }
+
+ /**
+ **/
+ public AdditionalPropertiesClass mapString(Map mapString) {
+ this.mapString = mapString;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("map_string")
+ public Map getMapString() {
+ return mapString;
+ }
+
+ @JsonProperty("map_string")
+ public void setMapString(Map mapString) {
+ this.mapString = mapString;
+ }
+
+ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
+ if (this.mapString == null) {
+ this.mapString = new HashMap<>();
+ }
+
+ this.mapString.put(key, mapStringItem);
+ return this;
+ }
+
+ public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) {
+ if (mapStringItem != null && this.mapString != null) {
+ this.mapString.remove(mapStringItem);
+ }
+
+ return this;
+ }
+ /**
+ **/
+ public AdditionalPropertiesClass mapNumber(Map mapNumber) {
+ this.mapNumber = mapNumber;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("map_number")
+ public Map getMapNumber() {
+ return mapNumber;
+ }
+
+ @JsonProperty("map_number")
+ public void setMapNumber(Map mapNumber) {
+ this.mapNumber = mapNumber;
+ }
+
+ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
+ if (this.mapNumber == null) {
+ this.mapNumber = new HashMap<>();
+ }
+
+ this.mapNumber.put(key, mapNumberItem);
+ return this;
+ }
+
+ public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) {
+ if (mapNumberItem != null && this.mapNumber != null) {
+ this.mapNumber.remove(mapNumberItem);
+ }
+
+ return this;
+ }
+ /**
+ **/
+ public AdditionalPropertiesClass mapInteger(Map mapInteger) {
+ this.mapInteger = mapInteger;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("map_integer")
+ public Map getMapInteger() {
+ return mapInteger;
+ }
+
+ @JsonProperty("map_integer")
+ public void setMapInteger(Map mapInteger) {
+ this.mapInteger = mapInteger;
+ }
+
+ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
+ if (this.mapInteger == null) {
+ this.mapInteger = new HashMap<>();
+ }
+
+ this.mapInteger.put(key, mapIntegerItem);
+ return this;
+ }
+
+ public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) {
+ if (mapIntegerItem != null && this.mapInteger != null) {
+ this.mapInteger.remove(mapIntegerItem);
+ }
+
+ return this;
+ }
+ /**
+ **/
+ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) {
+ this.mapBoolean = mapBoolean;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("map_boolean")
+ public Map getMapBoolean() {
+ return mapBoolean;
+ }
+
+ @JsonProperty("map_boolean")
+ public void setMapBoolean(Map mapBoolean) {
+ this.mapBoolean = mapBoolean;
+ }
+
+ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
+ if (this.mapBoolean == null) {
+ this.mapBoolean = new HashMap<>();
+ }
+
+ this.mapBoolean.put(key, mapBooleanItem);
+ return this;
+ }
+
+ public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) {
+ if (mapBooleanItem != null && this.mapBoolean != null) {
+ this.mapBoolean.remove(mapBooleanItem);
+ }
+
+ return this;
+ }
+ /**
+ **/
+ public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) {
+ this.mapArrayInteger = mapArrayInteger;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("map_array_integer")
+ public Map> getMapArrayInteger() {
+ return mapArrayInteger;
+ }
+
+ @JsonProperty("map_array_integer")
+ public void setMapArrayInteger(Map> mapArrayInteger) {
+ this.mapArrayInteger = mapArrayInteger;
+ }
+
+ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) {
+ if (this.mapArrayInteger == null) {
+ this.mapArrayInteger = new HashMap<>();
+ }
+
+ this.mapArrayInteger.put(key, mapArrayIntegerItem);
+ return this;
+ }
+
+ public AdditionalPropertiesClass removeMapArrayIntegerItem(List mapArrayIntegerItem) {
+ if (mapArrayIntegerItem != null && this.mapArrayInteger != null) {
+ this.mapArrayInteger.remove(mapArrayIntegerItem);
+ }
+
+ return this;
+ }
+ /**
+ **/
+ public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) {
+ this.mapArrayAnytype = mapArrayAnytype;
+ return this;
+ }
+
+
+ @ApiModelProperty(value = "")
+ @JsonProperty("map_array_anytype")
+ public Map> getMapArrayAnytype() {
+ return mapArrayAnytype;
+ }
+
+ @JsonProperty("map_array_anytype")
+ public void setMapArrayAnytype(Map> mapArrayAnytype) {
+ this.mapArrayAnytype = mapArrayAnytype;
+ }
+
+ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List