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

Mix Task for resource generation (similar to mix phx.gen) #834

Open
arosenb2 opened this issue Jan 17, 2024 · 1 comment
Open

Mix Task for resource generation (similar to mix phx.gen) #834

arosenb2 opened this issue Jan 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@arosenb2
Copy link

Describe the solution you'd like

[https://fly.io/phoenix-files/customizing-phoenix-generators/](Customizing Phoenix Generators) shows how to create custom templates to act as overrides to default generators from Phoenix mix tasks. It would be nice to generate a resource from the command line similar to how it can be done for Ecto schemas in traditional Phoenix projects.

Describe alternatives you've considered

Please close if this is already available. I haven't looked at all the CLI options provided, but I don't recall any resource generator tasks.

Express the feature either with a change to resource syntax, or with a change to the resource interface

 mix ash.gen.resource Foo id:uuid title:string

Additional context

Many other decisions go into resource modeling but this could help remove some of the "getting started" pain.

@arosenb2 arosenb2 added enhancement New feature or request needs review labels Jan 17, 2024
@zachdaniel
Copy link
Contributor

👋 There is currently a pull request for this which I've provided some feedback on but it's not been wrapped up yet. I'd like to have a better overall generator story with 3.0 as well, but it may have to come after 3.0 releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants