fix(metadata): do not duplicate list defaults on operations by Maxcastel · Pull Request #8712 · api-platform/core · GitHub
Skip to content

fix(metadata): do not duplicate list defaults on operations - #8712

Open
Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/defaults-list-duplicates
Open

Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/defaults-list-duplicates

Conversation

@Maxcastel

@Maxcastel Maxcastel commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
License MIT

With defaults: { types: ['https://schema.org/CreativeWork'] }, the types of each operation:

Before

["https://schema.org/CreativeWork", "https://schema.org/CreativeWork"]

After

["https://schema.org/CreativeWork"]

Same for schemes, middleware... The defaults are merged into the resource, the operation gets the resource value, then the defaults were merged again into the operation.

Merged lists are now deduplicated.

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