You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 10, 2024. It is now read-only.
Replace the manual router usage with a controller generator. Unsure whether names or paths should be used (maybe use annotations with 1.0 standardised from mulesoft-labs/raml-generator#14). Using an controller interface would allow wildly improved autocompletion and type checking in typed languages like TypeScript. It can also allow late-binding of the middleware methods, and allow errors to be thrown when the users controller does not match implementation at startup.
Simple example API:
var controller = require('osprey').controller(raml)
controller({
'/users/{userId}': function (req, res) {
},
// Or using named annotations:
getUser: function (req, res) {
}
})
The text was updated successfully, but these errors were encountered:
Replace the manual router usage with a controller generator. Unsure whether names or paths should be used (maybe use annotations with 1.0 standardised from mulesoft-labs/raml-generator#14). Using an controller interface would allow wildly improved autocompletion and type checking in typed languages like TypeScript. It can also allow late-binding of the middleware methods, and allow errors to be thrown when the users controller does not match implementation at startup.
Simple example API:
The text was updated successfully, but these errors were encountered: