Skip to content

Instantly share code, notes, and snippets.

@ponelat
Created June 26, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponelat/117a0b455d370e9982f2 to your computer and use it in GitHub Desktop.
Save ponelat/117a0b455d370e9982f2 to your computer and use it in GitHub Desktop.
Smoke API for communication, during Ron's vay-cay
{
"swagger": "2.0",
"info": {
"title": "Smoke Signals v1",
"description": "Close to the metal communication with a Ron from middle-east",
"version": "1.0.0"
},
"host": "large-mountain-in.africa",
"schemes": [
"http"
],
"basePath": "/smoke",
"produces": [
"application/signal+smoke"
],
"consumes": [
"application/json"
],
"paths": {
"/say/help-ron--we-need-you": {
"post": {
"summary": "3 long",
"description": "Issues forth three long plumes of smoke",
"responses": {
"200": {
"description": "Smoke sent",
"schema": {
"$ref": "#/definitions/SmokeStatus"
}
}
}
}
},
"/say/ron--the-wheels-are-coming-off": {
"post": {
"summary": "2 long 1 short",
"description": "Issues forth two long plumes of smoke, plus one short plume.",
"responses": {
"200": {
"description": "Smoke sent",
"schema": {
"$ref": "#/definitions/SmokeStatus"
}
}
}
}
},
"/wood": {
"put": {
"summary": "update wood supplies",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/Wood"
}
}
],
"responses": {
"200": {
"description": "Wood added successfully",
"schema": {
"$ref": "#/definitions/SmokeStatus"
}
},
"400": {
"description": "Wood is too wet",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"Wood": {
"type": "object",
"properties": {
"quantity": {
"type": "number"
},
"moisterContent": {
"type": "number"
}
}
},
"SmokeStatus": {
"type": "object",
"properties": {
"woodRemaining": {
"type": "number"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment