swagger: "2.0" info: version: "1.0.0" title: QRCode Service # during dev, should point to your local machine host: localhost:3000 # basePath prefixes all resource paths basePath: / # schemes: # tip: remove http to make production-grade - http - https # format of bodies a client can send (Content-Type) consumes: - application/json # format of the responses to the client (Accepts) produces: - application/json paths: /qrcode: # binds app logic to a route x-swagger-router-controller: qrcode post: description: Returns QRCode to the caller # used as the method name of the controller operationId: qrcode consumes: - application/json parameters: - in: body name: body description: Message to convert to a QR Code schema: type: object required: - message properties: message: type: string responses: "200": description: Success schema: # a pointer to a definition $ref: "#/definitions/QRCodeResponse" /schema: x-swagger-pipe: swagger_raw # complex objects have schema definitions definitions: QRCodeResponse: required: - qrcode properties: qrcode: type: string