Skip to content

Instantly share code, notes, and snippets.

@tarlepp
Created January 29, 2016 17:08
Show Gist options
  • Save tarlepp/40425f2cb36f9b3d6ab0 to your computer and use it in GitHub Desktop.
Save tarlepp/40425f2cb36f9b3d6ab0 to your computer and use it in GitHub Desktop.
{
"apiVersion": null,
"swaggerVersion": "1.2",
"apis": [
{
"path": "/auth",
"description": "User authentication API endpoints."
}
]
}
{
"basePath": "http://localhost:8000",
"swaggerVersion": "1.2",
"resourcePath": "/auth",
"apis": [
{
"path": "/login",
"description": "User login action.",
"operations": [
{
"method": "POST",
"nickname": "login",
"parameters": [
{
"paramType": "body",
"name": "credentials",
"type": "Login",
"required": true,
"allowMultiple": false,
"description": "JSON object that contains necessary credential data."
}
],
"responseMessages": [
{
"code": 400,
"message": {
"message": "Invalid data",
"status": 400,
"code": 0
}
},
{
"code": 401,
"message": {
"message": "Unauthorized",
"status": 400,
"code": 0
}
},
{
"code": 200,
"message": {
"token": "JWTToken"
}
}
]
}
]
}
],
"models": {
"Login": {
"id": "Login",
"description": "JSON object for login",
"properties": {
"identifier": {
"description": "User identifier; email or username",
"type": "string"
},
"password": {
"description": "User password",
"type": "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment