Open Fr33maan opened 8 years ago
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 generators/app/templates/package.json
and check that tests are passing and it generates project locally with Sails 0.12. Any questions to can ask there - #225 :)
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/coaches
orv1/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 ?