-
-
Save myndzi/6d0f43dcd96ef89565d47429977eaf19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resource = app.swag.createResource('Foo'); | |
resource.get('/foo', { | |
name: 'Foos', | |
params: { | |
filter: 'string', | |
itemsPerPage: 'integer' | |
}, | |
returns: 'SomeModel' //models are declared elsewhere/separately | |
}, function (req, res) { | |
// req.params is already validated; return value is also validated or else an error response is returned | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment