Skip to content

Commit

Permalink
Activate useBeanValidation flag
Browse files Browse the repository at this point in the history
- clean up poms
- update to openapi-generator 7.4.0
  • Loading branch information
pe-st committed Mar 26, 2024
1 parent dde3a5e commit 2c990d5
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 63 deletions.
2 changes: 1 addition & 1 deletion _idea/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions _idea/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions code-first-openapi-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<java.release>21</java.release>

<!-- artifact versions -->
<lombok.version>1.18.30</lombok.version>
<quarkus.version>3.8.1</quarkus.version>
<lombok.version>1.18.32</lombok.version>
<quarkus.version>3.8.3</quarkus.version>

<!-- testing artifact versions -->
<hamcrest.version>2.2</hamcrest.version>
<json.unit.version>3.2.2</json.unit.version>
<json.unit.version>3.2.7</json.unit.version>

<!-- apache maven plugin versions (in alphabetical order) -->
<maven.compiler.plugin.version>3.12.1</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.surefire.plugin.version>3.2.5</maven.surefire.plugin.version>
</properties>

Expand Down Expand Up @@ -85,12 +85,6 @@
<artifactId>rest-assured</artifactId>
<!-- rest-assured.version managed by quarkus -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
Expand Down
16 changes: 5 additions & 11 deletions code-first-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
<java.release>21</java.release>

<!-- artifact versions -->
<lombok.version>1.18.30</lombok.version>
<quarkus.version>3.8.1</quarkus.version>
<swagger.version>2.2.20</swagger.version>
<lombok.version>1.18.32</lombok.version>
<quarkus.version>3.8.3</quarkus.version>
<swagger.version>2.2.21</swagger.version>

<!-- testing artifact versions -->
<hamcrest.version>2.2</hamcrest.version>
<json.unit.version>3.2.2</json.unit.version>
<json.unit.version>3.2.7</json.unit.version>

<!-- apache maven plugin versions (in alphabetical order) -->
<maven.compiler.plugin.version>3.12.1</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.surefire.plugin.version>3.2.5</maven.surefire.plugin.version>
</properties>

Expand Down Expand Up @@ -91,12 +91,6 @@
<artifactId>rest-assured</artifactId>
<!-- rest-assured.version managed by quarkus -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
Expand Down
26 changes: 6 additions & 20 deletions design-first-openapi-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@
<java.release>21</java.release>

<!-- artifact versions -->
<lombok.version>1.18.30</lombok.version>
<quarkus.version>3.8.1</quarkus.version>
<swagger.version>1.6.13</swagger.version>
<openapi-generator.plugin.version>7.2.0</openapi-generator.plugin.version>
<lombok.version>1.18.32</lombok.version>
<quarkus.version>3.8.3</quarkus.version>
<openapi-generator.plugin.version>7.4.0</openapi-generator.plugin.version>

<!-- testing artifact versions -->
<hamcrest.version>2.2</hamcrest.version>
<json.unit.version>3.2.2</json.unit.version>
<json.unit.version>3.2.7</json.unit.version>

<!-- apache maven plugin versions (in alphabetical order) -->
<maven.compiler.plugin.version>3.12.1</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.surefire.plugin.version>3.2.5</maven.surefire.plugin.version>

<generated.path>${project.build.directory}/generated-sources/openapi</generated.path>
Expand Down Expand Up @@ -62,13 +61,6 @@

<!-- dependencies for the generated code -->
<!-- jackson-databind already present via quarkus-smallrye-openapi -->
<dependency>
<!-- openapi-generator still needs @ApiModel/@ApiModelProperty -->
<!-- couldn't find an option to generate openapi3/swagger2 annotations... -->
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>

<!-- Application dependencies -->
<dependency>
Expand All @@ -95,12 +87,6 @@
<artifactId>rest-assured</artifactId>
<!-- rest-assured.version managed by quarkus -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
Expand Down Expand Up @@ -143,7 +129,7 @@
<dateLibrary>java8</dateLibrary>
<library>native</library>
<useJakartaEe>true</useJakartaEe>
<useBeanValidation>false</useBeanValidation>
<useBeanValidation>true</useBeanValidation>
<sourceFolder>.</sourceFolder>
<modelPackage>ch.schlau.pesche.apidocs.openapi.designfirst.generated.model</modelPackage>
</configOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;


/**
Expand All @@ -32,7 +34,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
EmvTags.JSON_PROPERTY_84,
EmvTags.JSON_PROPERTY_9_F1_A
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0")
public class EmvTags {
public static final String JSON_PROPERTY_84 = "84";
private String _84;
Expand All @@ -53,6 +55,7 @@ public class EmvTags {
* @return _84
**/
@jakarta.annotation.Nullable

@JsonProperty(JSON_PROPERTY_84)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand All @@ -78,6 +81,7 @@ public class EmvTags {
* @return _9F1A
**/
@jakarta.annotation.Nullable

@JsonProperty(JSON_PROPERTY_9_F1_A)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;


/**
Expand All @@ -34,7 +36,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
PinCheckRequest.JSON_PROPERTY_PIN_BLOCK,
PinCheckRequest.JSON_PROPERTY_UUID
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0")
public class PinCheckRequest {
public static final String JSON_PROPERTY_PAN = "pan";
private ch.schlau.pesche.apidocs.openapi.designfirst.txproc.model.Pan pan;
Expand All @@ -58,6 +60,9 @@ public class PinCheckRequest {
* @return pan
**/
@jakarta.annotation.Nonnull
@NotNull
@Valid

@JsonProperty(JSON_PROPERTY_PAN)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -83,6 +88,8 @@ public class PinCheckRequest {
* @return pinBlock
**/
@jakarta.annotation.Nonnull
@NotNull

@JsonProperty(JSON_PROPERTY_PIN_BLOCK)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -108,6 +115,9 @@ public class PinCheckRequest {
* @return uuid
**/
@jakarta.annotation.Nonnull
@NotNull
@Valid

@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;


/**
Expand All @@ -32,7 +34,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
PinCheckResponse.JSON_PROPERTY_RESULT,
PinCheckResponse.JSON_PROPERTY_TRIES
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0")
public class PinCheckResponse {
/**
* Result of the request
Expand Down Expand Up @@ -88,6 +90,7 @@ public class PinCheckResponse {
* @return result
**/
@jakarta.annotation.Nullable

@JsonProperty(JSON_PROPERTY_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand All @@ -113,6 +116,7 @@ public class PinCheckResponse {
* @return tries
**/
@jakarta.annotation.Nullable

@JsonProperty(JSON_PROPERTY_TRIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;


/**
Expand All @@ -35,7 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
PurchaseAuthRequest.JSON_PROPERTY_PAN,
PurchaseAuthRequest.JSON_PROPERTY_UUID
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0")
public class PurchaseAuthRequest {
public static final String JSON_PROPERTY_EMV_TAGS = "emvTags";
private EmvTags emvTags;
Expand All @@ -59,6 +61,8 @@ public class PurchaseAuthRequest {
* @return emvTags
**/
@jakarta.annotation.Nullable
@Valid

@JsonProperty(JSON_PROPERTY_EMV_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand All @@ -84,6 +88,9 @@ public class PurchaseAuthRequest {
* @return pan
**/
@jakarta.annotation.Nonnull
@NotNull
@Valid

@JsonProperty(JSON_PROPERTY_PAN)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -109,6 +116,9 @@ public class PurchaseAuthRequest {
* @return uuid
**/
@jakarta.annotation.Nonnull
@NotNull
@Valid

@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;


/**
Expand All @@ -32,7 +34,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
PurchaseAuthResponse.JSON_PROPERTY_APPROVAL_CODE,
PurchaseAuthResponse.JSON_PROPERTY_RESULT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0")
public class PurchaseAuthResponse {
public static final String JSON_PROPERTY_APPROVAL_CODE = "approvalCode";
private String approvalCode;
Expand Down Expand Up @@ -88,6 +90,7 @@ public class PurchaseAuthResponse {
* @return approvalCode
**/
@jakarta.annotation.Nullable

@JsonProperty(JSON_PROPERTY_APPROVAL_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand All @@ -113,6 +116,7 @@ public class PurchaseAuthResponse {
* @return result
**/
@jakarta.annotation.Nullable

@JsonProperty(JSON_PROPERTY_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand Down
Loading

0 comments on commit 2c990d5

Please sign in to comment.