UNPKG

generator-express-no-stress

Version:

Awesome APIs with ExpressJS and OpenAPI/Swagger: Features automatic request validation, interactive api doc, and more.

76 lines (70 loc) 1.52 kB
swagger: "2.0" info: version: <%= version %> title: <%= title %> description: <%= description %> basePath: <%= apiRoot %> tags: - name: Examples description: Simple example endpoints - name: Specification description: The swagger API specification consumes: - application/json produces: - application/json definitions: ExampleBody: type: object title: example required: - name properties: name: type: string example: no_stress paths: /examples: get: tags: - Examples description: Fetch all examples responses: 200: description: Returns all examples post: tags: - Examples description: Create a new example parameters: - name: example in: body description: an example required: true schema: $ref: "#/definitions/ExampleBody" responses: 200: description: Returns all examples /examples/{id}: get: tags: - Examples parameters: - name: id in: path required: true description: The id of the example to retrieve type: integer responses: 200: description: Return the example with the specified id 404: description: Example not found /spec: get: tags: - Specification responses: 200: description: Return the API specification