Repository navigation
Conversation
ad841d3 to
cfad5d4
Compare
11a4a02 to
d499145
Compare
|
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. |
d499145 to
9d81e83
Compare
|
Exemple: ? |
601fd0b to
986443a
Compare
|
We need to simplify this approach, the idea with hydra:operation is that it exposes a related operation for discovery imo this should be an existing operation. For example: #[Get(uriTemplate: '/companies', hydraOperations: [new HydraOperation(method: 'DELETE', uriTemplate: '/companies')])]
When
So the code should get a lot simpler: |
986443a to
6f09eb1
Compare
558c320 to
ae3101a
Compare
ae3101a to
12c2c6b
Compare
f5859bc to
cbab334
Compare
hydra:operation, filtered by theirsecurity. Disable it withserializer.hydra_operations: false, or per operation withhydraOperations: false.hydraOperationsnarrows the list withHydraOperationreferences: byname, or bymethod+uriTemplate. They are resolved when building the metadata and an unknown one throws. A reference can have its ownsecurity, otherwise the referenced operation's is used.supportedOperationin the documentation.hideHydraOperationis docs-only: a hidden operation is still exposed to authorized users.GET /companies/1as an admin (operationis omitted for other users):{ "@context": "/contexts/Company", "@id": "/companies/1", "@type": "Company", "operation": [ { "@type": ["Operation", "schema:DeleteAction"], "description": "Deletes the Company resource.", "method": "DELETE", "returns": "owl:Nothing", "title": "deleteCompany" } ], "name": "Les-Tilleuls.coop" }