Created
August 17, 2016 14:30
-
-
Save abonec/baea5cfac177ba53726af24a62a82793 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", | |
"info": { | |
"version": "1.0.0", | |
"title": "Topcontrol", | |
"description": "Topcontrol" | |
}, | |
"tags": [ | |
{ | |
"name": "pet", | |
"description": "Pets operations", | |
"externalDocs": { | |
"description": "Find more info here", | |
"url": "https://swagger.io" | |
} | |
} | |
], | |
"host": "localhost:3004", | |
"basePath": "/", | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"securityDefinitions": { | |
"access-token": { | |
"type": "apiKey", | |
"name": "access-token", | |
"in": "header" | |
}, | |
"client": { | |
"type": "apiKey", | |
"name": "client", | |
"in": "header" | |
}, | |
"uid": { | |
"type": "apiKey", | |
"name": "uid", | |
"in": "header" | |
} | |
}, | |
"paths": { | |
"/auth/sign_in": { | |
"post": { | |
"description": "Perform authorization by email and password", | |
"produces": [ | |
"application/json" | |
], | |
"tags": [ | |
"authorization" | |
], | |
"parameters": [ | |
{ | |
"name": "body", | |
"description": "credential json", | |
"required": true, | |
"type": "string", | |
"in": "body", | |
"schema": { | |
"required": [ | |
"email", | |
"pasword" | |
], | |
"properties": { | |
"email": { | |
"type": "string", | |
"default": "[email protected]" | |
}, | |
"password": { | |
"type": "string", | |
"default": "supersecret" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "successful auth", | |
"schema": { | |
"$ref": "#/definitions/User" | |
}, | |
"headers": { | |
"access-token": { | |
"description": "access token for further authenticate", | |
"type": "string" | |
}, | |
"client": { | |
"description": "client token for further authenticate ", | |
"type": "string" | |
}, | |
"token-type": { | |
"description": "token type used for authentication (Bearer as default)", | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/api/mobile/v1/tasks": { | |
"post": { | |
"description": "get all tasks available for user", | |
"produces": [ | |
"application/json" | |
], | |
"tags": [ | |
"tasks" | |
], | |
"parameters": [ | |
{ | |
"name": "body", | |
"description": "filter's json", | |
"required": true, | |
"type": "string", | |
"in": "body", | |
"schema": { | |
"required": [ | |
"lat", | |
"lon" | |
], | |
"properties": { | |
"lat": { | |
"type": "string", | |
"default": "55.755826" | |
}, | |
"lon": { | |
"type": "string", | |
"default": "37.617300" | |
}, | |
"radius": { | |
"type": "string", | |
"default": "5000" | |
} | |
} | |
} | |
} | |
], | |
"security": [ | |
{ | |
"access-token": [], | |
"client": [], | |
"uid": [] | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "list of all tasks grouped by location", | |
"schema": {} | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"User": { | |
"required": [ | |
"id", | |
"name" | |
], | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"email": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment