Skip to content

Commit

Permalink
[jaxrs-spec] fix nullable import, migrate tests to 3.0 spec (OpenAPIT…
Browse files Browse the repository at this point in the history
…ools#18606)

* update samples

* fix nullable, better test (jaxrs-spec)

* Revert "update samples"

This reverts commit 2377d98.

* update samples
  • Loading branch information
wing328 authored and Renato Mameli committed May 17, 2024
1 parent 8ed2270 commit 8227d59
Show file tree
Hide file tree
Showing 49 changed files with 5,167 additions and 3,138 deletions.
2 changes: 1 addition & 1 deletion bin/configs/jaxrs-spec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: jaxrs-spec
outputDir: samples/server/petstore/jaxrs-spec
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
additionalProperties:
artifactId: jaxrs-spec-petstore-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,9 @@ public void processOpts() {
importMapping.put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore");
importMapping.put("JsonIgnoreProperties", "com.fasterxml.jackson.annotation.JsonIgnoreProperties");
importMapping.put("JsonInclude", "com.fasterxml.jackson.annotation.JsonInclude");
importMapping.put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable");
if (openApiNullable) {
importMapping.put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable");
}
importMapping.put("SerializedName", "com.google.gson.annotations.SerializedName");
importMapping.put("TypeAdapter", "com.google.gson.TypeAdapter");
importMapping.put("JsonAdapter", "com.google.gson.annotations.JsonAdapter");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
{{/useBeanValidation}}
{{/useBeanValidation}}
{{#openApiNullable}}
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
{{/openApiNullable}}
</dependencies>
<properties>
<java.version>1.8</java.version>
Expand Down Expand Up @@ -192,5 +199,8 @@
{{^useJakartaEe}}
<jakarta.ws.rs-version>2.1.6</jakarta.ws.rs-version>
{{/useJakartaEe}}
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
{{/openApiNullable}}
</properties>
</project>
Loading

0 comments on commit 8227d59

Please sign in to comment.