diff --git a/docs/generators/java.md b/docs/generators/java.md
index 3b299ddbd5f..9412972ea89 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -57,10 +57,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.client|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
-|library|library template (sub-template) to use|- **jersey1**
- HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
- **jersey2**
- HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
- **jersey3**
- HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
- **feign**
- HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x
- **okhttp-gson**
- [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
- **retrofit2**
- HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
- **resttemplate**
- HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
- **webclient**
- HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
- **resteasy**
- HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
- **vertx**
- HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
- **google-api-client**
- HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
- **rest-assured**
- HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
- **native**
- HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
- **microprofile**
- HTTP client: Microprofile client 1.x. JSON processing: JSON-B
- **apache-httpclient**
- HTTP client: Apache httpclient 4.x
|okhttp-gson|
+|library|library template (sub-template) to use|- **jersey1**
- HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
- **jersey2**
- HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
- **jersey3**
- HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
- **feign**
- HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x
- **okhttp-gson**
- [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
- **retrofit2**
- HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
- **resttemplate**
- HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
- **webclient**
- HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
- **resteasy**
- HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
- **vertx**
- HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
- **google-api-client**
- HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
- **rest-assured**
- HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
- **native**
- HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
- **microprofile**
- HTTP client: Microprofile client 1.x. JSON processing: JSON-B or Jackson 2.9.x
- **apache-httpclient**
- HTTP client: Apache httpclient 4.x
|okhttp-gson|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null|
+|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
index 18cb5dcead9..ed68cc92997 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
@@ -65,6 +65,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public static final String USE_REFLECTION_EQUALS_HASHCODE = "useReflectionEqualsHashCode";
public static final String CASE_INSENSITIVE_RESPONSE_HEADERS = "caseInsensitiveResponseHeaders";
public static final String MICROPROFILE_FRAMEWORK = "microprofileFramework";
+ public static final String MICROPROFILE_MUTINY = "microprofileMutiny";
public static final String USE_ABSTRACTION_FOR_FILES = "useAbstractionForFiles";
public static final String DYNAMIC_OPERATIONS = "dynamicOperations";
public static final String SUPPORT_STREAMING = "supportStreaming";
@@ -107,6 +108,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
protected boolean doNotUseRx = true;
protected boolean usePlayWS = false;
protected String microprofileFramework = MICROPROFILE_DEFAULT;
+ protected boolean microprofileMutiny = false;
protected String configKey = null;
protected boolean asyncNative = false;
@@ -199,6 +201,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
cliOptions.add(CliOption.newBoolean(USE_REFLECTION_EQUALS_HASHCODE, "Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact."));
cliOptions.add(CliOption.newBoolean(CASE_INSENSITIVE_RESPONSE_HEADERS, "Make API response's headers case-insensitive. Available on " + OKHTTP_GSON + ", " + JERSEY2 + " libraries"));
cliOptions.add(CliOption.newString(MICROPROFILE_FRAMEWORK, "Framework for microprofile. Possible values \"kumuluzee\""));
+ cliOptions.add(CliOption.newString(MICROPROFILE_MUTINY, "Whether to use async types for microprofile (currently only Smallrye Mutiny is supported)."));
cliOptions.add(CliOption.newBoolean(USE_ABSTRACTION_FOR_FILES, "Use alternative types instead of java.io.File to allow passing bytes without a file on disk. Available on resttemplate, webclient, libraries"));
cliOptions.add(CliOption.newBoolean(DYNAMIC_OPERATIONS, "Generate operations dynamically at runtime from an OAS", this.dynamicOperations));
cliOptions.add(CliOption.newBoolean(SUPPORT_STREAMING, "Support streaming endpoint (beta)", this.supportStreaming));
@@ -224,7 +227,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportedLibraries.put(GOOGLE_API_CLIENT, "HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x");
supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8");
supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+");
- supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client 1.x. JSON processing: JSON-B");
+ supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client 1.x. JSON processing: JSON-B or Jackson 2.9.x");
supportedLibraries.put(APACHE, "HTTP client: Apache httpclient 4.x");
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
@@ -336,6 +339,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
}
additionalProperties.put(MICROPROFILE_FRAMEWORK, microprofileFramework);
+ if (additionalProperties.containsKey(MICROPROFILE_MUTINY)) {
+ this.setMicroprofileMutiny(convertPropertyToBooleanAndWriteBack(MICROPROFILE_MUTINY));
+ }
+
if (!additionalProperties.containsKey(MICROPROFILE_REST_CLIENT_VERSION)) {
additionalProperties.put(MICROPROFILE_REST_CLIENT_VERSION, MICROPROFILE_REST_CLIENT_DEFAULT_VERSION);
} else {
@@ -646,7 +653,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("api_exception.mustache", apiExceptionFolder, "ApiException.java"));
supportingFiles.add(new SupportingFile("api_exception_mapper.mustache", apiExceptionFolder, "ApiExceptionMapper.java"));
- serializationLibrary = "none";
+ if (getSerializationLibrary() == null) {
+ LOGGER.info("No serializationLibrary configured, using '{}' as fallback", SERIALIZATION_LIBRARY_JSONB);
+ setSerializationLibrary(SERIALIZATION_LIBRARY_JSONB);
+ } else if (getSerializationLibrary().equals(SERIALIZATION_LIBRARY_GSON)) {
+ forceSerializationLibrary(SERIALIZATION_LIBRARY_JSONB);
+ }
if (microprofileFramework.equals(MICROPROFILE_KUMULUZEE)) {
supportingFiles.add(new SupportingFile("kumuluzee.pom.mustache", "", "pom.xml"));
@@ -1123,7 +1135,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen
this.microprofileFramework = microprofileFramework;
}
- public void setConfigKey(String configKey) {
+ public void setMicroprofileMutiny(boolean microprofileMutiny) {
+ this.microprofileMutiny = microprofileMutiny;
+ }
+
+ public void setConfigKey(String configKey) {
this.configKey = configKey;
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache
index 04119bd5a65..57088929eb6 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache
@@ -15,6 +15,9 @@ import {{rootJavaEEPackage}}.ws.rs.core.MediaType;
{{^disableMultipart}}
import org.apache.cxf.jaxrs.ext.multipart.*;
{{/disableMultipart}}
+{{#microprofileMutiny}}
+import io.smallrye.mutiny.Uni;
+{{/microprofileMutiny}}
{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
@@ -66,7 +69,7 @@ public interface {{classname}} {
{{#hasProduces}}
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
{{/hasProduces}}
- public {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException;
+ {{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException;
{{/operation}}
}
{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache
index 9fce40aed80..abefee7308a 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache
@@ -72,7 +72,7 @@ public class {{classname}}Test {
{{#allParams}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}}
{{/allParams}}
- //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
+ //{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
//{{#returnType}}assertNotNull(response);{{/returnType}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache
index 38127a63741..c396cd8af92 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache
@@ -3,8 +3,10 @@
@XmlEnum({{dataType}}.class)
{{/withXml}}
{{^withXml}}
+ {{#jsonb}}
@JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class)
@JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class)
+ {{/jsonb}}
{{/withXml}}
{{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}} {
@@ -24,6 +26,9 @@
value = v;
}
+ {{#jackson}}
+ @JsonValue
+ {{/jackson}}
public {{dataType}} value() {
return value;
}
@@ -44,6 +49,7 @@
}
{{/withXml}}
{{^withXml}}
+ {{#jsonb}}
public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> {
@Override
public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) {
@@ -62,5 +68,17 @@
generator.write(obj.value);
}
}
+ {{/jsonb}}
+ {{#jackson}}
+ @JsonCreator
+ public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) {
+ for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
+ }
+ {{/jackson}}
{{/withXml}}
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache
index d4199a18be3..56d9f8afb02 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache
@@ -156,6 +156,13 @@
${jakarta.annotation.version}
provided
+{{#microprofileMutiny}}
+
+ io.smallrye.reactive
+ mutiny
+ ${mutiny.version}
+
+{{/microprofileMutiny}}
@@ -196,5 +203,8 @@
2.6
1.9.1
UTF-8
+{{#microprofileMutiny}}
+ 1.2.0
+{{/microprofileMutiny}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache
deleted file mode 100644
index 32f96a90472..00000000000
--- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache
+++ /dev/null
@@ -1,4 +0,0 @@
-{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response:
-}}{{^useGenericResponse}}{{!
-}}{{{returnType}}}{{!
-}}{{/useGenericResponse}}
\ No newline at end of file
diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java
index e9cabcc3037..d353688861c 100644
--- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/PetApi.java
@@ -52,7 +52,7 @@ public interface PetApi {
@Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" })
- public Pet addPet(Pet pet) throws ApiException, ProcessingException;
+ Pet addPet(Pet pet) throws ApiException, ProcessingException;
/**
* Deletes a pet
@@ -62,7 +62,7 @@ public interface PetApi {
*/
@DELETE
@Path("/{petId}")
- public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException;
+ void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException;
/**
* Finds Pets by status
@@ -73,7 +73,7 @@ public interface PetApi {
@GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
- public List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException;
+ List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException;
/**
* Finds Pets by tags
@@ -86,7 +86,7 @@ public interface PetApi {
@GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
- public List findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException;
+ List findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException;
/**
* Find pet by ID
@@ -97,7 +97,7 @@ public interface PetApi {
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
- public Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException;
+ Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException;
/**
* Update an existing pet
@@ -109,7 +109,7 @@ public interface PetApi {
@Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" })
- public Pet updatePet(Pet pet) throws ApiException, ProcessingException;
+ Pet updatePet(Pet pet) throws ApiException, ProcessingException;
/**
* Updates a pet in the store with form data
@@ -120,7 +120,7 @@ public interface PetApi {
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
- public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
+ void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
/**
* uploads an image
@@ -132,5 +132,5 @@ public interface PetApi {
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
+ ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
}
diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java
index 065c9dbfe46..cd94c5b3bca 100644
--- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java
+++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java
@@ -48,7 +48,7 @@ public interface StoreApi {
*/
@DELETE
@Path("/order/{orderId}")
- public void deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException;
+ void deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException;
/**
* Returns pet inventories by status
@@ -59,7 +59,7 @@ public interface StoreApi {
@GET
@Path("/inventory")
@Produces({ "application/json" })
- public Map getInventory() throws ApiException, ProcessingException;
+ Map getInventory() throws ApiException, ProcessingException;
/**
* Find purchase order by ID
@@ -70,7 +70,7 @@ public interface StoreApi {
@GET
@Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" })
- public Order getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException;
+ Order getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException;
/**
* Place an order for a pet
@@ -82,5 +82,5 @@ public interface StoreApi {
@Path("/order")
@Consumes({ "application/json" })
@Produces({ "application/xml", "application/json" })
- public Order placeOrder(Order order) throws ApiException, ProcessingException;
+ Order placeOrder(Order order) throws ApiException, ProcessingException;
}
diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java
index d2c3ce2b7c4..7f8c13c9e08 100644
--- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java
+++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/UserApi.java
@@ -50,7 +50,7 @@ public interface UserApi {
@POST
@Consumes({ "application/json" })
- public void createUser(User user) throws ApiException, ProcessingException;
+ void createUser(User user) throws ApiException, ProcessingException;
/**
* Creates list of users with given input array
@@ -61,7 +61,7 @@ public interface UserApi {
@POST
@Path("/createWithArray")
@Consumes({ "application/json" })
- public void createUsersWithArrayInput(List user) throws ApiException, ProcessingException;
+ void createUsersWithArrayInput(List user) throws ApiException, ProcessingException;
/**
* Creates list of users with given input array
@@ -72,7 +72,7 @@ public interface UserApi {
@POST
@Path("/createWithList")
@Consumes({ "application/json" })
- public void createUsersWithListInput(List user) throws ApiException, ProcessingException;
+ void createUsersWithListInput(List user) throws ApiException, ProcessingException;
/**
* Delete user
@@ -82,7 +82,7 @@ public interface UserApi {
*/
@DELETE
@Path("/{username}")
- public void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException;
+ void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException;
/**
* Get user by user name
@@ -93,7 +93,7 @@ public interface UserApi {
@GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
- public User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException;
+ User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException;
/**
* Logs user into the system
@@ -104,7 +104,7 @@ public interface UserApi {
@GET
@Path("/login")
@Produces({ "application/xml", "application/json" })
- public String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException;
+ String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException;
/**
* Logs out current logged in user session
@@ -114,7 +114,7 @@ public interface UserApi {
*/
@GET
@Path("/logout")
- public void logoutUser() throws ApiException, ProcessingException;
+ void logoutUser() throws ApiException, ProcessingException;
/**
* Updated user
@@ -125,5 +125,5 @@ public interface UserApi {
@PUT
@Path("/{username}")
@Consumes({ "application/json" })
- public void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException;
+ void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException;
}
diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java
index 46d8035636e..fe8f0596df2 100644
--- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java
@@ -49,7 +49,7 @@ public interface PetApi {
@POST
@Consumes({ "application/json", "application/xml" })
- public void addPet(Pet body) throws ApiException, ProcessingException;
+ void addPet(Pet body) throws ApiException, ProcessingException;
/**
* Deletes a pet
@@ -57,7 +57,7 @@ public interface PetApi {
*/
@DELETE
@Path("/{petId}")
- public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException;
+ void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException;
/**
* Finds Pets by status
@@ -68,7 +68,7 @@ public interface PetApi {
@GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
- public List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException;
+ List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException;
/**
* Finds Pets by tags
@@ -81,7 +81,7 @@ public interface PetApi {
@GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
- public List findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException;
+ List findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException;
/**
* Find pet by ID
@@ -92,7 +92,7 @@ public interface PetApi {
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
- public Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException;
+ Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException;
/**
* Update an existing pet
@@ -101,7 +101,7 @@ public interface PetApi {
@PUT
@Consumes({ "application/json", "application/xml" })
- public void updatePet(Pet body) throws ApiException, ProcessingException;
+ void updatePet(Pet body) throws ApiException, ProcessingException;
/**
* Updates a pet in the store with form data
@@ -110,7 +110,7 @@ public interface PetApi {
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
- public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
+ void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
/**
* uploads an image
@@ -120,5 +120,5 @@ public interface PetApi {
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
+ ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
}
diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java
index 7b4d9b5ee68..29466ef6c21 100644
--- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java
+++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java
@@ -48,7 +48,7 @@ public interface StoreApi {
*/
@DELETE
@Path("/order/{orderId}")
- public void deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException;
+ void deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException;
/**
* Returns pet inventories by status
@@ -59,7 +59,7 @@ public interface StoreApi {
@GET
@Path("/inventory")
@Produces({ "application/json" })
- public Map getInventory() throws ApiException, ProcessingException;
+ Map getInventory() throws ApiException, ProcessingException;
/**
* Find purchase order by ID
@@ -70,7 +70,7 @@ public interface StoreApi {
@GET
@Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" })
- public Order getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException;
+ Order getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException;
/**
* Place an order for a pet
@@ -79,5 +79,5 @@ public interface StoreApi {
@POST
@Path("/order")
@Produces({ "application/xml", "application/json" })
- public Order placeOrder(Order body) throws ApiException, ProcessingException;
+ Order placeOrder(Order body) throws ApiException, ProcessingException;
}
diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java
index de2b8d44934..d1eb41adcb8 100644
--- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java
+++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java
@@ -49,7 +49,7 @@ public interface UserApi {
*/
@POST
- public void createUser(User body) throws ApiException, ProcessingException;
+ void createUser(User body) throws ApiException, ProcessingException;
/**
* Creates list of users with given input array
@@ -57,7 +57,7 @@ public interface UserApi {
*/
@POST
@Path("/createWithArray")
- public void createUsersWithArrayInput(List body) throws ApiException, ProcessingException;
+ void createUsersWithArrayInput(List body) throws ApiException, ProcessingException;
/**
* Creates list of users with given input array
@@ -65,7 +65,7 @@ public interface UserApi {
*/
@POST
@Path("/createWithList")
- public void createUsersWithListInput(List body) throws ApiException, ProcessingException;
+ void createUsersWithListInput(List body) throws ApiException, ProcessingException;
/**
* Delete user
@@ -75,7 +75,7 @@ public interface UserApi {
*/
@DELETE
@Path("/{username}")
- public void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException;
+ void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException;
/**
* Get user by user name
@@ -84,7 +84,7 @@ public interface UserApi {
@GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
- public User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException;
+ User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException;
/**
* Logs user into the system
@@ -93,7 +93,7 @@ public interface UserApi {
@GET
@Path("/login")
@Produces({ "application/xml", "application/json" })
- public String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException;
+ String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException;
/**
* Logs out current logged in user session
@@ -101,7 +101,7 @@ public interface UserApi {
*/
@GET
@Path("/logout")
- public void logoutUser() throws ApiException, ProcessingException;
+ void logoutUser() throws ApiException, ProcessingException;
/**
* Updated user
@@ -111,5 +111,5 @@ public interface UserApi {
*/
@PUT
@Path("/{username}")
- public void updateUser(@PathParam("username") String username, User body) throws ApiException, ProcessingException;
+ void updateUser(@PathParam("username") String username, User body) throws ApiException, ProcessingException;
}
diff --git a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/ModelList.java
index 999c8b087bb..5ae57a336eb 100644
--- a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/ModelList.java
+++ b/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/ModelList.java
@@ -3,7 +3,6 @@ package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;