Skip to content

docs(validation): document validation groups effect on generated schema#2292

Merged
soyuka merged 1 commit into
api-platform:4.3from
soyuka:docs/validation-groups-schema
Jun 11, 2026
Merged

docs(validation): document validation groups effect on generated schema#2292
soyuka merged 1 commit into
api-platform:4.3from
soyuka:docs/validation-groups-schema

Conversation

@soyuka

@soyuka soyuka commented Jun 11, 2026

Copy link
Copy Markdown
Member

Documents how validation groups interact with JSON Schema / OpenAPI generation.

When a constraint declares an explicit groups: option it leaves the Default group (standard Symfony semantics). Since schema is generated per-operation, grouped constraints are not reflected unless the operation declares the matching groups via validationContext: ['groups' => [...]]. Also documents the callable-groups limitation: dynamic groups resolved at runtime cannot appear in the static schema.

Documents the behavior reported in api-platform/core#6500.

Grouped constraints leave the Default group (Symfony semantics), so they are
invisible in generated JSON Schema / OpenAPI unless the operation declares
matching groups via validationContext. Also documents the callable limitation:
dynamic groups cannot be reflected in the static schema.

Refs api-platform/core#6500
@soyuka soyuka merged commit 7150703 into api-platform:4.3 Jun 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant