nestia
nestia copied to clipboard
Support different nesting strategy
It would be nice to have an option to use the name of the controller (and/or, possibly, modules, if nested as well) to generate the SDK nested output, rather than using the Paths.
Example
- App
- User.module
- UserAccount.controller (/users/accounts)
- list (GET /)
- create (POST /)
- update (PUT /:id)
- remove (DELETE /:id)
- UserProfile.controller (/users/profiles)
- getMine (GET /mine)
- updateMine (PUT /mine)
- search (POST /public)
- getById (GET /public/:id)
- follow (POST /public/:id/follow)
- unfollow (POST /public/:id/unfollow)
- UserAccount.controller (/users/accounts)
- Post.controller (/posts)
- getMine (GET /mine)
- findByTag (POST /tags)
- create (POST /)
- getById (GET /:id)
- User.module
Expected output
- SDK
- user
- account (defined by the controller name, not the path)
- list
- create
- remove
- update
- profile
- getMine
- updateMine
- search
- follow
- unfollow
- account (defined by the controller name, not the path)
- post
- create
- getMine
- findByTag
- getById
- user