We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently when you generate violations such as:
Using a validator on a annotation that is used at the class level and using the generated POST method for entity creation/insert.
entity:
@Entity @SomeClassLevelConstraint() public class SomeEntity extends PanacheEntity { ....
Validator
... public boolean isValid(Object value, ConstraintValidatorContext context) { context.buildConstraintViolationWithTemplate("some error").addPropertyNode("some path").addConstraintViolation().disableDefaultConstraintViolation(); ...
This generates a json response of:
{ "title": "Constraint Violation", "status": 400, "violations": [ { "field": "add.arg0.somepath", "message": "some error" } ] }
the add.arg0 appears to be coming from RestDataResource with the Entity add(Entity entity); method? (https://github.com/quarkusio/quarkus/blob/main/extensions/panache/rest-data-panache/runtime/src/main/java/io/quarkus/rest/data/panache/RestDataResource.java#L52)
add.arg0
RestDataResource
Entity add(Entity entity);
Would be great if we could tailor this so the root makes sense for the output.
No response
The text was updated successfully, but these errors were encountered:
/cc @DavideD, @FroMage, @Sanne, @Sgitario, @gavinking, @loicmathieu
Sorry, something went wrong.
cc @Sgitario
Rest data with panache: add the parameter names in resources
14cfdc3
Fix quarkusio#29047
12641da
568ec27
Fix quarkusio#29047 (cherry picked from commit 12641da)
52538d5
Successfully merging a pull request may close this issue.
Description
Currently when you generate violations such as:
Using a validator on a annotation that is used at the class level and using the generated POST method for entity creation/insert.
entity:
Validator
This generates a json response of:
the
add.arg0
appears to be coming fromRestDataResource
with theEntity add(Entity entity);
method? (https://github.com/quarkusio/quarkus/blob/main/extensions/panache/rest-data-panache/runtime/src/main/java/io/quarkus/rest/data/panache/RestDataResource.java#L52)Would be great if we could tailor this so the root makes sense for the output.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: