adonisjs / core

AdonisJS is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more.

Home Page:https://adonisjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make:controller --api & --resource descriptions are swapped

Blackwidow-sudo opened this issue · comments

Package version

v6 & v5

Describe the bug

The make:controller argument descriptions for --api & --resource are swapped.
The --api argument says Generate resourceful controller with the "edit" and the "create" methods but that should be the description of --resource since thats the one that has "edit" and "create" in it.

I already noticed it in v5 but thought maybe with v6 it'll be fixed.

Reproduction repo

any v5 or v6 install

The with has to be without. Otherwise the descriptions are correct. I will have to apply a fix on the PR

The with has to be without. Otherwise the descriptions are correct. I will have to apply a fix on the PR

You mean instead of this:

  -r, --resource   Generate resourceful controller with the "edit" and the "create" methods
  -a, --api        Generate controller with methods to perform CRUD actions on a resource

this?

  -r, --resource   Generate controller with methods to perform CRUD actions on a resource
  -a, --api        Generate resourceful controller without the "edit" and the "create" methods

They're both correct i would say.