Created
January 29, 2016 17:08
-
-
Save tarlepp/40425f2cb36f9b3d6ab0 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"apiVersion": null, | |
"swaggerVersion": "1.2", | |
"apis": [ | |
{ | |
"path": "/auth", | |
"description": "User authentication API endpoints." | |
} | |
] | |
} |
This file contains 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
{ | |
"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