-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.json
1 lines (1 loc) · 8.38 KB
/
doc.json
1
{"swagger": "2.0", "info": {"title": "Bot API", "description": "Документация для Money Exchange Bot", "contact": {"email": "[email protected]"}, "license": {"name": "BSD License"}, "version": "v1"}, "host": "127.0.0.1:8000", "schemes": ["http"], "basePath": "/api", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Basic": {"type": "basic"}}, "security": [{"Basic": []}], "paths": {"/v1/request-admin/": {"get": {"operationId": "v1_request-admin_list", "description": "ViewSet for Request with admin access", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/Request"}}}}, "tags": ["v1"]}, "parameters": []}, "/v1/request-admin/{id}/": {"get": {"operationId": "v1_request-admin_read", "description": "ViewSet for Request with admin access", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Request"}}}, "tags": ["v1"]}, "put": {"operationId": "v1_request-admin_update", "description": "ViewSet for Request with admin access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Request"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Request"}}}, "tags": ["v1"]}, "patch": {"operationId": "v1_request-admin_partial_update", "description": "ViewSet for Request with admin access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Request"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Request"}}}, "tags": ["v1"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this request.", "required": true, "type": "integer"}]}, "/v1/user-admin/": {"get": {"operationId": "v1_user-admin_list", "description": "ViewSet for User with admin access", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/UserAdmin"}}}}, "tags": ["v1"]}, "parameters": []}, "/v1/user-admin/{id}/": {"get": {"operationId": "v1_user-admin_read", "description": "ViewSet for User with admin access", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/UserAdmin"}}}, "tags": ["v1"]}, "put": {"operationId": "v1_user-admin_update", "description": "ViewSet for User with admin access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/UserAdmin"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/UserAdmin"}}}, "tags": ["v1"]}, "patch": {"operationId": "v1_user-admin_partial_update", "description": "ViewSet for User with admin access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/UserAdmin"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/UserAdmin"}}}, "tags": ["v1"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique value identifying this user.", "required": true, "type": "integer"}]}, "/v1/user/": {"get": {"operationId": "v1_user_list", "description": "ViewSet for User with user access", "parameters": [{"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/User"}}}}, "tags": ["v1"]}, "post": {"operationId": "v1_user_create", "description": "ViewSet for User with user access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/User"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/User"}}}, "tags": ["v1"]}, "parameters": []}, "/v1/user/{id}/": {"get": {"operationId": "v1_user_read", "description": "ViewSet for User with user access", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/User"}}}, "tags": ["v1"]}, "put": {"operationId": "v1_user_update", "description": "ViewSet for User with user access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/User"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/User"}}}, "tags": ["v1"]}, "patch": {"operationId": "v1_user_partial_update", "description": "ViewSet for User with user access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/User"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/User"}}}, "tags": ["v1"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique value identifying this user.", "required": true, "type": "integer"}]}, "/v1/{owner_id}/request-user/": {"get": {"operationId": "v1_request-user_list", "description": "ViewSet for Request with user access", "parameters": [{"name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string"}, {"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Request"}}}}}}, "tags": ["v1"]}, "post": {"operationId": "v1_request-user_create", "description": "ViewSet for Request with user access", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Request"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Request"}}}, "tags": ["v1"]}, "parameters": [{"name": "owner_id", "in": "path", "required": true, "type": "string"}]}}, "definitions": {"Request": {"required": ["city", "sold_currency", "sold_currency_amount", "purchased_currency_amount", "currency_rate", "commission_fee"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "creation_date": {"title": "Creation date", "type": "string", "format": "date-time", "readOnly": true}, "owner": {"title": "Owner", "type": "integer", "x-nullable": true}, "status": {"title": "Status", "type": "string", "enum": ["Active", "Completed", "Canceled"]}, "city": {"title": "Populated areas", "type": "string", "maxLength": 20, "minLength": 1}, "sold_currency": {"title": "Sale currency", "type": "string", "maxLength": 20, "minLength": 1}, "sold_currency_amount": {"title": "Amount of currency sold", "type": "string", "format": "decimal"}, "purchased_currency_amount": {"title": "Amount of purchased currency", "type": "string", "format": "decimal"}, "currency_rate": {"title": "Exchange rate", "type": "string", "format": "decimal"}, "commission_fee": {"title": "Сommission", "type": "string", "format": "decimal"}}}, "UserAdmin": {"type": "object", "properties": {"id": {"title": "Id", "type": "integer", "readOnly": true}, "username": {"title": "Username", "type": "string", "maxLength": 50, "minLength": 1, "x-nullable": true}, "role": {"title": "Role", "type": "string", "enum": ["Admin", "User", "Developer", "Banned"]}, "referrer": {"title": "Referrer", "type": "integer", "x-nullable": true}, "paid_fee": {"title": "Paid fee", "type": "string", "format": "decimal"}, "fee": {"title": "Fee", "type": "string", "format": "decimal"}}}, "User": {"type": "object", "properties": {"username": {"title": "Username", "type": "string", "maxLength": 50, "minLength": 1, "x-nullable": true}, "fee": {"title": "Fee", "type": "string", "format": "decimal"}, "paid_fee": {"title": "Paid fee", "type": "string", "format": "decimal"}, "role": {"title": "Role", "type": "string", "enum": ["Admin", "User", "Developer", "Banned"]}}}}}