jakartaee / jakartaee/rest

More fined-grained control over triggering Bean Validation

Open
#545 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
400
Forks
143
PR merge metrics
No merged PRs in 30d

Description

Currently, Bean Validation constraints on resources will always be validated as part of the JAX-RS request lifecycle. Allowing to turn off validation - e.g. for specific kinds of testing - seems desirable.

Similar to the BV integration of JSF and JPA, there could be a
JAX-RS-defined property for controlling the validation behaviour. It could look very similar to the property JPA defines for that purpose:

```
javax.persistence.validation.mode={auto|callback|none}
```

"auto" will perform validation during the entity lifecycle if a BV provider is present. So will "callback", with the difference that it raises an exception if no BV provider is present. "none" will disable validation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the JAX-RS request lifecycle and its Bean Validation integration; the issue names no files or tests. Define the property and its auto, callback, and none behavior, including how the absence of a Bean Validation provider is handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.