swagger

node v0.12.18
version: 1.0.0
endpointsharetweet
var app = require('notebook')('tonic/express-endpoint/1.0.0')(module.exports) app.use(require('swaggerize-express')({ api: require('yamljs').parse` # a demonstration of an API spec in YAML swagger: '2.0' info: title: Test API version: "1.0.0" paths: /products: get: description: | The products in the proper display order. parameters: - name: id in: path required: true type: number tags: - Products responses: 200: description: An array of product schema: type: array items: $ref: '#/definitions/Product' definitions: Product: properties: name: type: string `, docspath: '/api-docs', handlers: { products: { '$get': (req, res) => [ { name: 'Nexus 5' } { name: 'Nexus 9' } ] } } }))
Loading…

no comments

    sign in to comment