{ "swagger": "2.0", "info": { "description": "This is a simple time tracker API.", "title": "Time Tracker API", "contact": {}, "version": "1.0" }, "host": "localhost:8080", "basePath": "/api", "paths": { "/": { "get": { "description": "Get a hello message", "produces": [ "text/plain" ], "summary": "Say hello", "operationId": "hello", "responses": { "200": { "description": "Hello from the Time Tracker Backend!", "schema": { "type": "string" } } } } }, "/activities": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all activities", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "Get all activities", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ActivityDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new activity", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "Create a new activity", "parameters": [ { "description": "Activity data", "name": "activity", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ActivityCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ActivityDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/activities/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get an activity by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "Get activity by ID", "parameters": [ { "type": "string", "description": "Activity ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ActivityDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing activity", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "Update an activity", "parameters": [ { "type": "string", "description": "Activity ID", "name": "id", "in": "path", "required": true }, { "description": "Activity data", "name": "activity", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ActivityUpdateDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ActivityDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete an activity by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "Delete an activity", "parameters": [ { "type": "string", "description": "Activity ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "$ref": "#/definitions/utils.Response" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/auth/login": { "post": { "description": "Authenticate a user and get a JWT token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login", "parameters": [ { "description": "Login credentials", "name": "credentials", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.LoginDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.TokenDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/auth/me": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get the currently authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Get current user", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserDto" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/auth/register": { "post": { "description": "Register a new user and get a JWT token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Register", "parameters": [ { "description": "User data", "name": "user", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UserCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.TokenDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/companies": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all companies", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "companies" ], "summary": "Get all companies", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.CompanyDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new company", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "companies" ], "summary": "Create a new company", "parameters": [ { "description": "Company data", "name": "company", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CompanyCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.CompanyDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/companies/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a company by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "companies" ], "summary": "Get company by ID", "parameters": [ { "type": "string", "description": "Company ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.CompanyDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing company", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "companies" ], "summary": "Update a company", "parameters": [ { "type": "string", "description": "Company ID", "name": "id", "in": "path", "required": true }, { "description": "Company data", "name": "company", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CompanyUpdateDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.CompanyDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a company by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "companies" ], "summary": "Delete a company", "parameters": [ { "type": "string", "description": "Company ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "$ref": "#/definitions/utils.Response" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/customers": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all customers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customers" ], "summary": "Get all customers", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.CustomerDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customers" ], "summary": "Create a new customer", "parameters": [ { "description": "Customer data", "name": "customer", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CustomerCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.CustomerDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/customers/company/{companyId}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of customers for a specific company", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customers" ], "summary": "Get customers by company ID", "parameters": [ { "type": "integer", "description": "Company ID", "name": "companyId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.CustomerDto" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/customers/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a customer by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customers" ], "summary": "Get customer by ID", "parameters": [ { "type": "string", "description": "Customer ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.CustomerDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customers" ], "summary": "Update a customer", "parameters": [ { "type": "string", "description": "Customer ID", "name": "id", "in": "path", "required": true }, { "description": "Customer data", "name": "customer", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CustomerUpdateDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.CustomerDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a customer by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customers" ], "summary": "Delete a customer", "parameters": [ { "type": "string", "description": "Customer ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "$ref": "#/definitions/utils.Response" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/projects": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all projects", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Get all projects", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ProjectDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new project", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Create a new project", "parameters": [ { "description": "Project data", "name": "project", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ProjectCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ProjectDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/projects/customer/{customerId}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of projects for a specific customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Get projects by customer ID", "parameters": [ { "type": "string", "description": "Customer ID", "name": "customerId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ProjectDto" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/projects/with-customers": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all projects with their associated customer information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Get all projects with customer information", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.ProjectDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/projects/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a project by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Get project by ID", "parameters": [ { "type": "string", "description": "Project ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ProjectDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing project", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Update a project", "parameters": [ { "type": "string", "description": "Project ID", "name": "id", "in": "path", "required": true }, { "description": "Project data", "name": "project", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ProjectUpdateDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ProjectDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a project by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "projects" ], "summary": "Delete a project", "parameters": [ { "type": "string", "description": "Project ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "$ref": "#/definitions/utils.Response" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/time-entries": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all time entries", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Get all time entries", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.TimeEntryDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new time entry", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Create a new time entry", "parameters": [ { "description": "Time Entry data", "name": "timeEntry", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.TimeEntryCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.TimeEntryDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/time-entries/me": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of time entries for the currently authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Get current user's time entries", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.TimeEntryDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/time-entries/project/{projectId}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of time entries for a specific project", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Get time entries by project ID", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.TimeEntryDto" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/time-entries/range": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of time entries within a specific date range", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Get time entries by date range", "parameters": [ { "type": "string", "description": "Start date (ISO 8601 format)", "name": "start", "in": "query", "required": true }, { "type": "string", "description": "End date (ISO 8601 format)", "name": "end", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.TimeEntryDto" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/time-entries/user/{userId}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of time entries for a specific user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Get time entries by user ID", "parameters": [ { "type": "string", "description": "User ID", "name": "userId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.TimeEntryDto" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/time-entries/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a time entry by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Get time entry by ID", "parameters": [ { "type": "string", "description": "Time Entry ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.TimeEntryDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing time entry", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Update a time entry", "parameters": [ { "type": "string", "description": "Time Entry ID", "name": "id", "in": "path", "required": true }, { "description": "Time Entry data", "name": "timeEntry", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.TimeEntryUpdateDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.TimeEntryDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a time entry by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "time-entries" ], "summary": "Delete a time entry", "parameters": [ { "type": "string", "description": "Time Entry ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "$ref": "#/definitions/utils.Response" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/users": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a list of all users", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get all users", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/dto.UserDto" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Create a new user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Create a new user", "parameters": [ { "description": "User data", "name": "user", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UserCreateDto" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } }, "/users/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get a user by their ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get user by ID", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Update an existing user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Update a user", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true }, { "description": "User data", "name": "user", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UserUpdateDto" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UserDto" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a user by their ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Delete a user", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "$ref": "#/definitions/utils.Response" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/utils.Response" }, { "type": "object", "properties": { "error": { "$ref": "#/definitions/utils.ErrorInfo" } } } ] } } } } } }, "definitions": { "dto.ActivityCreateDto": { "type": "object", "properties": { "billingRate": { "type": "number" }, "name": { "type": "string" } } }, "dto.ActivityDto": { "type": "object", "properties": { "billingRate": { "type": "number" }, "createdAt": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.ActivityUpdateDto": { "type": "object", "properties": { "billingRate": { "type": "number" }, "createdAt": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.CompanyCreateDto": { "type": "object", "properties": { "name": { "type": "string" } } }, "dto.CompanyDto": { "type": "object", "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.CompanyUpdateDto": { "type": "object", "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.CustomerCreateDto": { "type": "object", "properties": { "companyId": { "type": "integer" }, "name": { "type": "string" } } }, "dto.CustomerDto": { "type": "object", "properties": { "companyId": { "type": "integer" }, "createdAt": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.CustomerUpdateDto": { "type": "object", "properties": { "companyId": { "type": "integer" }, "createdAt": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.LoginDto": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "dto.ProjectCreateDto": { "type": "object", "properties": { "customerId": { "type": "integer" }, "name": { "type": "string" } } }, "dto.ProjectDto": { "type": "object", "properties": { "createdAt": { "type": "string" }, "customerId": { "type": "integer" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.ProjectUpdateDto": { "type": "object", "properties": { "createdAt": { "type": "string" }, "customerId": { "type": "integer" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.TimeEntryCreateDto": { "type": "object", "properties": { "activityId": { "type": "integer" }, "billable": { "description": "Percentage (0-100)", "type": "integer" }, "description": { "type": "string" }, "end": { "type": "string" }, "projectId": { "type": "integer" }, "start": { "type": "string" }, "userId": { "type": "integer" } } }, "dto.TimeEntryDto": { "type": "object", "properties": { "activityId": { "type": "integer" }, "billable": { "description": "Percentage (0-100)", "type": "integer" }, "createdAt": { "type": "string" }, "description": { "type": "string" }, "end": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "projectId": { "type": "integer" }, "start": { "type": "string" }, "updatedAt": { "type": "string" }, "userId": { "type": "integer" } } }, "dto.TimeEntryUpdateDto": { "type": "object", "properties": { "activityId": { "type": "integer" }, "billable": { "description": "Percentage (0-100)", "type": "integer" }, "createdAt": { "type": "string" }, "description": { "type": "string" }, "end": { "type": "string" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "projectId": { "type": "integer" }, "start": { "type": "string" }, "updatedAt": { "type": "string" }, "userId": { "type": "integer" } } }, "dto.TokenDto": { "type": "object", "properties": { "token": { "type": "string" }, "user": { "$ref": "#/definitions/dto.UserDto" } } }, "dto.UserCreateDto": { "type": "object", "properties": { "companyId": { "type": "integer" }, "email": { "type": "string" }, "hourlyRate": { "type": "number" }, "password": { "type": "string" }, "role": { "type": "string" } } }, "dto.UserDto": { "type": "object", "properties": { "companyId": { "type": "integer" }, "createdAt": { "type": "string" }, "email": { "type": "string" }, "hourlyRate": { "type": "number" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "role": { "type": "string" }, "updatedAt": { "type": "string" } } }, "dto.UserUpdateDto": { "type": "object", "properties": { "companyId": { "type": "integer" }, "createdAt": { "type": "string" }, "email": { "type": "string" }, "hourlyRate": { "type": "number" }, "id": { "type": "string" }, "lastEditorID": { "type": "string" }, "password": { "type": "string" }, "role": { "type": "string" }, "updatedAt": { "type": "string" } } }, "utils.ErrorInfo": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } } }, "utils.Response": { "type": "object", "properties": { "data": {}, "error": { "$ref": "#/definitions/utils.ErrorInfo" }, "success": { "type": "boolean" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }