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
Description
When generating typescript types using the command npm init @api-platform/client http://localhost apiTypes -- --generator typescript I get the following error:
Error: Cannot find the class related to http://localhost:8095/docs.jsonld#Entrypoint/resource.
This only occurs if I have an ApiResource/Entity named 'Resource'. Renaming it resolves the error.
How to reproduce
Create an API resource as below, and then runnpm init @api-platform/client http://localhost apiTypes -- --generator typescript:
> npm init @api-platform/client http://localhost apiTypes -- --generator typescript
Interface for the "Res" resource type has been generated!
Interface for the "User" resource type has been generated!
The text was updated successfully, but these errors were encountered:
API Platform version(s) affected: 4.0.8
Description
When generating typescript types using the command
npm init @api-platform/client http://localhost apiTypes -- --generator typescript
I get the following error:Error: Cannot find the class related to http://localhost:8095/docs.jsonld#Entrypoint/resource.
This only occurs if I have an ApiResource/Entity named 'Resource'. Renaming it resolves the error.
How to reproduce
Create an API resource as below, and then run
npm init @api-platform/client http://localhost apiTypes -- --generator typescript
:Changing the shortname resolves the issue:
#[ApiResource( shortName: 'Res' )]
The text was updated successfully, but these errors were encountered: