Closed Crovitche-1623 closed 5 months ago
This issue has been fixed in the api-doc-parser package Once we have published a new version, ressources without a Get collection operation wont be generated and an error will simply be logged.
I'm closing this issue for now.
API Platform version(s) affected: 2.6.6
Description
A GET collection operation (not item operation as specified in error) is required to generate Typescript interfaces. If it's missing, this error occurs:
Error: Unable to find the URL for "https://localhost:9000/docs.jsonld#Entrypoint/entity", make sure your api resource has at least one GET item operation declared.
Why is this operation required ?How to reproduce
Create an Api Resource without a GET collection operation and run this command:
NODE_TLS_REJECT_UNAUTHORIZED=0 npx @api-platform/client-generator --generator typescript https://localhost:9000/ src/
Workaround
Make the operation accessible to administrators using a security_access: