-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Labels
area:clientThis item is related to the client extensionThis item is related to the client extensionbugSomething isn't workingSomething isn't working
Description
When modeling a schema object with an array property with items of type string and the minLength validation set, the generated code is missing an import to jakarta.validation.constraints.Size or the annotation must use its FQCN when using Bean Validation.
Example:
list:
type: array
items:
type: string
minLength: 1Generated code: target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java
/**
* Some object to be validated
**/
@jakarta.ws.rs.QueryParam("_list")
private List<@Size(min = 1)String> _list = null;Compilation error:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[227,23] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject.ValidatedObjectQueryParam
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[332,22] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject.ValidatedObjectQueryParam
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[339,35] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject.ValidatedObjectQueryParam
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[343,54] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject.ValidatedObjectQueryParam
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[39,19] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[135,18] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[142,31] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject
[ERROR] ./client/integration-tests/bean-validation/target/generated-sources/open-api-yaml/org/openapi/quarkus/bean_validation_true_yaml/model/ValidatedObject.java:[146,40] cannot find symbol
symbol: class Size
location: class org.openapi.quarkus.bean_validation_true_yaml.model.ValidatedObject
Metadata
Metadata
Assignees
Labels
area:clientThis item is related to the client extensionThis item is related to the client extensionbugSomething isn't workingSomething isn't working