Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "swagger": "2.0",
- "info": {
- "version": "2020-11-16T18:51:32Z",
- "title": "MyPot"
- },
- "host": "qkl76gy8pe.execute-api.eu-west-1.amazonaws.com",
- "basePath": "/api",
- "schemes": [
- "https"
- ],
- "paths": {
- "/v1/user/login": {
- "post": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "in": "body",
- "name": "LoginSchema",
- "required": true,
- "schema": {
- "$ref": "#/definitions/LoginSchema"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "200 response",
- "schema": {
- "$ref": "#/definitions/LoginResponseModel"
- }
- },
- "401": {
- "description": "401 response",
- "schema": {
- "$ref": "#/definitions/Error"
- }
- }
- }
- }
- },
- "/v1/user/profile": {
- "get": {
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "USER",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 response",
- "schema": {
- "$ref": "#/definitions/UserProfileMode"
- }
- }
- },
- "security": [
- {
- "apiLogin": []
- }
- ]
- }
- },
- "/v1/user/register": {
- "post": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "in": "body",
- "name": "RegisterModel",
- "required": true,
- "schema": {
- "$ref": "#/definitions/RegisterModel"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "200 response",
- "schema": {
- "$ref": "#/definitions/UserProfileMode"
- }
- }
- }
- }
- },
- "/v1/user/test": {
- "get": {
- "produces": [
- "application/json"
- ],
- "responses": {
- "200": {
- "description": "200 response",
- "schema": {
- "$ref": "#/definitions/Empty"
- }
- }
- },
- "security": [
- {
- "apiLogin": []
- }
- ]
- }
- }
- },
- "securityDefinitions": {
- "apiLogin": {
- "type": "apiKey",
- "name": "Authorization",
- "in": "header",
- "x-amazon-apigateway-authtype": "custom"
- }
- },
- "definitions": {
- "RegisterModel": {
- "type": "object",
- "properties": {
- "username": {
- "type": "string"
- },
- "password": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "dob": {
- "type": "string"
- },
- "timezone": {
- "type": "string"
- },
- "login_type": {
- "type": "string"
- }
- },
- "title": "Register schema"
- },
- "Empty": {
- "type": "object",
- "title": "Empty Schema"
- },
- "UserProfileMode": {
- "type": "object",
- "properties": {
- "result": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "username": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "mobile": {
- "type": "string"
- },
- "login_type": {
- "type": "string"
- },
- "dob": {
- "type": "string"
- },
- "timezone": {
- "type": "string"
- }
- }
- },
- "status": {
- "type": "integer"
- }
- }
- },
- "Error": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "title": "Error Schema"
- },
- "LoginResponseModel": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "expire": {
- "type": "string"
- },
- "token": {
- "type": "string"
- },
- "username": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "role": {
- "type": "string"
- }
- },
- "title": "Login respnse"
- },
- "LoginSchema": {
- "type": "object",
- "properties": {
- "username": {
- "type": "string"
- },
- "password": {
- "type": "string"
- }
- },
- "title": "Login schema"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement