balderdashy / balderdashy/sails
Blueprints rest disabled in generated app contrary to docs
- Dominant language
- JavaScript
- Stars
- 22.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The documentation for blueprint routes states that blueprint rest is enabled by default.
Projects created with sails generate include a blueprints.js with rest set to false.
This leads to a bit of head scratching for the beginner when routes don't work as expected.
At https://sailsjs.com/documentation/concepts/blueprints/blueprint-routes:
"In rest blueprint routes are enabled by default, and are suitable for use in a production scenario, as long as they are protected by policies to avoid unauthorized access."
By changing rest: false to rest: true in config/blueprint.js, the app's behavior matches the documentation.
It's not clear which is the preferred state, but either the generator or the documentation needs to change.
Contributor guide
Research direction
Start with config/blueprint.js in an app created by sails generate and compare its rest setting with the blueprint-routes documentation. Check which behavior is intended, then update either the generator or the documentation so they agree. Verify that a newly generated app and its blueprint routes match the documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend, documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100