Skip to content

fix(jsonld): use operation shortName for @context URI with multiple ApiResource#7833

Open
soyuka wants to merge 1 commit intoapi-platform:4.3from
soyuka:fix/hydra-same-collection-op
Open

fix(jsonld): use operation shortName for @context URI with multiple ApiResource#7833
soyuka wants to merge 1 commit intoapi-platform:4.3from
soyuka:fix/hydra-same-collection-op

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Mar 10, 2026

Q A
Branch? 4.3
Tickets
License MIT
Doc PR

When an entity has multiple #[ApiResource] attributes, getResourceContextUri() always used [0] (first resource's shortName). Now the trait dispatches to operation-aware methods on ContextBuilder when an operation is available.

@soyuka soyuka force-pushed the fix/hydra-same-collection-op branch 3 times, most recently from 90e8fc2 to 53a1291 Compare March 10, 2026 10:26
| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Tickets       | ∅
| License       | MIT
| Doc PR        | ∅

When an entity has multiple #[ApiResource] attributes, the @context URI
always used the first resource's shortName. Adds OperationContextBuilderInterface
to resolve the shortName from the current operation instead.
@soyuka soyuka force-pushed the fix/hydra-same-collection-op branch from 53a1291 to 7429afa Compare March 10, 2026 15:05
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