Last active
December 19, 2017 06:04
-
-
Save rajiff/9f384972505a01be758f44a2583b4dd5 to your computer and use it in GitHub Desktop.
This file contains 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
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: SwaggerNodeJSDemo | |
# during dev, should point to your local machine | |
host: localhost:3000 | |
# basePath prefixes all resource paths | |
basePath: /api/v1 | |
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: | |
/: | |
get: | |
description: root path | |
responses: | |
"404": | |
description: Success | |
schema: | |
$ref: "#/definitions/ErrorResponse" | |
# complex objects have schema definitions | |
definitions: | |
ErrorResponse: | |
required: | |
- message | |
properties: | |
message: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment