Advertisement
artursn

Untitled

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