-
Notifications
You must be signed in to change notification settings - Fork 52
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
Model generator should be called API generator and docs improvement #238
Comments
Ok it's not a bug at all, you must avoid to create api with Controller generator and then Model generator. Just use Model generator. Could you write it in capital letters in the doc ? I've seen nowhere that generate controller then model will break blueprints. Why ? Because when you generate a controller, the generator write an index action inside and this breaks blueprint routes. And in fact, the Model generator corresponds to the api generator in sails because it generates model AND controller. This should be renamed as it is really confusing. |
@Prisonier what you think about contributing in the generator ? I have no time for fixing all the issues that we have already, since I'm working on another open-source project. I can be your mentor and help with PR review. |
@ghaiklor I'm really interested |
@Prisonier you can pick up any issue then and make PR. Issues are really easy and I always can help you with reviewing and discussing the PRs. Read the contributing guide first. And don't forgot to install commitizen. I'm using semantic-release, so your commits should be formatted by standard, commitizen helps you with that. First issue is really issue for first contributing - #225. You need to upgrade sails and other dependencies in |
I've added precision in the wiki about what model generator does. I was pretty sure this would create a PR but instead it directly modified the wiki... |
Hi,
I experienced something very strange with model names like coach and person.
Their pluralized forms are
coaches
andpeople
(try it there) so I tried to create ressources by posting to ``v1/coachesor
v1/people` which give me the following response :Off course, nothing is created, this is not the standard response for ressource creation.
I tried to set
pluralize : false
and if I ping non pluralized route I get the same response and nothing gets created.How can I use thoses model names ?
Note that blueprint routes works perfectly in native sails so I guess it comes from the PluralizeHook or other code from this module ?
The text was updated successfully, but these errors were encountered: