Last active
February 11, 2020 08:32
-
-
Save jaychsu/f1b65d40a106335e6f4fa62a87300b71 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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "Entry Task", | |
"version": "2.4.12", | |
"title": "Swagger Generator", | |
"termsOfService": "http://swagger.io/terms/", | |
"contact": { | |
"name": "Jaych Su" | |
}, | |
"license": { | |
"name": "Apache 2.0", | |
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | |
} | |
}, | |
"basePath": "/", | |
"tags": [ | |
{ | |
"name": "auth" | |
} | |
], | |
"paths": { | |
"/api/auth/signup": { | |
"post": { | |
"tags": [ | |
"auth" | |
], | |
"summary": "To sign up the new user", | |
"description": "To sign up the new user", | |
"operationId": "signup", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "username", | |
"in": "params", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "password", | |
"in": "params", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "first_name", | |
"in": "params", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "last_name", | |
"in": "params", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "avatar_url", | |
"in": "params", | |
"required": false, | |
"type": "string" | |
}, | |
{ | |
"name": "email", | |
"in": "params", | |
"required": false, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "successful operation", | |
"schema": { | |
"$ref": "#/definitions/ResponseCode" | |
} | |
} | |
} | |
} | |
}, | |
"/api/auth/login": { | |
"post": { | |
"tags": [ | |
"auth" | |
], | |
"summary": "To log in the user", | |
"description": "To log in the user", | |
"operationId": "login", | |
"parameters": [ | |
{ | |
"name": "username", | |
"in": "params", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "params", | |
"name": "password", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "successful operation", | |
"schema": { | |
"$ref": "#/definitions/ResponseCode" | |
} | |
} | |
}, | |
"produces": [ | |
"application/json" | |
] | |
} | |
}, | |
"/api/auth/logout": { | |
"get": { | |
"tags": [ | |
"auth" | |
], | |
"summary": "To log out user", | |
"description": "To log out user", | |
"operationId": "logout", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [], | |
"responses": { | |
"200": { | |
"description": "successful operation", | |
"schema": { | |
"$ref": "#/definitions/ResponseCode" | |
} | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"auth" | |
], | |
"summary": "To log out user", | |
"description": "To log out user", | |
"operationId": "logout", | |
"parameters": [], | |
"responses": { | |
"200": { | |
"description": "successful operation", | |
"schema": { | |
"$ref": "#/definitions/ResponseCode" | |
} | |
} | |
}, | |
"produces": [ | |
"application/json" | |
] | |
} | |
} | |
}, | |
"definitions": { | |
"ResponseCode": { | |
"type": "object", | |
"properties": { | |
"status": { | |
"type": "number", | |
"example": "200", | |
"description": "HTTP Status" | |
}, | |
"results": { | |
"$ref": "#/definitions/ResponseResult" | |
} | |
} | |
}, | |
"ResponseResult": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string", | |
"example": "You have successfully logged out.", | |
"description": "result" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment