You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to generate TS interfaces from swagger.
15% of our API is made up of custom API endpoints who represent other ressources this isen't no related to entities.
Ts generator seem to be blocked on the first custom API endpoint.
We execute that command : NODE_TLS_REJECT_UNAUTHORIZED=0 npx @api-platform/client-generator --generator typescript https://xxxxxxxxx/ tsI/
This return : Error: Unable to find the URL for "https://xxxxxxxxx/docs.jsonld#Entrypoint/ads", make sure your api resource has at least one GET item operation declared.
Is it possible to work around this problem ?
Best regards.
The text was updated successfully, but these errors were encountered:
It seems you have only one GET operation and it is a collection one. The error message says you need at least one GET item operation so maybe try something like :
Edit : ⚠️ the given solution is naive (not to say "dumb"), so it may not be what you are looking for. As a matter of fact, I came here because I had the same error message, and reading your issue helped me solve mine by adding a collection GET operation to my ressource.
I think Branch chapter9-react of My tutorial Api Platform does include instructions to generate code from a custom operation, but it is not on a seperate resource.
Hi
We want to generate TS interfaces from swagger.
15% of our API is made up of custom API endpoints who represent other ressources this isen't no related to entities.
Ts generator seem to be blocked on the first custom API endpoint.
Custom API endpoints are defined like this :
We execute that command :
NODE_TLS_REJECT_UNAUTHORIZED=0 npx @api-platform/client-generator --generator typescript https://xxxxxxxxx/ tsI/
This return :
Error: Unable to find the URL for "https://xxxxxxxxx/docs.jsonld#Entrypoint/ads", make sure your api resource has at least one GET item operation declared.
Is it possible to work around this problem ?
Best regards.
The text was updated successfully, but these errors were encountered: