{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "Backend API for feeltogather",
        "title": "feeltogather API",
        "contact": {},
        "version": "0.0.1"
    },
    "host": "",
    "basePath": "/",
    "paths": {
        "/api/v1/users": {
            "get": {
                "description": "Get a list of all active users",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "users"
                ],
                "summary": "List all users",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/ent.User"
                            }
                        }
                    }
                }
            },
            "post": {
                "description": "Create a new user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "users"
                ],
                "summary": "Create a user",
                "parameters": [
                    {
                        "description": "Create User Payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.CreateUserRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/ent.User"
                        }
                    }
                }
            }
        },
        "/api/v1/users/{key}": {
            "get": {
                "description": "Get a user by their UUID key",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "users"
                ],
                "summary": "Get a user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User Key (UUID)",
                        "name": "key",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ent.User"
                        }
                    }
                }
            },
            "delete": {
                "description": "Soft-delete a user by their UUID key",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "users"
                ],
                "summary": "Delete a user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User Key (UUID)",
                        "name": "key",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    }
                }
            },
            "patch": {
                "description": "Update an existing user's details",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "users"
                ],
                "summary": "Update a user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User Key (UUID)",
                        "name": "key",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update User Payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.UpdateUserRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ent.User"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "dto.CreateUserRequest": {
            "type": "object",
            "properties": {
                "authentication_id": {
                    "type": "string"
                },
                "authentication_provider_id": {
                    "type": "integer"
                },
                "birth_date": {
                    "type": "string"
                },
                "citizenship_country2letters": {
                    "type": "string"
                },
                "citizenship_id": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "url_picture": {
                    "type": "string"
                }
            }
        },
        "dto.UpdateUserRequest": {
            "type": "object",
            "properties": {
                "birth_date": {
                    "type": "string"
                },
                "citizenship_country2letters": {
                    "type": "string"
                },
                "citizenship_id": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "url_picture": {
                    "type": "string"
                }
            }
        },
        "ent.User": {
            "type": "object",
            "properties": {
                "authentication_id": {
                    "description": "AuthenticationID holds the value of the \"authentication_id\" field.",
                    "type": "string"
                },
                "authentication_provider_id": {
                    "description": "AuthenticationProviderID holds the value of the \"authentication_provider_id\" field.",
                    "type": "integer"
                },
                "birth_date": {
                    "description": "BirthDate holds the value of the \"birth_date\" field.",
                    "type": "string"
                },
                "citizenship_country2letters": {
                    "description": "CitizenshipCountry2letters holds the value of the \"citizenship_country2letters\" field.",
                    "type": "string"
                },
                "citizenship_id": {
                    "description": "CitizenshipID holds the value of the \"citizenship_id\" field.",
                    "type": "string"
                },
                "created_at": {
                    "description": "CreatedAt holds the value of the \"created_at\" field.",
                    "type": "string"
                },
                "deleted_at": {
                    "description": "Timestamp for soft delete",
                    "type": "string"
                },
                "deleted_by": {
                    "description": "User id who performed the deletion",
                    "type": "integer"
                },
                "display_name": {
                    "description": "DisplayName holds the value of the \"display_name\" field.",
                    "type": "string"
                },
                "id": {
                    "description": "ID of the ent.",
                    "type": "integer"
                },
                "key": {
                    "description": "External UUID used for APIs to avoid exposing internal IDs",
                    "type": "string"
                },
                "status": {
                    "description": "Entity status (e.g., 1=Active, 0=Inactive)",
                    "type": "integer"
                },
                "updated_at": {
                    "description": "UpdatedAt holds the value of the \"updated_at\" field.",
                    "type": "string"
                },
                "url_picture": {
                    "description": "URLPicture holds the value of the \"url_picture\" field.",
                    "type": "string"
                }
            }
        }
    }
}