Skip to content

Commit a25bed7

Browse files
authored
[BUG] [java-camel] Align pom.xml generation with the documentation (#22888)
1 parent aaa3500 commit a25bed7

4 files changed

Lines changed: 5 additions & 10 deletions

File tree

bin/configs/java-camel-petstore-new.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ outputDir: samples/server/petstore/java-camel
33
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
44
templateDir: modules/openapi-generator/src/main/resources/java-camel-server
55
additionalProperties:
6-
oas3: "true"
76
hideGenerationTimestamp: true
87
camelRestBindingMode: "auto"
98
performBeanValidation: true
109
#dateLibrary: "java8-localdatetime"
1110
camelDataformatProperties: "json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS"
12-
library: "spring-boot"
1311
withXml: true
1412
jackson: true
1513
camelUseDefaultValidationErrorProcessor: true

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public JavaCamelServerCodegen() {
7272
templateDir = "java-camel-server";
7373
addCliOptions();
7474
artifactId = "openapi-camel";
75-
super.library = "";
75+
annotationLibrary = AnnotationLibrary.SWAGGER2;
7676
}
7777

7878
@Override

modules/openapi-generator/src/main/resources/java-camel-server/pom.mustache

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,20 @@ Do not edit the class manually.
118118
<artifactId>jackson-databind-nullable</artifactId>
119119
<version>0.2.8</version>
120120
</dependency>
121+
{{#swagger1AnnotationLibrary}}
121122
<dependency>
122123
<groupId>io.swagger</groupId>
123124
<artifactId>swagger-annotations</artifactId>
124125
<version>1.6.3</version>
125126
</dependency>
126-
{{#oas3}}
127+
{{/swagger1AnnotationLibrary}}
128+
{{#swagger2AnnotationLibrary}}
127129
<dependency>
128130
<groupId>io.swagger.core.v3</groupId>
129131
<artifactId>swagger-annotations</artifactId>
130132
<version>2.2.8</version>
131133
</dependency>
132-
{{/oas3}}
134+
{{/swagger2AnnotationLibrary}}
133135
{{#jackson}}
134136
<dependency>
135137
<groupId>com.fasterxml.jackson.datatype</groupId>

samples/server/petstore/java-camel/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ Do not edit the class manually.
118118
<artifactId>jackson-databind-nullable</artifactId>
119119
<version>0.2.8</version>
120120
</dependency>
121-
<dependency>
122-
<groupId>io.swagger</groupId>
123-
<artifactId>swagger-annotations</artifactId>
124-
<version>1.6.3</version>
125-
</dependency>
126121
<dependency>
127122
<groupId>io.swagger.core.v3</groupId>
128123
<artifactId>swagger-annotations</artifactId>

0 commit comments

Comments
 (0)