Skip to content

Commit 8dcb48b

Browse files
committed
Merge branch 'master' of https://github.com/jochenr/openapi-generator into jochenr-master
2 parents 93d7821 + d04d9ab commit 8dcb48b

File tree

67 files changed

+174
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+174
-194
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import java.util.Set;
1212
import {{rootJavaEEPackage}}.ws.rs.*;
1313
import {{rootJavaEEPackage}}.ws.rs.core.Response;
1414
import {{rootJavaEEPackage}}.ws.rs.core.MediaType;
15-
{{^disableMultipart}}
16-
import org.apache.cxf.jaxrs.ext.multipart.*;
17-
{{/disableMultipart}}
15+
1816
{{#microprofileMutiny}}
1917
import io.smallrye.mutiny.Uni;
2018
{{/microprofileMutiny}}
@@ -29,6 +27,7 @@ import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
2927
{{/microprofileRegisterExceptionMapper}}
3028
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
3129

30+
3231
{{#appName}}
3332
/**
3433
* {{{appName}}}

modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ package {{package}};
44

55
{{#imports}}import {{import}};
66
{{/imports}}
7+
{{#isFile}}
8+
import java.io.File;
9+
{{/isFile}}
710
import org.junit.jupiter.api.BeforeEach;
811
import org.junit.jupiter.api.Test;
912
import org.junit.jupiter.api.Assertions;
@@ -70,7 +73,7 @@ public class {{classname}}Test {
7073
public void {{operationId}}Test() {
7174
// TODO: test validations
7275
{{#allParams}}
73-
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}}
76+
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}File {{paramName}} = null;{{/isFile}}
7477
{{/allParams}}
7578
//{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
7679
//{{#returnType}}Assertions.assertNotNull(response);{{/returnType}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isFormParam}}{{^isFile}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
1+
{{#isFormParam}}{{^isFile}}{{#required}}{{#useBeanValidation}}@NotNull {{/useBeanValidation}}{{/required}}@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} {{#required}}{{#useBeanValidation}}@NotNull {{/useBeanValidation}}{{/required}}@FormParam("{{baseName}}") File {{paramName}}Detail{{/isFile}}{{/isFormParam}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
1+
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} File {{paramName}}Detail{{/isFile}}{{/isFormParam}}

modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<sourceDirectory>src/main/java</sourceDirectory>
1313
<plugins>
1414
<plugin>
15-
<groupId>org.jboss.jandex</groupId>
15+
<groupId>io.smallrye</groupId>
1616
<artifactId>jandex-maven-plugin</artifactId>
1717
<version>${jandex.maven.plugin.version}</version>
1818
<executions>
@@ -101,13 +101,7 @@
101101
<version>${smallrye.config.version}</version>
102102
<scope>test</scope>
103103
</dependency>
104-
{{^disableMultipart}}
105-
<dependency>
106-
<groupId>org.apache.cxf</groupId>
107-
<artifactId>cxf-rt-rs-extension-providers</artifactId>
108-
<version>${cxf.rt.rs.extension.providers.version}</version>
109-
</dependency>
110-
{{/disableMultipart}}
104+
111105
{{#jsonb}}
112106
<dependency>
113107
<groupId>jakarta.json.bind</groupId>
@@ -227,7 +221,6 @@
227221
{{#useBeanValidation}}
228222
<beanvalidation.version>3.0.2</beanvalidation.version>
229223
{{/useBeanValidation}}
230-
<cxf.version>3.2.7</cxf.version>
231224
<jackson.jaxrs.version>2.17.1</jackson.jaxrs.version>
232225
{{#jackson}}
233226
<jackson.version>2.17.1</jackson.version>
@@ -241,11 +234,10 @@
241234
<microprofile.rest.client.api.version>{{microprofileRestClientVersion}}</microprofile.rest.client.api.version>
242235
<smallrye.rest.client.version>1.2.1</smallrye.rest.client.version>
243236
<smallrye.config.version>1.3.5</smallrye.config.version>
244-
<cxf.rt.rs.extension.providers.version>3.2.6</cxf.rt.rs.extension.providers.version>
245237
<jaxb.core.version>2.2.11</jaxb.core.version>
246238
<jaxb.impl.version>2.2.11</jaxb.impl.version>
247239
<hibernate.validator.version>5.2.2.Final</hibernate.validator.version>
248-
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
240+
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
249241
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
250242
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
251243
{{#microprofileMutiny}}

modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<sourceDirectory>src/main/java</sourceDirectory>
1313
<plugins>
1414
<plugin>
15-
<groupId>org.jboss.jandex</groupId>
15+
<groupId>io.smallrye</groupId>
1616
<artifactId>jandex-maven-plugin</artifactId>
1717
<version>${jandex.maven.plugin.version}</version>
1818
<executions>
@@ -101,13 +101,7 @@
101101
<scope>test</scope>
102102
</dependency>
103103

104-
{{^disableMultipart}}
105-
<dependency>
106-
<groupId>org.apache.cxf</groupId>
107-
<artifactId>cxf-rt-rs-extension-providers</artifactId>
108-
<version>${cxf.rt.rs.extension.providers.version}</version>
109-
</dependency>
110-
{{/disableMultipart}}
104+
111105
{{#jsonb}}
112106
<dependency>
113107
<groupId>jakarta.json.bind</groupId>
@@ -245,7 +239,7 @@
245239
<jaxb.core.version>3.0.2</jaxb.core.version>
246240
<jaxb.impl.version>3.0.2</jaxb.impl.version>
247241
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
248-
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
242+
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
249243
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
250244
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
251245
{{#microprofileMutiny}}

samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/pom.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<sourceDirectory>src/main/java</sourceDirectory>
1111
<plugins>
1212
<plugin>
13-
<groupId>org.jboss.jandex</groupId>
13+
<groupId>io.smallrye</groupId>
1414
<artifactId>jandex-maven-plugin</artifactId>
1515
<version>${jandex.maven.plugin.version}</version>
1616
<executions>
@@ -90,11 +90,7 @@
9090
<scope>test</scope>
9191
</dependency>
9292

93-
<dependency>
94-
<groupId>org.apache.cxf</groupId>
95-
<artifactId>cxf-rt-rs-extension-providers</artifactId>
96-
<version>${cxf.rt.rs.extension.providers.version}</version>
97-
</dependency>
93+
9894
<!-- JSON processing: jackson -->
9995
<dependency>
10096
<groupId>com.fasterxml.jackson.core</groupId>
@@ -168,7 +164,7 @@
168164
<jaxb.core.version>3.0.2</jaxb.core.version>
169165
<jaxb.impl.version>3.0.2</jaxb.impl.version>
170166
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
171-
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
167+
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
172168
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
173169
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
174170
<mutiny.version>1.10.0</mutiny.version>

samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/PetApi.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
import jakarta.ws.rs.*;
2525
import jakarta.ws.rs.core.Response;
2626
import jakarta.ws.rs.core.MediaType;
27-
import org.apache.cxf.jaxrs.ext.multipart.*;
27+
2828
import io.smallrye.mutiny.Uni;
2929

3030

3131
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
3232
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
3333

34+
3435
/**
3536
* OpenAPI Petstore
3637
*
@@ -121,7 +122,7 @@ public interface PetApi {
121122
@POST
122123
@Path("/{petId}")
123124
@Consumes({ "application/x-www-form-urlencoded" })
124-
Uni<Void> updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
125+
Uni<Void> updatePetWithForm(@PathParam("petId") Long petId, @FormParam("name") String name, @FormParam("status") String status) throws ApiException, ProcessingException;
125126

126127
/**
127128
* uploads an image
@@ -133,5 +134,5 @@ public interface PetApi {
133134
@Path("/{petId}/uploadImage")
134135
@Consumes({ "multipart/form-data" })
135136
@Produces({ "application/json" })
136-
Uni<ModelApiResponse> uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
137+
Uni<ModelApiResponse> uploadFile(@PathParam("petId") Long petId, @FormParam("additionalMetadata") String additionalMetadata, @FormParam("file") File _fileDetail) throws ApiException, ProcessingException;
137138
}

samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/StoreApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
import jakarta.ws.rs.*;
2323
import jakarta.ws.rs.core.Response;
2424
import jakarta.ws.rs.core.MediaType;
25-
import org.apache.cxf.jaxrs.ext.multipart.*;
25+
2626
import io.smallrye.mutiny.Uni;
2727

2828

2929
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
3030
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
3131

32+
3233
/**
3334
* OpenAPI Petstore
3435
*

samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny/src/main/java/org/openapitools/client/api/UserApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
import jakarta.ws.rs.*;
2424
import jakarta.ws.rs.core.Response;
2525
import jakarta.ws.rs.core.MediaType;
26-
import org.apache.cxf.jaxrs.ext.multipart.*;
26+
2727
import io.smallrye.mutiny.Uni;
2828

2929

3030
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
3131
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
3232

33+
3334
/**
3435
* OpenAPI Petstore
3536
*

0 commit comments

Comments
 (0)