Skip to content

Instantly share code, notes, and snippets.

@vdel26
Last active December 2, 2015 10:43
Show Gist options
  • Save vdel26/7e9f796cf98ff715471c to your computer and use it in GitHub Desktop.
Save vdel26/7e9f796cf98ff715471c to your computer and use it in GitHub Desktop.
Devops Against Humanity Swagger definition
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Devops Against Humanity API",
"description": "Devops Against Humanity API"
},
"host": "devops-api-gateway.herokuapp.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/question": {
"get": {
"description": "Get a random question",
"operationId": "question",
"produces": [
"application/json"
],
"parameters": [
{
"name": "user_key",
"in": "query",
"description": "Your API access key",
"required": true,
"x-data-threescale-name": "user_keys",
"type": "string"
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/ResponseModel"
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/ErrorModel"
}
}
}
}
},
"/answer": {
"get": {
"description": "Get a random answer",
"operationId": "answer",
"produces": [
"application/json"
],
"parameters": [
{
"name": "user_key",
"in": "query",
"description": "Your API access key",
"required": true,
"x-data-threescale-name": "user_keys",
"type": "string"
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/ResponseModel"
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/ErrorModel"
}
}
}
}
},
"/pick": {
"get": {
"description": "Pick a question and and answer randomly",
"operationId": "pick",
"produces": [
"application/json"
],
"parameters": [
{
"name": "user_key",
"in": "query",
"description": "Your API access key",
"required": true,
"x-data-threescale-name": "user_keys",
"type": "string"
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/ResponseModel"
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/ErrorModel"
}
}
}
}
}
},
"definitions": {
"ResponseModel": {
"type": "object",
"required": [
"question",
"answer"
],
"properties": {
"question": {
"type": "string"
},
"answer": {
"type": "string"
}
}
},
"ErrorModel": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment