1241 lines
29 KiB
JSON
1241 lines
29 KiB
JSON
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "FastAPI",
|
|
"version": "0.1.0"
|
|
},
|
|
"paths": {
|
|
"/auth/login": {
|
|
"post": {
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Login",
|
|
"operationId": "login_auth_login_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthLoginRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthLoginResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/deal/create": {
|
|
"post": {
|
|
"tags": [
|
|
"deal"
|
|
],
|
|
"summary": "Create",
|
|
"operationId": "create_deal_create_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/deal/quickCreate": {
|
|
"post": {
|
|
"tags": [
|
|
"deal"
|
|
],
|
|
"summary": "Quick Create",
|
|
"operationId": "quick_create_deal_quickCreate_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealQuickCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealQuickCreateResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/deal/changeStatus": {
|
|
"post": {
|
|
"tags": [
|
|
"deal"
|
|
],
|
|
"summary": "Change Status",
|
|
"operationId": "change_status_deal_changeStatus_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealChangeStatusRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealChangeStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/deal/summaries": {
|
|
"get": {
|
|
"tags": [
|
|
"deal"
|
|
],
|
|
"summary": "Get Summary",
|
|
"operationId": "getDealSummaries",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealSummaryResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/deal/services/add": {
|
|
"post": {
|
|
"tags": [
|
|
"deal"
|
|
],
|
|
"summary": "Services Add",
|
|
"operationId": "services_add_deal_services_add_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealAddServicesRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DealAddServicesResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/search": {
|
|
"get": {
|
|
"tags": [
|
|
"client"
|
|
],
|
|
"summary": "Search Clients",
|
|
"operationId": "search_clients",
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/update-details": {
|
|
"post": {
|
|
"tags": [
|
|
"client"
|
|
],
|
|
"summary": "Update Client Details",
|
|
"operationId": "update_client_details_client_update_details_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ClientUpdateDetailsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"HTTPBearer": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/get-all": {
|
|
"get": {
|
|
"tags": [
|
|
"client"
|
|
],
|
|
"summary": "Get All Clients",
|
|
"operationId": "get_all_clients",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ClientGetAllResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/get-all": {
|
|
"get": {
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Get All",
|
|
"operationId": "get_all_services",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServiceGetAllResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/create": {
|
|
"post": {
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Create",
|
|
"operationId": "create_service",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServiceCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServiceCreateResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/categories/get-all": {
|
|
"get": {
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Get All Categories",
|
|
"operationId": "get_all_service_categories",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServiceGetAllCategoriesResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/categories/create": {
|
|
"post": {
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Create Category",
|
|
"operationId": "create_service_category",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServiceCreateCategoryRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServiceCreateCategoryResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/product/create": {
|
|
"post": {
|
|
"tags": [
|
|
"product"
|
|
],
|
|
"summary": "Create Product",
|
|
"operationId": "create_product",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProductCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProductCreateResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/product/get": {
|
|
"get": {
|
|
"tags": [
|
|
"product"
|
|
],
|
|
"summary": "Get Product",
|
|
"operationId": "get_products_by_client_id",
|
|
"parameters": [
|
|
{
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"title": "Client Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"title": "Page"
|
|
}
|
|
},
|
|
{
|
|
"name": "items_per_page",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"title": "Items Per Page"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProductGetResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"AuthLoginRequest": {
|
|
"properties": {
|
|
"auth_date": {
|
|
"type": "integer",
|
|
"title": "Auth Date"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"title": "First Name"
|
|
},
|
|
"hash": {
|
|
"type": "string",
|
|
"title": "Hash"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"photo_url": {
|
|
"type": "string",
|
|
"title": "Photo Url"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"auth_date",
|
|
"first_name",
|
|
"hash",
|
|
"id",
|
|
"photo_url"
|
|
],
|
|
"title": "AuthLoginRequest"
|
|
},
|
|
"AuthLoginResponse": {
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string",
|
|
"title": "Access Token"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"access_token"
|
|
],
|
|
"title": "AuthLoginResponse"
|
|
},
|
|
"ClientDetailsSchema": {
|
|
"properties": {
|
|
"address": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Address"
|
|
},
|
|
"phone_number": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Phone Number"
|
|
},
|
|
"inn": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Inn"
|
|
},
|
|
"email": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Email"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "ClientDetailsSchema"
|
|
},
|
|
"ClientGetAllResponse": {
|
|
"properties": {
|
|
"clients": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ClientSchema"
|
|
},
|
|
"type": "array",
|
|
"title": "Clients"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"clients"
|
|
],
|
|
"title": "ClientGetAllResponse"
|
|
},
|
|
"ClientSchema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ClientDetailsSchema"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name"
|
|
],
|
|
"title": "ClientSchema"
|
|
},
|
|
"ClientUpdateDetailsRequest": {
|
|
"properties": {
|
|
"client_id": {
|
|
"type": "integer",
|
|
"title": "Client Id"
|
|
},
|
|
"details": {
|
|
"$ref": "#/components/schemas/ClientDetailsSchema"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"client_id",
|
|
"details"
|
|
],
|
|
"title": "ClientUpdateDetailsRequest"
|
|
},
|
|
"DealAddServicesRequest": {
|
|
"properties": {
|
|
"deal_id": {
|
|
"type": "integer",
|
|
"title": "Deal Id"
|
|
},
|
|
"services": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DealServiceSchema"
|
|
},
|
|
"type": "array",
|
|
"title": "Services"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"deal_id",
|
|
"services"
|
|
],
|
|
"title": "DealAddServicesRequest"
|
|
},
|
|
"DealAddServicesResponse": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean",
|
|
"title": "Ok"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"ok",
|
|
"message"
|
|
],
|
|
"title": "DealAddServicesResponse"
|
|
},
|
|
"DealChangeStatusRequest": {
|
|
"properties": {
|
|
"deal_id": {
|
|
"type": "integer",
|
|
"title": "Deal Id"
|
|
},
|
|
"new_status": {
|
|
"type": "integer",
|
|
"title": "New Status"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"deal_id",
|
|
"new_status"
|
|
],
|
|
"title": "DealChangeStatusRequest"
|
|
},
|
|
"DealChangeStatusResponse": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean",
|
|
"title": "Ok"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"ok"
|
|
],
|
|
"title": "DealChangeStatusResponse"
|
|
},
|
|
"DealCreateRequest": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "DealCreateRequest"
|
|
},
|
|
"DealQuickCreateRequest": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"client_name": {
|
|
"type": "string",
|
|
"title": "Client Name"
|
|
},
|
|
"client_address": {
|
|
"type": "string",
|
|
"title": "Client Address"
|
|
},
|
|
"comment": {
|
|
"type": "string",
|
|
"title": "Comment"
|
|
},
|
|
"acceptance_date": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Acceptance Date"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"client_name",
|
|
"client_address",
|
|
"comment",
|
|
"acceptance_date"
|
|
],
|
|
"title": "DealQuickCreateRequest"
|
|
},
|
|
"DealQuickCreateResponse": {
|
|
"properties": {
|
|
"deal_id": {
|
|
"type": "integer",
|
|
"title": "Deal Id"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"deal_id"
|
|
],
|
|
"title": "DealQuickCreateResponse"
|
|
},
|
|
"DealServiceSchema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"quantity": {
|
|
"type": "integer",
|
|
"title": "Quantity"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"quantity"
|
|
],
|
|
"title": "DealServiceSchema"
|
|
},
|
|
"DealSummary": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"client_name": {
|
|
"type": "string",
|
|
"title": "Client Name"
|
|
},
|
|
"changed_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"title": "Changed At"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"title": "Status"
|
|
},
|
|
"total_price": {
|
|
"type": "integer",
|
|
"title": "Total Price"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"client_name",
|
|
"changed_at",
|
|
"status",
|
|
"total_price"
|
|
],
|
|
"title": "DealSummary"
|
|
},
|
|
"DealSummaryResponse": {
|
|
"properties": {
|
|
"summaries": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DealSummary"
|
|
},
|
|
"type": "array",
|
|
"title": "Summaries"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"summaries"
|
|
],
|
|
"title": "DealSummaryResponse"
|
|
},
|
|
"HTTPValidationError": {
|
|
"properties": {
|
|
"detail": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ValidationError"
|
|
},
|
|
"type": "array",
|
|
"title": "Detail"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HTTPValidationError"
|
|
},
|
|
"PaginationInfoSchema": {
|
|
"properties": {
|
|
"total_pages": {
|
|
"type": "integer",
|
|
"title": "Total Pages"
|
|
},
|
|
"total_items": {
|
|
"type": "integer",
|
|
"title": "Total Items"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"total_pages",
|
|
"total_items"
|
|
],
|
|
"title": "PaginationInfoSchema"
|
|
},
|
|
"ProductCreateRequest": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"article": {
|
|
"type": "string",
|
|
"title": "Article"
|
|
},
|
|
"client_id": {
|
|
"type": "integer",
|
|
"title": "Client Id"
|
|
},
|
|
"barcodes": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"title": "Barcodes"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"article",
|
|
"client_id",
|
|
"barcodes"
|
|
],
|
|
"title": "ProductCreateRequest"
|
|
},
|
|
"ProductCreateResponse": {
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"title": "Product Id"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"product_id"
|
|
],
|
|
"title": "ProductCreateResponse"
|
|
},
|
|
"ProductGetResponse": {
|
|
"properties": {
|
|
"products": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProductSchema"
|
|
},
|
|
"type": "array",
|
|
"title": "Products"
|
|
},
|
|
"pagination_info": {
|
|
"$ref": "#/components/schemas/PaginationInfoSchema"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"products",
|
|
"pagination_info"
|
|
],
|
|
"title": "ProductGetResponse"
|
|
},
|
|
"ProductSchema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"article": {
|
|
"type": "string",
|
|
"title": "Article"
|
|
},
|
|
"client_id": {
|
|
"type": "integer",
|
|
"title": "Client Id"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"article",
|
|
"client_id"
|
|
],
|
|
"title": "ProductSchema"
|
|
},
|
|
"ServiceCategorySchema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name"
|
|
],
|
|
"title": "ServiceCategorySchema"
|
|
},
|
|
"ServiceCreateCategoryRequest": {
|
|
"properties": {
|
|
"category": {
|
|
"$ref": "#/components/schemas/ServiceCategorySchema"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"category"
|
|
],
|
|
"title": "ServiceCreateCategoryRequest"
|
|
},
|
|
"ServiceCreateCategoryResponse": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean",
|
|
"title": "Ok"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"ok",
|
|
"message"
|
|
],
|
|
"title": "ServiceCreateCategoryResponse"
|
|
},
|
|
"ServiceCreateRequest": {
|
|
"properties": {
|
|
"service": {
|
|
"$ref": "#/components/schemas/ServiceSchema"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"service"
|
|
],
|
|
"title": "ServiceCreateRequest"
|
|
},
|
|
"ServiceCreateResponse": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean",
|
|
"title": "Ok"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"ok",
|
|
"message"
|
|
],
|
|
"title": "ServiceCreateResponse"
|
|
},
|
|
"ServiceGetAllCategoriesResponse": {
|
|
"properties": {
|
|
"categories": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ServiceCategorySchema"
|
|
},
|
|
"type": "array",
|
|
"title": "Categories"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"categories"
|
|
],
|
|
"title": "ServiceGetAllCategoriesResponse"
|
|
},
|
|
"ServiceGetAllResponse": {
|
|
"properties": {
|
|
"services": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ServiceSchema"
|
|
},
|
|
"type": "array",
|
|
"title": "Services"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"services"
|
|
],
|
|
"title": "ServiceGetAllResponse"
|
|
},
|
|
"ServiceSchema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"category": {
|
|
"$ref": "#/components/schemas/ServiceCategorySchema"
|
|
},
|
|
"price": {
|
|
"type": "number",
|
|
"title": "Price"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"category",
|
|
"price"
|
|
],
|
|
"title": "ServiceSchema"
|
|
},
|
|
"ValidationError": {
|
|
"properties": {
|
|
"loc": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
]
|
|
},
|
|
"type": "array",
|
|
"title": "Location"
|
|
},
|
|
"msg": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"title": "Error Type"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"loc",
|
|
"msg",
|
|
"type"
|
|
],
|
|
"title": "ValidationError"
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"HTTPBearer": {
|
|
"type": "http",
|
|
"scheme": "bearer"
|
|
}
|
|
}
|
|
}
|
|
} |