Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate entity with api-resource flag #377

Open
gregurco opened this issue Apr 3, 2019 · 2 comments
Open

Regenerate entity with api-resource flag #377

gregurco opened this issue Apr 3, 2019 · 2 comments

Comments

@gregurco
Copy link

gregurco commented Apr 3, 2019

Hello.
Thank you for integration of API Platform in make:entity command. Probably I have some specific case, but I would like to know how to treat or to fix it.

I'm doing reverse engineering with DB schema. I crate tables through MySQL Workbench. After that I run next command to create entity with properties for tables in DB:

bin/console doctrine:mapping:import "App\Entity" annotation --path=src/Entity

And the next step is command:

bin/console make:entity --regenerate App

This command generates getters/setter in entity class, but if I try to add --api-resource flag, it is simply ignored and I have to add annotation @ApiResource manually.

Do you have any ideas how to treat this case? I'm also able to contribute it, if any work is required 🙂

Thanks!

@cezar77
Copy link

cezar77 commented Feb 9, 2021

Any updates on this?

We have the very same use case, and few dozens of tables. It would be really nice if the option --api-resource would work with already existing entities. I think that's a common scenario.

@wmfelipe
Copy link

I have the same issue here.

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

No branches or pull requests

3 participants