Skip to content

Commit 48e9b9f

Browse files
authored
[bugfix][jaxrs]: fix compile error for jaxrs samples (#17479)
1 parent 218dccd commit 48e9b9f

File tree

54 files changed

+362
-22
lines changed

Some content is hidden

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

54 files changed

+362
-22
lines changed

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiService.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import java.util.List;
1313

1414
import java.io.InputStream;
1515

16+
{{#useBeanValidation}}
17+
import {{javaxPackage}}.validation.constraints.*;
18+
import {{javaxPackage}}.validation.Valid;
19+
{{/useBeanValidation}}
20+
1621
import {{javaxPackage}}.ws.rs.core.Response;
1722
import {{javaxPackage}}.ws.rs.core.SecurityContext;
1823

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import java.util.List;
1212

1313
import java.io.InputStream;
1414

15+
{{#useBeanValidation}}
16+
import {{javaxPackage}}.validation.constraints.*;
17+
import {{javaxPackage}}.validation.Valid;
18+
{{/useBeanValidation}}
19+
1520
import {{javaxPackage}}.enterprise.context.RequestScoped;
1621
import {{javaxPackage}}.ws.rs.core.Response;
1722
import {{javaxPackage}}.ws.rs.core.SecurityContext;

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<dependency>
7373
<groupId>javax</groupId>
7474
<artifactId>javaee-api</artifactId>
75-
<version>7.0</version>
75+
<version>8.0</version>
7676
<scope>provided</scope>
7777
</dependency>
7878

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
<artifactId>swagger-jaxrs</artifactId>
106106
<scope>compile</scope>
107107
<version>${swagger-core-version}</version>
108+
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
109+
for this project used jakarta.validation-api -->
110+
<exclusions>
111+
<exclusion>
112+
<groupId>javax.validation</groupId>
113+
<artifactId>validation-api</artifactId>
114+
</exclusion>
115+
</exclusions>
108116
</dependency>
109117
<dependency>
110118
<groupId>ch.qos.logback</groupId>

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@
126126
<groupId>javax.ws.rs</groupId>
127127
<artifactId>jsr311-api</artifactId>
128128
</exclusion>
129+
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
130+
for this project used jakarta.validation-api -->
131+
<exclusion>
132+
<groupId>javax.validation</groupId>
133+
<artifactId>validation-api</artifactId>
134+
</exclusion>
129135
</exclusions>
130136
</dependency>
131137
<dependency>

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
<artifactId>swagger-jaxrs</artifactId>
106106
<scope>compile</scope>
107107
<version>${swagger-core-version}</version>
108+
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
109+
for this project used jakarta.validation-api -->
110+
<exclusions>
111+
<exclusion>
112+
<groupId>javax.validation</groupId>
113+
<artifactId>validation-api</artifactId>
114+
</exclusion>
115+
</exclusions>
108116
</dependency>
109117
<dependency>
110118
<groupId>ch.qos.logback</groupId>

modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@
114114
<artifactId>swagger-jaxrs</artifactId>
115115
<scope>compile</scope>
116116
<version>${swagger-core-version}</version>
117+
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
118+
for this project used jakarta.validation-api -->
119+
<exclusions>
120+
<exclusion>
121+
<groupId>javax.validation</groupId>
122+
<artifactId>validation-api</artifactId>
123+
</exclusion>
124+
</exclusions>
117125
</dependency>
118126
<dependency>
119127
<groupId>ch.qos.logback</groupId>

modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@
116116
<artifactId>swagger-jersey2-jaxrs</artifactId>
117117
<scope>compile</scope>
118118
<version>${swagger-core-version}</version>
119+
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
120+
for this project used jakarta.validation-api -->
121+
<exclusions>
122+
<exclusion>
123+
<groupId>javax.validation</groupId>
124+
<artifactId>validation-api</artifactId>
125+
</exclusion>
126+
</exclusions>
119127
</dependency>
120128
<dependency>
121129
<groupId>ch.qos.logback</groupId>

modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import {{package}}.NotFoundException;
1313

1414
import java.io.InputStream;
1515

16+
{{#useBeanValidation}}
17+
import {{javaxPackage}}.validation.constraints.*;
18+
import {{javaxPackage}}.validation.Valid;
19+
{{/useBeanValidation}}
1620
import {{javaxPackage}}.ws.rs.core.Response;
1721
import {{javaxPackage}}.ws.rs.core.SecurityContext;
1822

modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ repositories {
1010
dependencies {
1111
providedCompile 'org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final'
1212
providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final'
13-
providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final'
13+
providedCompile('org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final') {
14+
exclude group: "javax.validation", module: "validation-api"
15+
}
1416
providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final'
1517
providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5'
1618
providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'

0 commit comments

Comments
 (0)