Advertisement
artursn

Untitled

Nov 16th, 2020
650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 5.05 KB | None | 0 0
  1. {
  2.   "swagger": "2.0",
  3.   "info": {
  4.     "version": "2020-11-16T18:51:32Z",
  5.     "title": "MyPot"
  6.   },
  7.   "host": "qkl76gy8pe.execute-api.eu-west-1.amazonaws.com",
  8.   "basePath": "/api",
  9.   "schemes": [
  10.     "https"
  11.   ],
  12.   "paths": {
  13.     "/v1/user/login": {
  14.       "post": {
  15.         "consumes": [
  16.           "application/json"
  17.         ],
  18.         "produces": [
  19.           "application/json"
  20.         ],
  21.         "parameters": [
  22.           {
  23.             "in": "body",
  24.             "name": "LoginSchema",
  25.             "required": true,
  26.             "schema": {
  27.               "$ref": "#/definitions/LoginSchema"
  28.             }
  29.           }
  30.         ],
  31.         "responses": {
  32.           "200": {
  33.             "description": "200 response",
  34.             "schema": {
  35.               "$ref": "#/definitions/LoginResponseModel"
  36.             }
  37.           },
  38.           "401": {
  39.             "description": "401 response",
  40.             "schema": {
  41.               "$ref": "#/definitions/Error"
  42.             }
  43.           }
  44.         }
  45.       }
  46.     },
  47.     "/v1/user/profile": {
  48.       "get": {
  49.         "produces": [
  50.           "application/json"
  51.         ],
  52.         "parameters": [
  53.           {
  54.             "name": "USER",
  55.             "in": "header",
  56.             "required": true,
  57.             "type": "string"
  58.           }
  59.         ],
  60.         "responses": {
  61.           "200": {
  62.             "description": "200 response",
  63.             "schema": {
  64.               "$ref": "#/definitions/UserProfileMode"
  65.             }
  66.           }
  67.         },
  68.         "security": [
  69.           {
  70.             "apiLogin": []
  71.           }
  72.         ]
  73.       }
  74.     },
  75.     "/v1/user/register": {
  76.       "post": {
  77.         "consumes": [
  78.           "application/json"
  79.         ],
  80.         "produces": [
  81.           "application/json"
  82.         ],
  83.         "parameters": [
  84.           {
  85.             "in": "body",
  86.             "name": "RegisterModel",
  87.             "required": true,
  88.             "schema": {
  89.               "$ref": "#/definitions/RegisterModel"
  90.             }
  91.           }
  92.         ],
  93.         "responses": {
  94.           "200": {
  95.             "description": "200 response",
  96.             "schema": {
  97.               "$ref": "#/definitions/UserProfileMode"
  98.             }
  99.           }
  100.         }
  101.       }
  102.     },
  103.     "/v1/user/test": {
  104.       "get": {
  105.         "produces": [
  106.           "application/json"
  107.         ],
  108.         "responses": {
  109.           "200": {
  110.             "description": "200 response",
  111.             "schema": {
  112.               "$ref": "#/definitions/Empty"
  113.             }
  114.           }
  115.         },
  116.         "security": [
  117.           {
  118.             "apiLogin": []
  119.           }
  120.         ]
  121.       }
  122.     }
  123.   },
  124.   "securityDefinitions": {
  125.     "apiLogin": {
  126.       "type": "apiKey",
  127.       "name": "Authorization",
  128.       "in": "header",
  129.       "x-amazon-apigateway-authtype": "custom"
  130.     }
  131.   },
  132.   "definitions": {
  133.     "RegisterModel": {
  134.       "type": "object",
  135.       "properties": {
  136.         "username": {
  137.           "type": "string"
  138.         },
  139.         "password": {
  140.           "type": "string"
  141.         },
  142.         "email": {
  143.           "type": "string"
  144.         },
  145.         "dob": {
  146.           "type": "string"
  147.         },
  148.         "timezone": {
  149.           "type": "string"
  150.         },
  151.         "login_type": {
  152.           "type": "string"
  153.         }
  154.       },
  155.       "title": "Register schema"
  156.     },
  157.     "Empty": {
  158.       "type": "object",
  159.       "title": "Empty Schema"
  160.     },
  161.     "UserProfileMode": {
  162.       "type": "object",
  163.       "properties": {
  164.         "result": {
  165.           "type": "object",
  166.           "properties": {
  167.             "id": {
  168.               "type": "integer"
  169.             },
  170.             "username": {
  171.               "type": "string"
  172.             },
  173.             "email": {
  174.               "type": "string"
  175.             },
  176.             "mobile": {
  177.               "type": "string"
  178.             },
  179.             "login_type": {
  180.               "type": "string"
  181.             },
  182.             "dob": {
  183.               "type": "string"
  184.             },
  185.             "timezone": {
  186.               "type": "string"
  187.             }
  188.           }
  189.         },
  190.         "status": {
  191.           "type": "integer"
  192.         }
  193.       }
  194.     },
  195.     "Error": {
  196.       "type": "object",
  197.       "properties": {
  198.         "message": {
  199.           "type": "string"
  200.         }
  201.       },
  202.       "title": "Error Schema"
  203.     },
  204.     "LoginResponseModel": {
  205.       "type": "object",
  206.       "properties": {
  207.         "message": {
  208.           "type": "string"
  209.         },
  210.         "expire": {
  211.           "type": "string"
  212.         },
  213.         "token": {
  214.           "type": "string"
  215.         },
  216.         "username": {
  217.           "type": "string"
  218.         },
  219.         "id": {
  220.           "type": "string"
  221.         },
  222.         "role": {
  223.           "type": "string"
  224.         }
  225.       },
  226.       "title": "Login respnse"
  227.     },
  228.     "LoginSchema": {
  229.       "type": "object",
  230.       "properties": {
  231.         "username": {
  232.           "type": "string"
  233.         },
  234.         "password": {
  235.           "type": "string"
  236.         }
  237.       },
  238.       "title": "Login schema"
  239.     }
  240.   }
  241. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement