toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

Entity Generation

Open matthewjamesr opened this issue 3 years ago • 3 comments

Describe the solution you'd like I would like to propose the beginning implementation of commands to easily generate templates for new items such as:

  • Controllers
  • Migrations
  • Models

This implementation could be similar to options in other language frameworks such as Laravel's php artisan make:controller PhotoController, etc.

Community input Please respond to this issue with other commands, features, etc. you think this update could or should include. I will keep the main issue updated over time.

matthewjamesr avatar Jun 30 '22 13:06 matthewjamesr

+1 to this - it would be good to offer this behaviour. The toolbox probably makes sense. Another option would be to do it as a SwiftPM plugin but that makes it more complicated to adopt, rather than vapor new make migration UserMigration etc

0xTim avatar Jun 30 '22 14:06 0xTim

Huge +1 to this. It could also be cool to try and do something like vapor make migration UserMigration --from=Models/User and have it try to auto-synthesize the implementation from User.swift. That might be out of scope, though

jdmcd avatar Jun 30 '22 18:06 jdmcd

@jdmcd Thanks for the feedback! I agree with your input and want semantic generation to be a feature.

matthewjamesr avatar Jul 01 '22 20:07 matthewjamesr