Skip to content

feat: add operation to hydra response#7902

Open
Maxcastel wants to merge 3 commits intoapi-platform:mainfrom
Maxcastel:feature/add-operation-to-hydra-response
Open

feat: add operation to hydra response#7902
Maxcastel wants to merge 3 commits intoapi-platform:mainfrom
Maxcastel:feature/add-operation-to-hydra-response

Conversation

@Maxcastel
Copy link
Copy Markdown
Contributor

Q A
Branch? main
Tickets Closes #2588
License MIT
Doc PR api-platform/docs#...

@Maxcastel Maxcastel marked this pull request as draft April 1, 2026 15:16
@Maxcastel Maxcastel force-pushed the feature/add-operation-to-hydra-response branch from ad841d3 to cfad5d4 Compare April 3, 2026 14:32
@Maxcastel Maxcastel force-pushed the feature/add-operation-to-hydra-response branch 2 times, most recently from 82bca85 to 11a4a02 Compare April 21, 2026 08:29
@Maxcastel Maxcastel force-pushed the feature/add-operation-to-hydra-response branch from 11a4a02 to d499145 Compare April 21, 2026 08:35
@Maxcastel Maxcastel marked this pull request as ready for review April 21, 2026 09:05
@soyuka
Copy link
Copy Markdown
Member

soyuka commented Apr 28, 2026

Mhh we shouldn't do it like this I think. We should keep the default operations, the ones available in a response are there to override or to add new operations capabilities to this resource. See the example at https://www.hydra-cg.com/spec/latest/core/#example-6-a-representation-of-an-issue-augmented-with-a-delete-operation

I'm not sure how users would be able to define this though as I guess that for these to appear the ideal usage would be to have conditions. For example you dont declare the hydra operation globally for DELETE but you choose to show it on the resource for admins.

We'd also need to patch the api-doc-parser to make this work on @api-platform/admin and related tools.

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.

add operation attribute to hydra response

2 participants