From e4e322e881b118b5e8339b74076387a40853f328 Mon Sep 17 00:00:00 2001 From: Patrick Reinhart Date: Sat, 30 Aug 2025 19:39:08 +0200 Subject: [PATCH 1/2] Implements #21845 behavior - Not generating 'ApiExceptionMapper' if 'microProfileRegisterExceptionMapper' is set to 'false' - Only import RegisterRestClient if actually needed - Default 'useRuntimeException' to 'true' for Microprofile and use 'WebApplicationException' instead of custom 'ApiException' Signed-off-by: Patrick Reinhart --- .../codegen/languages/JavaClientCodegen.java | 31 +++++++++++++------ .../Java/libraries/microprofile/api.mustache | 6 ++-- .../microprofile/api_exception.mustache | 13 +++++++- .../api_exception_mapper.mustache | 4 --- .../codegen/java/JavaClientCodegenTest.java | 30 +++++++++++++++--- .../JavaMicroprofileServerCodegenTest.java | 12 ++++--- 6 files changed, 69 insertions(+), 27 deletions(-) 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 5a847d0afc14..ca92864223c9 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 @@ -70,7 +70,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen 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 MICROPROFILE_GLOBAL_EXCEPTION_MAPPER = "microprofileGlobalExceptionMapper"; public static final String MICROPROFILE_REGISTER_EXCEPTION_MAPPER = "microprofileRegisterExceptionMapper"; public static final String USE_ABSTRACTION_FOR_FILES = "useAbstractionForFiles"; public static final String DYNAMIC_OPERATIONS = "dynamicOperations"; @@ -128,8 +127,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen @Setter protected String microprofileFramework = MICROPROFILE_DEFAULT; @Setter protected String microprofileRestClientVersion = MICROPROFILE_REST_CLIENT_DEFAULT_VERSION; @Setter protected boolean microprofileMutiny = false; - @Setter protected boolean microProfileGlobalExceptionMapper = true; - @Setter protected boolean microProfileRegisterExceptionMapper = true; + @Setter protected boolean microProfileRegisterExceptionMapper = false; @Setter protected String configKey = null; @Setter(AccessLevel.PRIVATE) protected boolean configKeyFromClassName = false; @@ -240,8 +238,7 @@ public JavaClientCodegen() { 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.newString(MICROPROFILE_REGISTER_EXCEPTION_MAPPER, "Should generated API Clients be annotated with @RegisterProvider(ApiExceptionMapper.class).").defaultValue("true")); - cliOptions.add(CliOption.newString(MICROPROFILE_GLOBAL_EXCEPTION_MAPPER, "Should ApiExceptionMapper be annotated with @Provider making it a global exception mapper").defaultValue("true")); + cliOptions.add(CliOption.newBoolean(MICROPROFILE_REGISTER_EXCEPTION_MAPPER, "Should generated API Clients be annotated with @RegisterProvider(ApiExceptionMapper.class).", this.microProfileRegisterExceptionMapper)); 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, restclient, 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)); @@ -363,6 +360,11 @@ public void processOpts() { this.jackson = !additionalProperties.containsKey(CodegenConstants.SERIALIZATION_LIBRARY) || SERIALIZATION_LIBRARY_JACKSON.equals(additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY)); + // use runtime exceptions for microprofile + if (libMicroprofile) { + useRuntimeException = true; + } + convertPropertyToBooleanAndWriteBack(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, this::setUseOneOfDiscriminatorLookup); // RxJava @@ -399,11 +401,9 @@ public void processOpts() { } convertPropertyToStringAndWriteBack(MICROPROFILE_FRAMEWORK, this::setMicroprofileFramework); - convertPropertyToBooleanAndWriteBack(MICROPROFILE_GLOBAL_EXCEPTION_MAPPER, this::setMicroProfileGlobalExceptionMapper); convertPropertyToBooleanAndWriteBack(MICROPROFILE_REGISTER_EXCEPTION_MAPPER, this::setMicroProfileRegisterExceptionMapper); additionalProperties.put(MICROPROFILE_REGISTER_EXCEPTION_MAPPER, microProfileRegisterExceptionMapper); - additionalProperties.put(MICROPROFILE_GLOBAL_EXCEPTION_MAPPER, microProfileGlobalExceptionMapper); convertPropertyToBooleanAndWriteBack(MICROPROFILE_MUTINY, this::setMicroprofileMutiny); @@ -709,8 +709,19 @@ public void processOpts() { String pomTemplate = mpRestClientVersions.get(microprofileRestClientVersion).pomTemplate; supportingFiles.add(new SupportingFile(pomTemplate, "", "pom.xml")); 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")); + + if (useRuntimeException) { + if (microProfileRegisterExceptionMapper) { + supportingFiles.add(new SupportingFile("api_exception.mustache", apiExceptionFolder, "ApiException.java")); + supportingFiles.add(new SupportingFile("api_exception_mapper.mustache", apiExceptionFolder, "ApiExceptionMapper.java")); + } + } else { + supportingFiles.add(new SupportingFile("api_exception.mustache", apiExceptionFolder, "ApiException.java")); + if (microProfileRegisterExceptionMapper) { + supportingFiles.add(new SupportingFile("api_exception_mapper.mustache", apiExceptionFolder, "ApiExceptionMapper.java")); + } + } + if (getSerializationLibrary() == null) { LOGGER.info("No serializationLibrary configured, using '{}' as fallback", SERIALIZATION_LIBRARY_JSONB); setSerializationLibrary(SERIALIZATION_LIBRARY_JSONB); @@ -803,7 +814,7 @@ public void processOpts() { additionalProperties.remove(SERIALIZATION_LIBRARY_JSONB); break; } - + if (isLibrary(FEIGN)) { additionalProperties.put("feign-okhttp", "true"); } else if (isLibrary(FEIGN_HC5)) { 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 a77a8e1a1e75..69d4acdab9b4 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 @@ -27,7 +27,9 @@ import {{rootJavaEEPackage}}.validation.Valid; {{#microprofileRegisterExceptionMapper}} import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; {{/microprofileRegisterExceptionMapper}} +{{^microprofileServer}} import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; +{{/microprofileServer}} {{#appName}} /** @@ -76,10 +78,10 @@ public interface {{classname}} { @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} {{^singleRequestParameter}} - {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/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}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/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}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws {{#useRuntimeException}}WebApplicationException{{/useRuntimeException}}{{^useRuntimeException}}ApiException{{/useRuntimeException}}, ProcessingException; {{/singleRequestParameter}} {{#singleRequestParameter}} - {{^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}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) 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}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws {{#useRuntimeException}}WebApplicationException{{/useRuntimeException}}{{^useRuntimeException}}ApiException{{/useRuntimeException}}, ProcessingException; {{#hasNonBodyParams}} public class {{operationIdCamelCase}}Request { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache index 63a218675c4d..ace4806d63be 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception.mustache @@ -2,10 +2,20 @@ package {{apiPackage}}; import {{rootJavaEEPackage}}.ws.rs.core.Response; +{{#useRuntimeException}} +import {{rootJavaEEPackage}}.ws.rs.WebApplicationException; +{{/useRuntimeException}} -public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ +public class ApiException extends{{#useRuntimeException}} WebApplicationException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{ private static final long serialVersionUID = 1L; +{{#useRuntimeException}} + + public ApiException(Response response) { + super(response); + } +{{/useRuntimeException}} +{{^useRuntimeException}} private Response response; public ApiException() { @@ -20,4 +30,5 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us public Response getResponse() { return this.response; } +{{/useRuntimeException}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache index 2842b1c87a72..12988f5ed9db 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_exception_mapper.mustache @@ -3,14 +3,10 @@ package {{apiPackage}}; import {{rootJavaEEPackage}}.ws.rs.core.MultivaluedMap; import {{rootJavaEEPackage}}.ws.rs.core.Response; -{{#microprofileGlobalExceptionMapper}} import {{rootJavaEEPackage}}.ws.rs.ext.Provider; -{{/microprofileGlobalExceptionMapper}} import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper; -{{#microprofileGlobalExceptionMapper}} @Provider -{{/microprofileGlobalExceptionMapper}} public class ApiExceptionMapper implements ResponseExceptionMapper { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 24d02b510e81..d34b0901c561 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -1488,8 +1488,13 @@ public void testDefaultMicroprofileRestClientVersion() { validateJavaSourceFiles(files); assertThat(files).contains(output.resolve("pom.xml").toFile()); + assertThat(output.resolve("src/main/java/org/openapitools/client/api/ApiException.java")).doesNotExist(); + assertThat(output.resolve("src/main/java/org/openapitools/client/api/ApiExceptionMapper.java")).doesNotExist(); assertThat(output.resolve("src/main/java/org/openapitools/client/api/PetApi.java")).content() - .contains("import javax."); + .contains("import javax.") + .doesNotContain("ApiException") + .contains("WebApplicationException"); + ; assertThat(output.resolve("pom.xml")).content() .contains( "2.0", @@ -1502,7 +1507,11 @@ public void testDefaultMicroprofileRestClientVersion() { public void testMicroprofileRestClientVersion_1_4_1() { final Path output = newTempFolder(); final CodegenConfigurator configurator = new CodegenConfigurator() - .setAdditionalProperties(Map.of(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "1.4.1")) + .setAdditionalProperties(Map.of( + JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "1.4.1", + JavaClientCodegen.MICROPROFILE_REGISTER_EXCEPTION_MAPPER, "true", + USE_RUNTIME_EXCEPTION,"false" + )) .setGeneratorName(JAVA_GENERATOR) .setLibrary(JavaClientCodegen.MICROPROFILE) .setInputSpec("src/test/resources/3_0/petstore.yaml") @@ -1512,8 +1521,12 @@ public void testMicroprofileRestClientVersion_1_4_1() { validateJavaSourceFiles(files); assertThat(files).contains(output.resolve("pom.xml").toFile()); + assertThat(output.resolve("src/main/java/org/openapitools/client/api/ApiException.java")).exists(); + assertThat(output.resolve("src/main/java/org/openapitools/client/api/ApiExceptionMapper.java")).exists(); assertThat(output.resolve("src/main/java/org/openapitools/client/api/PetApi.java")).content() - .contains("import javax."); + .contains("import javax.") + .contains("ApiException") + .doesNotContain("WebApplicationException"); assertThat(output.resolve("pom.xml")).content() .contains( "1.4.1", @@ -1546,7 +1559,10 @@ public void testMicroprofileRestClientIncorrectVersion() { public void testMicroprofileRestClientVersion_3_0() { final Path output = newTempFolder(); final CodegenConfigurator configurator = new CodegenConfigurator() - .setAdditionalProperties(Map.of(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "3.0")) + .setAdditionalProperties(Map.of( + JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "3.0", + JavaClientCodegen.USE_RUNTIME_EXCEPTION, "false" + )) .setGeneratorName(JAVA_GENERATOR) .setLibrary(JavaClientCodegen.MICROPROFILE) .setInputSpec("src/test/resources/3_0/petstore.yaml") @@ -1556,8 +1572,12 @@ public void testMicroprofileRestClientVersion_3_0() { validateJavaSourceFiles(files); assertThat(files).contains(output.resolve("pom.xml").toFile()); + assertThat(output.resolve("src/main/java/org/openapitools/client/api/ApiException.java")).exists(); + assertThat(output.resolve("src/main/java/org/openapitools/client/api/ApiExceptionMapper.java")).doesNotExist(); assertThat(output.resolve("src/main/java/org/openapitools/client/api/PetApi.java")).content() - .contains("import jakarta."); + .contains("import jakarta.") + .contains("ApiException") + .doesNotContain("WebApplicationException"); assertThat(output.resolve("pom.xml")).content() .contains( "3.0", diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/microprofile/JavaMicroprofileServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/microprofile/JavaMicroprofileServerCodegenTest.java index 06cb837baa6d..d39269b7ce1b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/microprofile/JavaMicroprofileServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/microprofile/JavaMicroprofileServerCodegenTest.java @@ -19,6 +19,7 @@ import java.util.function.Function; import java.util.stream.Collectors; +import static org.assertj.core.api.Assertions.assertThat; import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; public class JavaMicroprofileServerCodegenTest { @@ -138,6 +139,7 @@ public void testGeneratedApiHasApiExceptionMapperRegisteredWhenUsingDefaultConfi .readLocation("src/test/resources/bugs/microprofile_cookie.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(JavaClientCodegen.MICROPROFILE_REGISTER_EXCEPTION_MAPPER, "true"); ClientOptInput input = new ClientOptInput() .openAPI(openAPI) @@ -165,7 +167,6 @@ public void testGeneratedApiDoesNotHaveApiExceptionMapperRegisteredWhenDisabling .readLocation("src/test/resources/bugs/microprofile_cookie.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - codegen.additionalProperties().put(JavaClientCodegen.MICROPROFILE_REGISTER_EXCEPTION_MAPPER, "false"); ClientOptInput input = new ClientOptInput() .openAPI(openAPI) @@ -192,6 +193,7 @@ public void testGeneratedApiExceptionMapperHasProviderAnnotationWhenUsingDefault .readLocation("src/test/resources/bugs/microprofile_cookie.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(JavaClientCodegen.MICROPROFILE_REGISTER_EXCEPTION_MAPPER, "true"); ClientOptInput input = new ClientOptInput() .openAPI(openAPI) @@ -218,7 +220,8 @@ public void testGeneratedApiExceptionMapperDoesNotHaveProviderAnnotationWhenDisa .readLocation("src/test/resources/bugs/microprofile_cookie.yaml", null, new ParseOptions()).getOpenAPI(); codegen.setOutputDir(output.getAbsolutePath()); - codegen.additionalProperties().put(JavaClientCodegen.MICROPROFILE_GLOBAL_EXCEPTION_MAPPER, "false"); + codegen.additionalProperties().put(JavaClientCodegen.USE_RUNTIME_EXCEPTION, "true"); + ClientOptInput input = new ClientOptInput() .openAPI(openAPI) @@ -231,9 +234,8 @@ public void testGeneratedApiExceptionMapperDoesNotHaveProviderAnnotationWhenDisa validateJavaSourceFiles(files); - JavaFileAssert.assertThat(filesMap.get("ApiExceptionMapper.java")) - .assertTypeAnnotations() - .doesNotContainWithName("Provider"); + assertThat(filesMap.get("ApiException.java")).isNull(); + assertThat(filesMap.get("ApiExceptionMapper.java")).isNull(); } } From 2dd4ab5d021c6cddcebe66799e8aadc0d49da2db Mon Sep 17 00:00:00 2001 From: Patrick Reinhart Date: Tue, 2 Sep 2025 14:07:33 +0200 Subject: [PATCH 2/2] Update samples and documentation Signed-off-by: Patrick Reinhart --- docs/generators/java-microprofile.md | 3 +- docs/generators/java.md | 3 +- .../.openapi-generator/FILES | 2 - .../org/openapitools/client/api/PetApi.java | 18 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../org/openapitools/client/api/PetApi.java | 18 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../client/api/AnotherFakeApi.java | 4 +- .../openapitools/client/api/DefaultApi.java | 4 +- .../org/openapitools/client/api/FakeApi.java | 46 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 4 +- .../org/openapitools/client/api/PetApi.java | 20 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../org/openapitools/client/api/PetApi.java | 18 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../client/api/AnotherFakeApi.java | 4 +- .../openapitools/client/api/DefaultApi.java | 4 +- .../org/openapitools/client/api/FakeApi.java | 46 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 4 +- .../org/openapitools/client/api/PetApi.java | 20 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../org/openapitools/client/api/PetApi.java | 18 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../openapitools/client/api/DefaultApi.java | 6 +-- .../.openapi-generator/FILES | 2 - .../org/openapitools/client/api/PetApi.java | 18 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../client/api/AnotherFakeApi.java | 4 +- .../openapitools/client/api/DefaultApi.java | 4 +- .../org/openapitools/client/api/FakeApi.java | 46 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 4 +- .../org/openapitools/client/api/PetApi.java | 20 ++++---- .../org/openapitools/client/api/StoreApi.java | 10 ++-- .../org/openapitools/client/api/UserApi.java | 18 ++++---- .../.openapi-generator/FILES | 2 - .../org/openapitools/server/api/PetApi.java | 19 ++++---- .../org/openapitools/server/api/StoreApi.java | 11 ++--- .../org/openapitools/server/api/UserApi.java | 19 ++++---- 52 files changed, 262 insertions(+), 367 deletions(-) diff --git a/docs/generators/java-microprofile.md b/docs/generators/java-microprofile.md index b928fb0f32e3..5ce3fffdde14 100644 --- a/docs/generators/java-microprofile.md +++ b/docs/generators/java-microprofile.md @@ -66,9 +66,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null| -|microprofileGlobalExceptionMapper|Should ApiExceptionMapper be annotated with @Provider making it a global exception mapper| |true| |microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null| -|microprofileRegisterExceptionMapper|Should generated API Clients be annotated with @RegisterProvider(ApiExceptionMapper.class).| |true| +|microprofileRegisterExceptionMapper|Should generated API Clients be annotated with @RegisterProvider(ApiExceptionMapper.class).| |false| |microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null| |modelPackage|package for generated models| |org.openapitools.client.model| |openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true| diff --git a/docs/generators/java.md b/docs/generators/java.md index 7c9ffca4760d..ca9c3861105a 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -66,9 +66,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null| -|microprofileGlobalExceptionMapper|Should ApiExceptionMapper be annotated with @Provider making it a global exception mapper| |true| |microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null| -|microprofileRegisterExceptionMapper|Should generated API Clients be annotated with @RegisterProvider(ApiExceptionMapper.class).| |true| +|microprofileRegisterExceptionMapper|Should generated API Clients be annotated with @RegisterProvider(ApiExceptionMapper.class).| |false| |microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null| |modelPackage|package for generated models| |org.openapitools.client.model| |openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true| diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/.openapi-generator/FILES index 2a68f3683bd3..00f20ae568c6 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/.openapi-generator/FILES @@ -12,8 +12,6 @@ pom.xml src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/PetApi.java index 6ef3b8799c32..fcc09d7071ee 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/PetApi.java @@ -28,7 +28,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -39,7 +38,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/pet") public interface PetApi { @@ -53,7 +51,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni addPet(Pet pet) throws ApiException, ProcessingException; + Uni addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -63,7 +61,7 @@ public interface PetApi { */ @DELETE @Path("/{petId}") - Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -74,7 +72,7 @@ public interface PetApi { @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + Uni> findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -87,7 +85,7 @@ public interface PetApi { @GET @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + Uni> findPetsByTags(@QueryParam("tags") List tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -98,7 +96,7 @@ public interface PetApi { @GET @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - Uni getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Uni getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -110,7 +108,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni updatePet(Pet pet) throws ApiException, ProcessingException; + Uni updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -121,7 +119,7 @@ public interface PetApi { @POST @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws WebApplicationException, ProcessingException; /** * uploads an image @@ -133,5 +131,5 @@ public interface PetApi { @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; + Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java index 9909223a741e..d8ebcf7f12f6 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java @@ -26,7 +26,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -49,7 +47,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{orderId}") - Uni deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + Uni deleteOrder(@PathParam("orderId") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -60,7 +58,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Uni> getInventory() throws ApiException, ProcessingException; + Uni> getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -71,7 +69,7 @@ public interface StoreApi { @GET @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - Uni getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + Uni getOrderById(@PathParam("orderId") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -83,5 +81,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Uni placeOrder(Order order) throws ApiException, ProcessingException; + Uni placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/UserApi.java index 730a4c718b6c..b4ec7264e5cb 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/UserApi.java @@ -27,7 +27,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -38,7 +37,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -51,7 +49,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - Uni createUser(User user) throws ApiException, ProcessingException; + Uni createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -62,7 +60,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - Uni createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -73,7 +71,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - Uni createUsersWithListInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -83,7 +81,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - Uni deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -94,7 +92,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - Uni getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -105,7 +103,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -115,7 +113,7 @@ public interface UserApi { */ @GET @Path("/logout") - Uni logoutUser() throws ApiException, ProcessingException; + Uni logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -126,5 +124,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - Uni updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + Uni updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/FILES index 2a68f3683bd3..00f20ae568c6 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/FILES @@ -12,8 +12,6 @@ pom.xml src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/PetApi.java index 05da2032eac0..6f73b352590b 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/PetApi.java @@ -27,7 +27,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -38,7 +37,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/pet") public interface PetApi { @@ -52,7 +50,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Pet addPet(Pet pet) throws ApiException, ProcessingException; + Pet addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -62,7 +60,7 @@ public interface PetApi { */ @DELETE @Path("/{petId}") - 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 WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -73,7 +71,7 @@ public interface PetApi { @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + List findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -86,7 +84,7 @@ public interface PetApi { @GET @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - List findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + List findPetsByTags(@QueryParam("tags") List tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -97,7 +95,7 @@ public interface PetApi { @GET @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Pet getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -109,7 +107,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Pet updatePet(Pet pet) throws ApiException, ProcessingException; + Pet updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -120,7 +118,7 @@ public interface PetApi { @POST @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image @@ -132,5 +130,5 @@ public interface PetApi { @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - 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 WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/StoreApi.java index 84b900485a13..0623c25eae90 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -48,7 +46,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{orderId}") - void deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + void deleteOrder(@PathParam("orderId") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -59,7 +57,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Map getInventory() throws ApiException, ProcessingException; + Map getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -70,7 +68,7 @@ public interface StoreApi { @GET @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - Order getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + Order getOrderById(@PathParam("orderId") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -82,5 +80,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Order placeOrder(Order order) throws ApiException, ProcessingException; + Order placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/UserApi.java index c15f66ab5a21..7f37af296680 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/api/UserApi.java @@ -26,7 +26,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -50,7 +48,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - void createUser(User user) throws ApiException, ProcessingException; + void createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -61,7 +59,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - void createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + void createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -72,7 +70,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - void createUsersWithListInput(List user) throws ApiException, ProcessingException; + void createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -82,7 +80,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + void deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -93,7 +91,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + User getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -104,7 +102,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -114,7 +112,7 @@ public interface UserApi { */ @GET @Path("/logout") - void logoutUser() throws ApiException, ProcessingException; + void logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -125,5 +123,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + void updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/FILES index e63be84d638a..10164ed9c5f3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/FILES @@ -61,8 +61,6 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3e82961d175f..f4a0761dc293 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/another-fake/dummy") public interface AnotherFakeApi { @@ -50,5 +48,5 @@ public interface AnotherFakeApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client call123testSpecialTags(Client client) throws ApiException, ProcessingException; + Client call123testSpecialTags(Client client) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/DefaultApi.java index eb2c12b4b92c..285b152e7696 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,12 +35,11 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/foo") public interface DefaultApi { @GET @Produces({ "application/json" }) - FooGetDefaultResponse fooGet() throws ApiException, ProcessingException; + FooGetDefaultResponse fooGet() throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeApi.java index 6880a77a2cf0..439889eb36cc 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -38,7 +38,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -49,14 +48,13 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/fake") public interface FakeApi { @GET @Path("/BigDecimalMap") @Produces({ "*/*" }) - FakeBigDecimalMap200Response fakeBigDecimalMap() throws ApiException, ProcessingException; + FakeBigDecimalMap200Response fakeBigDecimalMap() throws WebApplicationException, ProcessingException; /** * Health check endpoint @@ -65,7 +63,7 @@ public interface FakeApi { @GET @Path("/health") @Produces({ "application/json" }) - HealthCheckResult fakeHealthGet() throws ApiException, ProcessingException; + HealthCheckResult fakeHealthGet() throws WebApplicationException, ProcessingException; /** * test http signature authentication @@ -74,37 +72,37 @@ public interface FakeApi { @GET @Path("/http-signature-test") @Consumes({ "application/json", "application/xml" }) - void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1) throws ApiException, ProcessingException; + void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1) throws WebApplicationException, ProcessingException; @POST @Path("/outer/boolean") @Consumes({ "application/json" }) @Produces({ "*/*" }) - Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException, ProcessingException; + Boolean fakeOuterBooleanSerialize(Boolean body) throws WebApplicationException, ProcessingException; @POST @Path("/outer/composite") @Consumes({ "application/json" }) @Produces({ "*/*" }) - OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException, ProcessingException; + OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws WebApplicationException, ProcessingException; @POST @Path("/outer/number") @Consumes({ "application/json" }) @Produces({ "*/*" }) - BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException, ProcessingException; + BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws WebApplicationException, ProcessingException; @POST @Path("/outer/string") @Consumes({ "application/json" }) @Produces({ "*/*" }) - String fakeOuterStringSerialize(String body) throws ApiException, ProcessingException; + String fakeOuterStringSerialize(String body) throws WebApplicationException, ProcessingException; @POST @Path("/property/enum-int") @Consumes({ "application/json" }) @Produces({ "*/*" }) - OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException, ProcessingException; + OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebApplicationException, ProcessingException; /** * test referenced additionalProperties @@ -115,22 +113,22 @@ public interface FakeApi { @POST @Path("/additionalProperties-reference") @Consumes({ "application/json" }) - void testAdditionalPropertiesReference(Map requestBody) throws ApiException, ProcessingException; + void testAdditionalPropertiesReference(Map requestBody) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-binary") @Consumes({ "image/png" }) - void testBodyWithBinary(File body) throws ApiException, ProcessingException; + void testBodyWithBinary(File body) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-file-schema") @Consumes({ "application/json" }) - void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException, ProcessingException; + void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-query-params") @Consumes({ "application/json" }) - void testBodyWithQueryParams(@QueryParam("query") String query, User user) throws ApiException, ProcessingException; + void testBodyWithQueryParams(@QueryParam("query") String query, User user) throws WebApplicationException, ProcessingException; /** * To test \"client\" model @@ -142,7 +140,7 @@ public interface FakeApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client testClientModel(Client client) throws ApiException, ProcessingException; + Client testClientModel(Client client) throws WebApplicationException, ProcessingException; /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -153,7 +151,7 @@ public interface FakeApi { @POST @Consumes({ "application/x-www-form-urlencoded" }) - void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) Date date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback) throws ApiException, ProcessingException; + void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) Date date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback) throws WebApplicationException, ProcessingException; /** * To test enum parameters @@ -164,7 +162,7 @@ public interface FakeApi { @GET @Consumes({ "application/x-www-form-urlencoded" }) - void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @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, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString) throws ApiException, ProcessingException; + void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @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, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString) throws WebApplicationException, ProcessingException; /** * Fake endpoint to test group parameters (optional) @@ -174,7 +172,7 @@ public interface FakeApi { */ @DELETE - void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group) throws ApiException, ProcessingException; + void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group) throws WebApplicationException, ProcessingException; /** * test inline additionalProperties @@ -185,7 +183,7 @@ public interface FakeApi { @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) - void testInlineAdditionalProperties(Map requestBody) throws ApiException, ProcessingException; + void testInlineAdditionalProperties(Map requestBody) throws WebApplicationException, ProcessingException; /** * test inline free-form additionalProperties @@ -196,7 +194,7 @@ public interface FakeApi { @POST @Path("/inline-freeform-additionalProperties") @Consumes({ "application/json" }) - void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws ApiException, ProcessingException; + void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws WebApplicationException, ProcessingException; /** * test json serialization of form data @@ -207,7 +205,7 @@ public interface FakeApi { @GET @Path("/jsonFormData") @Consumes({ "application/x-www-form-urlencoded" }) - void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2) throws ApiException, ProcessingException; + void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2) throws WebApplicationException, ProcessingException; /** * test nullable parent property @@ -218,11 +216,11 @@ public interface FakeApi { @POST @Path("/nullable") @Consumes({ "application/json" }) - void testNullable(ChildWithNullable childWithNullable) throws ApiException, ProcessingException; + void testNullable(ChildWithNullable childWithNullable) throws WebApplicationException, ProcessingException; @PUT @Path("/test-query-parameters") - void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws ApiException, ProcessingException; + void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws WebApplicationException, ProcessingException; /** * test referenced string map @@ -233,5 +231,5 @@ public interface FakeApi { @POST @Path("/stringMap-reference") @Consumes({ "application/json" }) - void testStringMapReference(Map requestBody) throws ApiException, ProcessingException; + void testStringMapReference(Map requestBody) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index fc30be2b5c4c..82ea07d77b53 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/fake_classname_test") public interface FakeClassnameTags123Api { @@ -50,5 +48,5 @@ public interface FakeClassnameTags123Api { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client testClassname(Client client) throws ApiException, ProcessingException; + Client testClassname(Client client) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/PetApi.java index b9e189841e01..deaa9ecf33bc 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/PetApi.java @@ -28,7 +28,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -39,7 +38,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("") public interface PetApi { @@ -52,7 +50,7 @@ public interface PetApi { @POST @Path("/pet") @Consumes({ "application/json", "application/xml" }) - void addPet(Pet pet) throws ApiException, ProcessingException; + void addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -62,7 +60,7 @@ public interface PetApi { */ @DELETE @Path("/pet/{petId}") - 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 WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -73,7 +71,7 @@ public interface PetApi { @GET @Path("/pet/findByStatus") @Produces({ "application/xml", "application/json" }) - List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + List findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -86,7 +84,7 @@ public interface PetApi { @GET @Path("/pet/findByTags") @Produces({ "application/xml", "application/json" }) - Set findPetsByTags(@QueryParam("tags") Set tags) throws ApiException, ProcessingException; + Set findPetsByTags(@QueryParam("tags") Set tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -97,7 +95,7 @@ public interface PetApi { @GET @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) - Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Pet getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -108,7 +106,7 @@ public interface PetApi { @PUT @Path("/pet") @Consumes({ "application/json", "application/xml" }) - void updatePet(Pet pet) throws ApiException, ProcessingException; + void updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -119,7 +117,7 @@ public interface PetApi { @POST @Path("/pet/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image @@ -131,7 +129,7 @@ public interface PetApi { @Path("/pet/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image (required) @@ -143,5 +141,5 @@ public interface PetApi { @Path("/fake/{petId}/uploadImageWithRequiredFile") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata) throws ApiException, ProcessingException; + ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/StoreApi.java index 3746ae25ce53..8278227ac5f4 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -48,7 +46,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{order_id}") - void deleteOrder(@PathParam("order_id") String orderId) throws ApiException, ProcessingException; + void deleteOrder(@PathParam("order_id") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -59,7 +57,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Map getInventory() throws ApiException, ProcessingException; + Map getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -70,7 +68,7 @@ public interface StoreApi { @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - Order getOrderById(@PathParam("order_id") Long orderId) throws ApiException, ProcessingException; + Order getOrderById(@PathParam("order_id") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -82,5 +80,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Order placeOrder(Order order) throws ApiException, ProcessingException; + Order placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/UserApi.java index 9805dfc97562..e9d18b8a5f04 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/api/UserApi.java @@ -26,7 +26,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -50,7 +48,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - void createUser(User user) throws ApiException, ProcessingException; + void createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -61,7 +59,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - void createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + void createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -72,7 +70,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - void createUsersWithListInput(List user) throws ApiException, ProcessingException; + void createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -82,7 +80,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + void deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -93,7 +91,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + User getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -104,7 +102,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -114,7 +112,7 @@ public interface UserApi { */ @GET @Path("/logout") - void logoutUser() throws ApiException, ProcessingException; + void logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -125,5 +123,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + void updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES index ae145903e52b..f5a3f6e2d2ec 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/.openapi-generator/FILES @@ -9,8 +9,6 @@ docs/Tag.md docs/User.md docs/UserApi.md pom.xml -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java index 6ef3b8799c32..fcc09d7071ee 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/PetApi.java @@ -28,7 +28,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -39,7 +38,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/pet") public interface PetApi { @@ -53,7 +51,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni addPet(Pet pet) throws ApiException, ProcessingException; + Uni addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -63,7 +61,7 @@ public interface PetApi { */ @DELETE @Path("/{petId}") - Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -74,7 +72,7 @@ public interface PetApi { @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + Uni> findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -87,7 +85,7 @@ public interface PetApi { @GET @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + Uni> findPetsByTags(@QueryParam("tags") List tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -98,7 +96,7 @@ public interface PetApi { @GET @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - Uni getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Uni getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -110,7 +108,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni updatePet(Pet pet) throws ApiException, ProcessingException; + Uni updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -121,7 +119,7 @@ public interface PetApi { @POST @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws WebApplicationException, ProcessingException; /** * uploads an image @@ -133,5 +131,5 @@ public interface PetApi { @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; + Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java index 9909223a741e..d8ebcf7f12f6 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java @@ -26,7 +26,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -49,7 +47,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{orderId}") - Uni deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + Uni deleteOrder(@PathParam("orderId") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -60,7 +58,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Uni> getInventory() throws ApiException, ProcessingException; + Uni> getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -71,7 +69,7 @@ public interface StoreApi { @GET @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - Uni getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + Uni getOrderById(@PathParam("orderId") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -83,5 +81,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Uni placeOrder(Order order) throws ApiException, ProcessingException; + Uni placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java index 730a4c718b6c..b4ec7264e5cb 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-mutiny/src/main/java/org/openapitools/client/api/UserApi.java @@ -27,7 +27,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -38,7 +37,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -51,7 +49,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - Uni createUser(User user) throws ApiException, ProcessingException; + Uni createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -62,7 +60,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - Uni createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -73,7 +71,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - Uni createUsersWithListInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -83,7 +81,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - Uni deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -94,7 +92,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - Uni getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -105,7 +103,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -115,7 +113,7 @@ public interface UserApi { */ @GET @Path("/logout") - Uni logoutUser() throws ApiException, ProcessingException; + Uni logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -126,5 +124,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - Uni updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + Uni updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES index c2568cfe3018..53e287b86080 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/FILES @@ -58,8 +58,6 @@ docs/User.md docs/UserApi.md pom.xml src/main/java/org/openapitools/client/api/AnotherFakeApi.java -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3e82961d175f..f4a0761dc293 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/another-fake/dummy") public interface AnotherFakeApi { @@ -50,5 +48,5 @@ public interface AnotherFakeApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client call123testSpecialTags(Client client) throws ApiException, ProcessingException; + Client call123testSpecialTags(Client client) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/DefaultApi.java index eb2c12b4b92c..285b152e7696 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,12 +35,11 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/foo") public interface DefaultApi { @GET @Produces({ "application/json" }) - FooGetDefaultResponse fooGet() throws ApiException, ProcessingException; + FooGetDefaultResponse fooGet() throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeApi.java index 6880a77a2cf0..439889eb36cc 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeApi.java @@ -38,7 +38,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -49,14 +48,13 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/fake") public interface FakeApi { @GET @Path("/BigDecimalMap") @Produces({ "*/*" }) - FakeBigDecimalMap200Response fakeBigDecimalMap() throws ApiException, ProcessingException; + FakeBigDecimalMap200Response fakeBigDecimalMap() throws WebApplicationException, ProcessingException; /** * Health check endpoint @@ -65,7 +63,7 @@ public interface FakeApi { @GET @Path("/health") @Produces({ "application/json" }) - HealthCheckResult fakeHealthGet() throws ApiException, ProcessingException; + HealthCheckResult fakeHealthGet() throws WebApplicationException, ProcessingException; /** * test http signature authentication @@ -74,37 +72,37 @@ public interface FakeApi { @GET @Path("/http-signature-test") @Consumes({ "application/json", "application/xml" }) - void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1) throws ApiException, ProcessingException; + void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1) throws WebApplicationException, ProcessingException; @POST @Path("/outer/boolean") @Consumes({ "application/json" }) @Produces({ "*/*" }) - Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException, ProcessingException; + Boolean fakeOuterBooleanSerialize(Boolean body) throws WebApplicationException, ProcessingException; @POST @Path("/outer/composite") @Consumes({ "application/json" }) @Produces({ "*/*" }) - OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException, ProcessingException; + OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws WebApplicationException, ProcessingException; @POST @Path("/outer/number") @Consumes({ "application/json" }) @Produces({ "*/*" }) - BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException, ProcessingException; + BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws WebApplicationException, ProcessingException; @POST @Path("/outer/string") @Consumes({ "application/json" }) @Produces({ "*/*" }) - String fakeOuterStringSerialize(String body) throws ApiException, ProcessingException; + String fakeOuterStringSerialize(String body) throws WebApplicationException, ProcessingException; @POST @Path("/property/enum-int") @Consumes({ "application/json" }) @Produces({ "*/*" }) - OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException, ProcessingException; + OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebApplicationException, ProcessingException; /** * test referenced additionalProperties @@ -115,22 +113,22 @@ public interface FakeApi { @POST @Path("/additionalProperties-reference") @Consumes({ "application/json" }) - void testAdditionalPropertiesReference(Map requestBody) throws ApiException, ProcessingException; + void testAdditionalPropertiesReference(Map requestBody) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-binary") @Consumes({ "image/png" }) - void testBodyWithBinary(File body) throws ApiException, ProcessingException; + void testBodyWithBinary(File body) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-file-schema") @Consumes({ "application/json" }) - void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException, ProcessingException; + void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-query-params") @Consumes({ "application/json" }) - void testBodyWithQueryParams(@QueryParam("query") String query, User user) throws ApiException, ProcessingException; + void testBodyWithQueryParams(@QueryParam("query") String query, User user) throws WebApplicationException, ProcessingException; /** * To test \"client\" model @@ -142,7 +140,7 @@ public interface FakeApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client testClientModel(Client client) throws ApiException, ProcessingException; + Client testClientModel(Client client) throws WebApplicationException, ProcessingException; /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -153,7 +151,7 @@ public interface FakeApi { @POST @Consumes({ "application/x-www-form-urlencoded" }) - void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) Date date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback) throws ApiException, ProcessingException; + void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) Date date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback) throws WebApplicationException, ProcessingException; /** * To test enum parameters @@ -164,7 +162,7 @@ public interface FakeApi { @GET @Consumes({ "application/x-www-form-urlencoded" }) - void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @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, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString) throws ApiException, ProcessingException; + void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @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, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString) throws WebApplicationException, ProcessingException; /** * Fake endpoint to test group parameters (optional) @@ -174,7 +172,7 @@ public interface FakeApi { */ @DELETE - void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group) throws ApiException, ProcessingException; + void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group) throws WebApplicationException, ProcessingException; /** * test inline additionalProperties @@ -185,7 +183,7 @@ public interface FakeApi { @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) - void testInlineAdditionalProperties(Map requestBody) throws ApiException, ProcessingException; + void testInlineAdditionalProperties(Map requestBody) throws WebApplicationException, ProcessingException; /** * test inline free-form additionalProperties @@ -196,7 +194,7 @@ public interface FakeApi { @POST @Path("/inline-freeform-additionalProperties") @Consumes({ "application/json" }) - void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws ApiException, ProcessingException; + void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws WebApplicationException, ProcessingException; /** * test json serialization of form data @@ -207,7 +205,7 @@ public interface FakeApi { @GET @Path("/jsonFormData") @Consumes({ "application/x-www-form-urlencoded" }) - void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2) throws ApiException, ProcessingException; + void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2) throws WebApplicationException, ProcessingException; /** * test nullable parent property @@ -218,11 +216,11 @@ public interface FakeApi { @POST @Path("/nullable") @Consumes({ "application/json" }) - void testNullable(ChildWithNullable childWithNullable) throws ApiException, ProcessingException; + void testNullable(ChildWithNullable childWithNullable) throws WebApplicationException, ProcessingException; @PUT @Path("/test-query-parameters") - void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws ApiException, ProcessingException; + void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws WebApplicationException, ProcessingException; /** * test referenced string map @@ -233,5 +231,5 @@ public interface FakeApi { @POST @Path("/stringMap-reference") @Consumes({ "application/json" }) - void testStringMapReference(Map requestBody) throws ApiException, ProcessingException; + void testStringMapReference(Map requestBody) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index fc30be2b5c4c..82ea07d77b53 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/fake_classname_test") public interface FakeClassnameTags123Api { @@ -50,5 +48,5 @@ public interface FakeClassnameTags123Api { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client testClassname(Client client) throws ApiException, ProcessingException; + Client testClassname(Client client) throws WebApplicationException, ProcessingException; } 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 b9e189841e01..deaa9ecf33bc 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 @@ -28,7 +28,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -39,7 +38,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("") public interface PetApi { @@ -52,7 +50,7 @@ public interface PetApi { @POST @Path("/pet") @Consumes({ "application/json", "application/xml" }) - void addPet(Pet pet) throws ApiException, ProcessingException; + void addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -62,7 +60,7 @@ public interface PetApi { */ @DELETE @Path("/pet/{petId}") - 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 WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -73,7 +71,7 @@ public interface PetApi { @GET @Path("/pet/findByStatus") @Produces({ "application/xml", "application/json" }) - List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + List findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -86,7 +84,7 @@ public interface PetApi { @GET @Path("/pet/findByTags") @Produces({ "application/xml", "application/json" }) - Set findPetsByTags(@QueryParam("tags") Set tags) throws ApiException, ProcessingException; + Set findPetsByTags(@QueryParam("tags") Set tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -97,7 +95,7 @@ public interface PetApi { @GET @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) - Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Pet getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -108,7 +106,7 @@ public interface PetApi { @PUT @Path("/pet") @Consumes({ "application/json", "application/xml" }) - void updatePet(Pet pet) throws ApiException, ProcessingException; + void updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -119,7 +117,7 @@ public interface PetApi { @POST @Path("/pet/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image @@ -131,7 +129,7 @@ public interface PetApi { @Path("/pet/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image (required) @@ -143,5 +141,5 @@ public interface PetApi { @Path("/fake/{petId}/uploadImageWithRequiredFile") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata) throws ApiException, ProcessingException; + ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata) throws WebApplicationException, 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 3746ae25ce53..8278227ac5f4 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 @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -48,7 +46,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{order_id}") - void deleteOrder(@PathParam("order_id") String orderId) throws ApiException, ProcessingException; + void deleteOrder(@PathParam("order_id") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -59,7 +57,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Map getInventory() throws ApiException, ProcessingException; + Map getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -70,7 +68,7 @@ public interface StoreApi { @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - Order getOrderById(@PathParam("order_id") Long orderId) throws ApiException, ProcessingException; + Order getOrderById(@PathParam("order_id") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -82,5 +80,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Order placeOrder(Order order) throws ApiException, ProcessingException; + Order placeOrder(Order order) throws WebApplicationException, 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 9805dfc97562..e9d18b8a5f04 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 @@ -26,7 +26,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -50,7 +48,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - void createUser(User user) throws ApiException, ProcessingException; + void createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -61,7 +59,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - void createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + void createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -72,7 +70,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - void createUsersWithListInput(List user) throws ApiException, ProcessingException; + void createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -82,7 +80,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + void deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -93,7 +91,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + User getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -104,7 +102,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -114,7 +112,7 @@ public interface UserApi { */ @GET @Path("/logout") - void logoutUser() throws ApiException, ProcessingException; + void logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -125,5 +123,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + void updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES index ae145903e52b..f5a3f6e2d2ec 100644 --- a/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/.openapi-generator/FILES @@ -9,8 +9,6 @@ docs/Tag.md docs/User.md docs/UserApi.md pom.xml -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java index 557a18c2251d..36309d679f57 100644 --- a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/PetApi.java @@ -28,7 +28,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -39,7 +38,6 @@ */ @RegisterRestClient(configKey="pet-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/pet") public interface PetApi { @@ -53,7 +51,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni addPet(Pet pet) throws ApiException, ProcessingException; + Uni addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -63,7 +61,7 @@ public interface PetApi { */ @DELETE @Path("/{petId}") - Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -74,7 +72,7 @@ public interface PetApi { @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + Uni> findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -87,7 +85,7 @@ public interface PetApi { @GET @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + Uni> findPetsByTags(@QueryParam("tags") List tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -98,7 +96,7 @@ public interface PetApi { @GET @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - Uni getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Uni getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -110,7 +108,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni updatePet(Pet pet) throws ApiException, ProcessingException; + Uni updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -121,7 +119,7 @@ public interface PetApi { @POST @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws WebApplicationException, ProcessingException; /** * uploads an image @@ -133,5 +131,5 @@ public interface PetApi { @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; + Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java index 92c16057d320..295264e839b6 100644 --- a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java @@ -26,7 +26,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="store-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -49,7 +47,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{orderId}") - Uni deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + Uni deleteOrder(@PathParam("orderId") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -60,7 +58,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Uni> getInventory() throws ApiException, ProcessingException; + Uni> getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -71,7 +69,7 @@ public interface StoreApi { @GET @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - Uni getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + Uni getOrderById(@PathParam("orderId") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -83,5 +81,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Uni placeOrder(Order order) throws ApiException, ProcessingException; + Uni placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java index da792ad6ecdd..c07384c3489b 100644 --- a/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-mutiny/src/main/java/org/openapitools/client/api/UserApi.java @@ -27,7 +27,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -38,7 +37,6 @@ */ @RegisterRestClient(configKey="user-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -51,7 +49,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - Uni createUser(User user) throws ApiException, ProcessingException; + Uni createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -62,7 +60,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - Uni createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -73,7 +71,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - Uni createUsersWithListInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -83,7 +81,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - Uni deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -94,7 +92,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - Uni getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -105,7 +103,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -115,7 +113,7 @@ public interface UserApi { */ @GET @Path("/logout") - Uni logoutUser() throws ApiException, ProcessingException; + Uni logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -126,5 +124,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - Uni updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + Uni updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-outer-enum/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-outer-enum/.openapi-generator/FILES index 697576c5e2f5..2bf79e45a54c 100644 --- a/samples/client/petstore/java/microprofile-rest-client-outer-enum/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-outer-enum/.openapi-generator/FILES @@ -4,8 +4,6 @@ docs/DefaultApi.md docs/Dog.md docs/Status.md pom.xml -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/Dog.java diff --git a/samples/client/petstore/java/microprofile-rest-client-outer-enum/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/microprofile-rest-client-outer-enum/src/main/java/org/openapitools/client/api/DefaultApi.java index da3aa64df2ab..22baa9bdf949 100644 --- a/samples/client/petstore/java/microprofile-rest-client-outer-enum/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-outer-enum/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -26,7 +26,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="default-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("") public interface DefaultApi { @@ -48,7 +46,7 @@ public interface DefaultApi { @GET @Path("/cats") @Produces({ "application/json" }) - List listCats() throws ApiException, ProcessingException; + List listCats() throws WebApplicationException, ProcessingException; /** * List all dogs @@ -57,5 +55,5 @@ public interface DefaultApi { @GET @Path("/dogs") @Produces({ "application/json" }) - List listDogs() throws ApiException, ProcessingException; + List listDogs() throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/.openapi-generator/FILES index ae145903e52b..f5a3f6e2d2ec 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/.openapi-generator/FILES @@ -9,8 +9,6 @@ docs/Tag.md docs/User.md docs/UserApi.md pom.xml -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/PetApi.java index f0910c5f9768..06707aea6fcf 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/PetApi.java @@ -27,7 +27,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -38,7 +37,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/pet") public interface PetApi { @@ -52,7 +50,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Pet addPet(Pet pet) throws ApiException, ProcessingException; + Pet addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -62,7 +60,7 @@ public interface PetApi { */ @DELETE @Path("/{petId}") - void deletePet(@BeanParam DeletePetRequest request) throws ApiException, ProcessingException; + void deletePet(@BeanParam DeletePetRequest request) throws WebApplicationException, ProcessingException; public class DeletePetRequest { private @HeaderParam("api_key") String apiKey; @@ -104,7 +102,7 @@ public DeletePetRequest apiKey(String apiKey) { @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - List findPetsByStatus(@BeanParam FindPetsByStatusRequest request) throws ApiException, ProcessingException; + List findPetsByStatus(@BeanParam FindPetsByStatusRequest request) throws WebApplicationException, ProcessingException; public class FindPetsByStatusRequest { private @QueryParam("status") List status; @@ -138,7 +136,7 @@ public FindPetsByStatusRequest status(List status) { @GET @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - List findPetsByTags(@BeanParam FindPetsByTagsRequest request) throws ApiException, ProcessingException; + List findPetsByTags(@BeanParam FindPetsByTagsRequest request) throws WebApplicationException, ProcessingException; public class FindPetsByTagsRequest { private @QueryParam("tags") List tags; @@ -170,7 +168,7 @@ public FindPetsByTagsRequest tags(List tags) { @GET @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - Pet getPetById(@BeanParam GetPetByIdRequest request) throws ApiException, ProcessingException; + Pet getPetById(@BeanParam GetPetByIdRequest request) throws WebApplicationException, ProcessingException; public class GetPetByIdRequest { private @PathParam("petId") Long petId; @@ -203,7 +201,7 @@ public GetPetByIdRequest petId(Long petId) { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Pet updatePet(Pet pet) throws ApiException, ProcessingException; + Pet updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -214,7 +212,7 @@ public GetPetByIdRequest petId(Long petId) { @POST @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - void updatePetWithForm(@BeanParam UpdatePetWithFormRequest request) throws ApiException, ProcessingException; + void updatePetWithForm(@BeanParam UpdatePetWithFormRequest request) throws WebApplicationException, ProcessingException; public class UpdatePetWithFormRequest { private @PathParam("petId") Long petId; @@ -267,7 +265,7 @@ public UpdatePetWithFormRequest status(String status) { @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - ModelApiResponse uploadFile(@BeanParam UploadFileRequest request) throws ApiException, ProcessingException; + ModelApiResponse uploadFile(@BeanParam UploadFileRequest request) throws WebApplicationException, ProcessingException; public class UploadFileRequest { private @PathParam("petId") Long petId; diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/StoreApi.java index 1adad1712cc4..c69c675bbd52 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/StoreApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -48,7 +46,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{orderId}") - void deleteOrder(@BeanParam DeleteOrderRequest request) throws ApiException, ProcessingException; + void deleteOrder(@BeanParam DeleteOrderRequest request) throws WebApplicationException, ProcessingException; public class DeleteOrderRequest { private @PathParam("orderId") String orderId; @@ -80,7 +78,7 @@ public DeleteOrderRequest orderId(String orderId) { @GET @Path("/inventory") @Produces({ "application/json" }) - Map getInventory() throws ApiException, ProcessingException; + Map getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -91,7 +89,7 @@ public DeleteOrderRequest orderId(String orderId) { @GET @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - Order getOrderById(@BeanParam GetOrderByIdRequest request) throws ApiException, ProcessingException; + Order getOrderById(@BeanParam GetOrderByIdRequest request) throws WebApplicationException, ProcessingException; public class GetOrderByIdRequest { private @PathParam("orderId") Long orderId; @@ -124,5 +122,5 @@ public GetOrderByIdRequest orderId(Long orderId) { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Order placeOrder(Order order) throws ApiException, ProcessingException; + Order placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/UserApi.java index de2ccea80b22..004ac64efbe2 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/api/UserApi.java @@ -26,7 +26,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="petstore") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -50,7 +48,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - void createUser(User user) throws ApiException, ProcessingException; + void createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -61,7 +59,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - void createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + void createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -72,7 +70,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - void createUsersWithListInput(List user) throws ApiException, ProcessingException; + void createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -82,7 +80,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - void deleteUser(@BeanParam DeleteUserRequest request) throws ApiException, ProcessingException; + void deleteUser(@BeanParam DeleteUserRequest request) throws WebApplicationException, ProcessingException; public class DeleteUserRequest { private @PathParam("username") String username; @@ -114,7 +112,7 @@ public DeleteUserRequest username(String username) { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - User getUserByName(@BeanParam GetUserByNameRequest request) throws ApiException, ProcessingException; + User getUserByName(@BeanParam GetUserByNameRequest request) throws WebApplicationException, ProcessingException; public class GetUserByNameRequest { private @PathParam("username") String username; @@ -146,7 +144,7 @@ public GetUserByNameRequest username(String username) { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - String loginUser(@BeanParam LoginUserRequest request) throws ApiException, ProcessingException; + String loginUser(@BeanParam LoginUserRequest request) throws WebApplicationException, ProcessingException; public class LoginUserRequest { private @QueryParam("username") String username; @@ -187,7 +185,7 @@ public LoginUserRequest password(String password) { */ @GET @Path("/logout") - void logoutUser() throws ApiException, ProcessingException; + void logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -198,7 +196,7 @@ public LoginUserRequest password(String password) { @PUT @Path("/{username}") @Consumes({ "application/json" }) - void updateUser(@BeanParam UpdateUserRequest request, User user) throws ApiException, ProcessingException; + void updateUser(@BeanParam UpdateUserRequest request, User user) throws WebApplicationException, ProcessingException; public class UpdateUserRequest { private @PathParam("username") String username; diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES index c2568cfe3018..53e287b86080 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES @@ -58,8 +58,6 @@ docs/User.md docs/UserApi.md pom.xml src/main/java/org/openapitools/client/api/AnotherFakeApi.java -src/main/java/org/openapitools/client/api/ApiException.java -src/main/java/org/openapitools/client/api/ApiExceptionMapper.java src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index ca6c9c512bc8..0c4e775f7733 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="anotherfake-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/another-fake/dummy") public interface AnotherFakeApi { @@ -50,5 +48,5 @@ public interface AnotherFakeApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client call123testSpecialTags(Client client) throws ApiException, ProcessingException; + Client call123testSpecialTags(Client client) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/DefaultApi.java index 296327cc3377..61a04037850f 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,12 +35,11 @@ */ @RegisterRestClient(configKey="default-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/foo") public interface DefaultApi { @GET @Produces({ "application/json" }) - FooGetDefaultResponse fooGet() throws ApiException, ProcessingException; + FooGetDefaultResponse fooGet() throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeApi.java index 15f4ce0f5fbc..3492e451bfc0 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeApi.java @@ -38,7 +38,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -49,14 +48,13 @@ */ @RegisterRestClient(configKey="fake-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/fake") public interface FakeApi { @GET @Path("/BigDecimalMap") @Produces({ "*/*" }) - FakeBigDecimalMap200Response fakeBigDecimalMap() throws ApiException, ProcessingException; + FakeBigDecimalMap200Response fakeBigDecimalMap() throws WebApplicationException, ProcessingException; /** * Health check endpoint @@ -65,7 +63,7 @@ public interface FakeApi { @GET @Path("/health") @Produces({ "application/json" }) - HealthCheckResult fakeHealthGet() throws ApiException, ProcessingException; + HealthCheckResult fakeHealthGet() throws WebApplicationException, ProcessingException; /** * test http signature authentication @@ -74,37 +72,37 @@ public interface FakeApi { @GET @Path("/http-signature-test") @Consumes({ "application/json", "application/xml" }) - void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1) throws ApiException, ProcessingException; + void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1) throws WebApplicationException, ProcessingException; @POST @Path("/outer/boolean") @Consumes({ "application/json" }) @Produces({ "*/*" }) - Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException, ProcessingException; + Boolean fakeOuterBooleanSerialize(Boolean body) throws WebApplicationException, ProcessingException; @POST @Path("/outer/composite") @Consumes({ "application/json" }) @Produces({ "*/*" }) - OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException, ProcessingException; + OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws WebApplicationException, ProcessingException; @POST @Path("/outer/number") @Consumes({ "application/json" }) @Produces({ "*/*" }) - BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException, ProcessingException; + BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws WebApplicationException, ProcessingException; @POST @Path("/outer/string") @Consumes({ "application/json" }) @Produces({ "*/*" }) - String fakeOuterStringSerialize(String body) throws ApiException, ProcessingException; + String fakeOuterStringSerialize(String body) throws WebApplicationException, ProcessingException; @POST @Path("/property/enum-int") @Consumes({ "application/json" }) @Produces({ "*/*" }) - OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException, ProcessingException; + OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebApplicationException, ProcessingException; /** * test referenced additionalProperties @@ -115,22 +113,22 @@ public interface FakeApi { @POST @Path("/additionalProperties-reference") @Consumes({ "application/json" }) - void testAdditionalPropertiesReference(Map requestBody) throws ApiException, ProcessingException; + void testAdditionalPropertiesReference(Map requestBody) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-binary") @Consumes({ "image/png" }) - void testBodyWithBinary(File body) throws ApiException, ProcessingException; + void testBodyWithBinary(File body) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-file-schema") @Consumes({ "application/json" }) - void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException, ProcessingException; + void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws WebApplicationException, ProcessingException; @PUT @Path("/body-with-query-params") @Consumes({ "application/json" }) - void testBodyWithQueryParams(@QueryParam("query") String query, User user) throws ApiException, ProcessingException; + void testBodyWithQueryParams(@QueryParam("query") String query, User user) throws WebApplicationException, ProcessingException; /** * To test \"client\" model @@ -142,7 +140,7 @@ public interface FakeApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client testClientModel(Client client) throws ApiException, ProcessingException; + Client testClientModel(Client client) throws WebApplicationException, ProcessingException; /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -153,7 +151,7 @@ public interface FakeApi { @POST @Consumes({ "application/x-www-form-urlencoded" }) - void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) Date date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback) throws ApiException, ProcessingException; + void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) Date date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback) throws WebApplicationException, ProcessingException; /** * To test enum parameters @@ -164,7 +162,7 @@ public interface FakeApi { @GET @Consumes({ "application/x-www-form-urlencoded" }) - void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @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, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString) throws ApiException, ProcessingException; + void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @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, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString) throws WebApplicationException, ProcessingException; /** * Fake endpoint to test group parameters (optional) @@ -174,7 +172,7 @@ public interface FakeApi { */ @DELETE - void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group) throws ApiException, ProcessingException; + void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group) throws WebApplicationException, ProcessingException; /** * test inline additionalProperties @@ -185,7 +183,7 @@ public interface FakeApi { @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) - void testInlineAdditionalProperties(Map requestBody) throws ApiException, ProcessingException; + void testInlineAdditionalProperties(Map requestBody) throws WebApplicationException, ProcessingException; /** * test inline free-form additionalProperties @@ -196,7 +194,7 @@ public interface FakeApi { @POST @Path("/inline-freeform-additionalProperties") @Consumes({ "application/json" }) - void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws ApiException, ProcessingException; + void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws WebApplicationException, ProcessingException; /** * test json serialization of form data @@ -207,7 +205,7 @@ public interface FakeApi { @GET @Path("/jsonFormData") @Consumes({ "application/x-www-form-urlencoded" }) - void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2) throws ApiException, ProcessingException; + void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2) throws WebApplicationException, ProcessingException; /** * test nullable parent property @@ -218,11 +216,11 @@ public interface FakeApi { @POST @Path("/nullable") @Consumes({ "application/json" }) - void testNullable(ChildWithNullable childWithNullable) throws ApiException, ProcessingException; + void testNullable(ChildWithNullable childWithNullable) throws WebApplicationException, ProcessingException; @PUT @Path("/test-query-parameters") - void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws ApiException, ProcessingException; + void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws WebApplicationException, ProcessingException; /** * test referenced string map @@ -233,5 +231,5 @@ public interface FakeApi { @POST @Path("/stringMap-reference") @Consumes({ "application/json" }) - void testStringMapReference(Map requestBody) throws ApiException, ProcessingException; + void testStringMapReference(Map requestBody) throws WebApplicationException, ProcessingException; } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index e565ea478d6f..1f8b4e49174a 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="fakeclassnametags123-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/fake_classname_test") public interface FakeClassnameTags123Api { @@ -50,5 +48,5 @@ public interface FakeClassnameTags123Api { @Consumes({ "application/json" }) @Produces({ "application/json" }) - Client testClassname(Client client) throws ApiException, ProcessingException; + Client testClassname(Client client) throws WebApplicationException, 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 3caee7fbf90e..057af4d98670 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 @@ -28,7 +28,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -39,7 +38,6 @@ */ @RegisterRestClient(configKey="pet-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("") public interface PetApi { @@ -52,7 +50,7 @@ public interface PetApi { @POST @Path("/pet") @Consumes({ "application/json", "application/xml" }) - void addPet(Pet pet) throws ApiException, ProcessingException; + void addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -62,7 +60,7 @@ public interface PetApi { */ @DELETE @Path("/pet/{petId}") - 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 WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -73,7 +71,7 @@ public interface PetApi { @GET @Path("/pet/findByStatus") @Produces({ "application/xml", "application/json" }) - List findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + List findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -86,7 +84,7 @@ public interface PetApi { @GET @Path("/pet/findByTags") @Produces({ "application/xml", "application/json" }) - Set findPetsByTags(@QueryParam("tags") Set tags) throws ApiException, ProcessingException; + Set findPetsByTags(@QueryParam("tags") Set tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -97,7 +95,7 @@ public interface PetApi { @GET @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) - Pet getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Pet getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -108,7 +106,7 @@ public interface PetApi { @PUT @Path("/pet") @Consumes({ "application/json", "application/xml" }) - void updatePet(Pet pet) throws ApiException, ProcessingException; + void updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -119,7 +117,7 @@ public interface PetApi { @POST @Path("/pet/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image @@ -131,7 +129,7 @@ public interface PetApi { @Path("/pet/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - 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 WebApplicationException, ProcessingException; /** * uploads an image (required) @@ -143,5 +141,5 @@ public interface PetApi { @Path("/fake/{petId}/uploadImageWithRequiredFile") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata) throws ApiException, ProcessingException; + ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata) throws WebApplicationException, 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 2c54451a73da..955018480027 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 @@ -25,7 +25,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -36,7 +35,6 @@ */ @RegisterRestClient(configKey="store-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -48,7 +46,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{order_id}") - void deleteOrder(@PathParam("order_id") String orderId) throws ApiException, ProcessingException; + void deleteOrder(@PathParam("order_id") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -59,7 +57,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Map getInventory() throws ApiException, ProcessingException; + Map getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -70,7 +68,7 @@ public interface StoreApi { @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - Order getOrderById(@PathParam("order_id") Long orderId) throws ApiException, ProcessingException; + Order getOrderById(@PathParam("order_id") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -82,5 +80,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Order placeOrder(Order order) throws ApiException, ProcessingException; + Order placeOrder(Order order) throws WebApplicationException, 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 7d4fdf95a952..4c3da50a1930 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 @@ -26,7 +26,6 @@ import org.apache.cxf.jaxrs.ext.multipart.*; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** @@ -37,7 +36,6 @@ */ @RegisterRestClient(configKey="user-api") -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -50,7 +48,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - void createUser(User user) throws ApiException, ProcessingException; + void createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -61,7 +59,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - void createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + void createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -72,7 +70,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - void createUsersWithListInput(List user) throws ApiException, ProcessingException; + void createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -82,7 +80,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - void deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + void deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -93,7 +91,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - User getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + User getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -104,7 +102,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + String loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -114,7 +112,7 @@ public interface UserApi { */ @GET @Path("/logout") - void logoutUser() throws ApiException, ProcessingException; + void logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -125,5 +123,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - void updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + void updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; } diff --git a/samples/server/petstore/java-microprofile/.openapi-generator/FILES b/samples/server/petstore/java-microprofile/.openapi-generator/FILES index 04c00069a7b8..0a95588787c4 100644 --- a/samples/server/petstore/java-microprofile/.openapi-generator/FILES +++ b/samples/server/petstore/java-microprofile/.openapi-generator/FILES @@ -12,8 +12,6 @@ pom.xml src/main/java/org/openapitools/server/RFC3339DateFormat.java src/main/java/org/openapitools/server/RFC3339InstantDeserializer.java src/main/java/org/openapitools/server/RFC3339JavaTimeModule.java -src/main/java/org/openapitools/server/api/ApiException.java -src/main/java/org/openapitools/server/api/ApiExceptionMapper.java src/main/java/org/openapitools/server/api/PetApi.java src/main/java/org/openapitools/server/api/StoreApi.java src/main/java/org/openapitools/server/api/UserApi.java diff --git a/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/PetApi.java b/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/PetApi.java index 560a4b6222e1..52dea57a9751 100644 --- a/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/PetApi.java +++ b/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/PetApi.java @@ -28,8 +28,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; -import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** * OpenAPI Petstore @@ -38,7 +36,6 @@ * */ -@RegisterProvider(ApiExceptionMapper.class) @Path("/pet") public interface PetApi { @@ -52,7 +49,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni addPet(Pet pet) throws ApiException, ProcessingException; + Uni addPet(Pet pet) throws WebApplicationException, ProcessingException; /** * Deletes a pet @@ -62,7 +59,7 @@ public interface PetApi { */ @DELETE @Path("/{petId}") - Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException; + Uni deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws WebApplicationException, ProcessingException; /** * Finds Pets by status @@ -73,7 +70,7 @@ public interface PetApi { @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - Uni> findPetsByStatus(@QueryParam("status") List status) throws ApiException, ProcessingException; + Uni> findPetsByStatus(@QueryParam("status") List status) throws WebApplicationException, ProcessingException; /** * Finds Pets by tags @@ -86,7 +83,7 @@ public interface PetApi { @GET @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - Uni findPetsByTags(@QueryParam("tags") List tags) throws ApiException, ProcessingException; + Uni findPetsByTags(@QueryParam("tags") List tags) throws WebApplicationException, ProcessingException; /** * Find pet by ID @@ -97,7 +94,7 @@ public interface PetApi { @GET @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - Uni getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException; + Uni getPetById(@PathParam("petId") Long petId) throws WebApplicationException, ProcessingException; /** * Update an existing pet @@ -109,7 +106,7 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - Uni updatePet(Pet pet) throws ApiException, ProcessingException; + Uni updatePet(Pet pet) throws WebApplicationException, ProcessingException; /** * Updates a pet in the store with form data @@ -120,7 +117,7 @@ public interface PetApi { @POST @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException; + Uni updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws WebApplicationException, ProcessingException; /** * uploads an image @@ -132,5 +129,5 @@ public interface PetApi { @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException; + Uni uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws WebApplicationException, ProcessingException; } diff --git a/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/StoreApi.java b/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/StoreApi.java index 4c474c41afbb..8adaef1109c7 100644 --- a/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/StoreApi.java +++ b/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/StoreApi.java @@ -26,8 +26,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; -import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** * OpenAPI Petstore @@ -36,7 +34,6 @@ * */ -@RegisterProvider(ApiExceptionMapper.class) @Path("/store") public interface StoreApi { @@ -48,7 +45,7 @@ public interface StoreApi { */ @DELETE @Path("/order/{orderId}") - Uni deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException; + Uni deleteOrder(@PathParam("orderId") String orderId) throws WebApplicationException, ProcessingException; /** * Returns pet inventories by status @@ -59,7 +56,7 @@ public interface StoreApi { @GET @Path("/inventory") @Produces({ "application/json" }) - Uni> getInventory() throws ApiException, ProcessingException; + Uni> getInventory() throws WebApplicationException, ProcessingException; /** * Find purchase order by ID @@ -70,7 +67,7 @@ public interface StoreApi { @GET @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - Uni getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException; + Uni getOrderById(@PathParam("orderId") Long orderId) throws WebApplicationException, ProcessingException; /** * Place an order for a pet @@ -82,5 +79,5 @@ public interface StoreApi { @Path("/order") @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) - Uni placeOrder(Order order) throws ApiException, ProcessingException; + Uni placeOrder(Order order) throws WebApplicationException, ProcessingException; } diff --git a/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/UserApi.java b/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/UserApi.java index dad1a3924cc4..40742526fa61 100644 --- a/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/UserApi.java +++ b/samples/server/petstore/java-microprofile/src/main/java/org/openapitools/server/api/UserApi.java @@ -27,8 +27,6 @@ import io.smallrye.mutiny.Uni; -import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; -import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; /** * OpenAPI Petstore @@ -37,7 +35,6 @@ * */ -@RegisterProvider(ApiExceptionMapper.class) @Path("/user") public interface UserApi { @@ -50,7 +47,7 @@ public interface UserApi { @POST @Consumes({ "application/json" }) - Uni createUser(User user) throws ApiException, ProcessingException; + Uni createUser(User user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -61,7 +58,7 @@ public interface UserApi { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - Uni createUsersWithArrayInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithArrayInput(List user) throws WebApplicationException, ProcessingException; /** * Creates list of users with given input array @@ -72,7 +69,7 @@ public interface UserApi { @POST @Path("/createWithList") @Consumes({ "application/json" }) - Uni createUsersWithListInput(List user) throws ApiException, ProcessingException; + Uni createUsersWithListInput(List user) throws WebApplicationException, ProcessingException; /** * Delete user @@ -82,7 +79,7 @@ public interface UserApi { */ @DELETE @Path("/{username}") - Uni deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni deleteUser(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Get user by user name @@ -93,7 +90,7 @@ public interface UserApi { @GET @Path("/{username}") @Produces({ "application/xml", "application/json" }) - Uni getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException; + Uni getUserByName(@PathParam("username") String username) throws WebApplicationException, ProcessingException; /** * Logs user into the system @@ -104,7 +101,7 @@ public interface UserApi { @GET @Path("/login") @Produces({ "application/xml", "application/json" }) - Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException; + Uni loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws WebApplicationException, ProcessingException; /** * Logs out current logged in user session @@ -114,7 +111,7 @@ public interface UserApi { */ @GET @Path("/logout") - Uni logoutUser() throws ApiException, ProcessingException; + Uni logoutUser() throws WebApplicationException, ProcessingException; /** * Updated user @@ -125,5 +122,5 @@ public interface UserApi { @PUT @Path("/{username}") @Consumes({ "application/json" }) - Uni updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException; + Uni updateUser(@PathParam("username") String username, User user) throws WebApplicationException, ProcessingException; }