Created
March 29, 2016 00:55
-
-
Save marbemac/dc5c69ed312e46add88b to your computer and use it in GitHub Desktop.
This file contains hidden or 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", | |
"schemes": [ | |
"http" | |
], | |
"basePath": "/api", | |
"host": "localhost:3000", | |
"info": { | |
"version": "", | |
"title": "Task Lists", | |
"description": "" | |
}, | |
"paths": { | |
"/task_lists/{param1}/tasks": { | |
"parameters": [ | |
{ | |
"name": "param1", | |
"in": "path", | |
"required": true, | |
"type": "integer" | |
} | |
], | |
"post": { | |
"summary": "", | |
"description": "", | |
"operationId": "POST_task_lists-param1-tasks", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"schema": { | |
"$ref": "#/definitions/animal", | |
"example": { | |
"task": { | |
"description": "bar", | |
"priority": 1 | |
} | |
} | |
} | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Content-Type", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
} | |
], | |
"responses": { | |
"201": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"priority": { | |
"type": "integer" | |
}, | |
"due_date": { | |
"type": "null" | |
}, | |
"completed": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"examples": { | |
"application/json": { | |
"id": 148, | |
"description": "bar", | |
"priority": 1, | |
"due_date": null, | |
"completed": false | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"$ref": "#/responses/standardErrors401" | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
} | |
}, | |
"/task_lists": { | |
"parameters": [], | |
"get": { | |
"summary": "", | |
"description": "", | |
"operationId": "GET_task_lists", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "foo", | |
"in": "query", | |
"type": "string" | |
}, | |
{ | |
"name": "bar", | |
"in": "query", | |
"type": "string" | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"$ref": "#/parameters/pagedlimit" | |
}, | |
{ | |
"$ref": "#/parameters/pagedskip" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"tasks": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": {} | |
} | |
} | |
} | |
} | |
}, | |
"examples": { | |
"application/json": [ | |
{ | |
"id": 231, | |
"name": "foo3", | |
"tasks": [] | |
} | |
] | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"$ref": "#/responses/standardErrors401" | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
}, | |
"post": { | |
"summary": "", | |
"description": "", | |
"operationId": "POST_task_lists", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "limit", | |
"in": "query", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"list": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"example": { | |
"list": { | |
"name": "new list" | |
} | |
} | |
} | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Content-Type", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"$ref": "#/parameters/poopColor" | |
}, | |
{ | |
"$ref": "#/parameters/pagedlimit" | |
}, | |
{ | |
"$ref": "#/parameters/pagedskip" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"tasks": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": {} | |
} | |
} | |
} | |
}, | |
"examples": { | |
"application/json": { | |
"id": 239, | |
"name": "new list", | |
"tasks": [] | |
} | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"foo": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
} | |
}, | |
"/task_lists/{param1}": { | |
"parameters": [ | |
{ | |
"name": "param1", | |
"in": "path", | |
"required": true, | |
"type": "integer" | |
} | |
], | |
"patch": { | |
"summary": "", | |
"description": "", | |
"operationId": "PATCH_task_lists-param1", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"list": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"example": { | |
"list": { | |
"name": "foo3" | |
} | |
} | |
} | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Content-Type", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"$ref": "#/responses/standardErrors401" | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
}, | |
"get": { | |
"summary": "", | |
"description": "", | |
"operationId": "GET_task_lists-param1", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"tasks": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": {} | |
} | |
} | |
} | |
}, | |
"examples": { | |
"application/json": { | |
"id": 239, | |
"name": "new list", | |
"tasks": [] | |
} | |
} | |
} | |
} | |
}, | |
"delete": { | |
"summary": "", | |
"description": "", | |
"operationId": "DELETE_task_lists-param1", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"$ref": "#/responses/standardErrors401" | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
} | |
}, | |
"/task_lists/{param1}/tasks/{param2}": { | |
"parameters": [ | |
{ | |
"name": "param1", | |
"in": "path", | |
"required": true, | |
"type": "integer" | |
}, | |
{ | |
"name": "param2", | |
"in": "path", | |
"required": true, | |
"type": "integer" | |
} | |
], | |
"patch": { | |
"summary": "", | |
"description": "", | |
"operationId": "PATCH_task_lists-param1-tasks-param2", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [], | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"task": { | |
"type": "object", | |
"properties": { | |
"completed": { | |
"type": "boolean" | |
}, | |
"due_date": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"example": { | |
"task": { | |
"completed": false, | |
"due_date": "2016-03-15" | |
} | |
} | |
} | |
}, | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "Content-Type", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"$ref": "#/responses/standardErrors401" | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
}, | |
"delete": { | |
"summary": "", | |
"description": "", | |
"operationId": "DELETE_task_lists-param1-tasks-param2", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [], | |
"parameters": [ | |
{ | |
"name": "Accept", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
}, | |
{ | |
"name": "X-Csrf-Token", | |
"in": "header", | |
"description": "", | |
"type": "string" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"400": { | |
"$ref": "#/responses/standardErrors400" | |
}, | |
"401": { | |
"$ref": "#/responses/standardErrors401" | |
}, | |
"403": { | |
"$ref": "#/responses/standardErrors403" | |
}, | |
"404": { | |
"$ref": "#/responses/standardErrors404" | |
}, | |
"500": { | |
"$ref": "#/responses/standardErrors500" | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"animal": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"parameters": { | |
"pagedlimit": { | |
"name": "limit", | |
"in": "query", | |
"type": "string" | |
}, | |
"pagedskip": { | |
"name": "skip", | |
"in": "query", | |
"type": "string" | |
}, | |
"poopColor": { | |
"name": "Color", | |
"in": "header", | |
"description": "", | |
"required": true, | |
"type": "string", | |
"enum": [ | |
"brown", | |
"red", | |
"green" | |
] | |
} | |
}, | |
"responses": { | |
"standardErrors400": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"error": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"standardErrors401": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"standardErrors403": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"standardErrors404": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"standardErrors500": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": {} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment