{
    "openapi": "3.0.3",
    "info": {
        "title": "db-adapter",
        "version": "0.0.1"
    },
    "servers": [
        {
            "description": "production server",
            "url": "http://0.0.0.0:7689"
        },
        {
            "description": "staging server",
            "url": "http://0.0.0.0:7699"
        },
        {
            "description": "development server",
            "url": "http://0.0.0.0:7698"
        }
    ],
    "paths": {
        "/health": {
            "get": {
                "summary": "Check the health of the server",
                "operationId": "healthCheck",
                "responses": {
                    "200": {
                        "description": "Server is healthy",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Server is unhealthy",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person_and_relationship/{id}": {
            "post": {
                "summary": "Create a person and relationship",
                "operationId": "createPersonAndRelationship",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "person": {
                                        "$ref": "#/components/schemas/PersonRegistration"
                                    },
                                    "relationship": {
                                        "$ref": "#/components/schemas/FamilyRelationship"
                                    }
                                },
                                "required": [
                                    "person",
                                    "relationship"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Person and relationship created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "person": {
                                            "$ref": "#/components/schemas/Person"
                                        },
                                        "relationship": {
                                            "$ref": "#/components/schemas/Relationship"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person": {
            "post": {
                "summary": "Create a new person",
                "operationId": "createPerson",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PersonRegistration"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Person created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Person"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person/{id}": {
            "patch": {
                "summary": "Update a person by ID",
                "operationId": "updatePerson",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PersonProperties"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Person updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Person"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Soft delete a person by ID",
                "operationId": "softDeletePerson",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Person soft deleted"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person/{id}/hard-delete": {
            "delete": {
                "summary": "Hard delete a person by ID",
                "operationId": "hardDeletePerson",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Person hard deleted"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person/google/{google_id}": {
            "post": {
                "summary": "Create a new person by Google ID",
                "operationId": "createPersonByGoogleId",
                "parameters": [
                    {
                        "name": "google_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PersonRegistration"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Person created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Person"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "summary": "Create a new person by Google ID with invite code",
                "operationId": "createPersonByGoogleIdAndInviteCode",
                "parameters": [
                    {
                        "name": "google_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "invite_code",
                                    "person"
                                ],
                                "properties": {
                                    "invite_code": {
                                        "type": "string"
                                    },
                                    "person": {
                                        "$ref": "#/components/schemas/PersonRegistration"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Person created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Person"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "summary": "Get a person by Google ID",
                "operationId": "getPersonByGoogleId",
                "parameters": [
                    {
                        "name": "google_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Person retrieved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Person"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person/{id}/family-tree": {
            "get": {
                "summary": "Get family tree by person ID",
                "operationId": "getFamilyTreeById",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Family tree retrieved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FamilyTree"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/person/{id}/recipes": {
            "get": {
                "summary": "Get recipes by person ID",
                "operationId": "getRecipesByPersonId",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recipes retrieved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "recipeRelations": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Likes"
                                            }
                                        },
                                        "recipes": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Recipe"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/relationship": {
            "post": {
                "summary": "Create a relationship between two persons",
                "operationId": "createRelationship",
                "parameters": [
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id1": {
                                        "type": "string"
                                    },
                                    "id2": {
                                        "type": "string"
                                    },
                                    "relationship": {
                                        "$ref": "#/components/schemas/FamilyRelationship"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Relationship created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Relationship"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/relationship/{id1}/{id2}": {
            "get": {
                "summary": "Get relationship between two persons",
                "operationId": "getRelationship",
                "parameters": [
                    {
                        "name": "id1",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "id2",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Relationship retrieved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Relationship"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/recipe/{id}": {
            "patch": {
                "summary": "Update a recipe by ID",
                "operationId": "updateRecipe",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RecipeProperties"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Recipe updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Recipe"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Soft delete a recipe by ID",
                "operationId": "softDeleteRecipe",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recipe soft deleted"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/recipe/{id}/hard-delete": {
            "delete": {
                "summary": "Hard delete a recipe by ID",
                "operationId": "hardDeleteRecipe",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recipe hard deleted"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/recipe/{recipeId}/relationship": {
            "post": {
                "summary": "Create a relationship with an existing recipe",
                "operationId": "createRecipeRelationship",
                "parameters": [
                    {
                        "name": "recipeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "relationship"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer"
                                    },
                                    "relationship": {
                                        "type": "object",
                                        "properties": {
                                            "schema": {
                                                "$ref": "#/components/schemas/LikesProperties"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Relationship with recipe created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Likes"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a relationship with a recipe",
                "operationId": "deleteRecipeRelationship",
                "parameters": [
                    {
                        "name": "recipeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "personId",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "X-User-ID",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Relationship with recipe deleted"
                    },
                    "400": {
                        "description": "Bad request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "PersonProperties": {
                "type": "object",
                "properties": {
                    "allow_admin_access": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                }
                            }
                        },
                        "nullable": true
                    },
                    "invite_code": {
                        "type": "string",
                        "nullable": true
                    },
                    "google_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "first_name": {
                        "type": "string",
                        "nullable": true
                    },
                    "middle_name": {
                        "type": "string",
                        "nullable": true
                    },
                    "last_name": {
                        "type": "string",
                        "nullable": true
                    },
                    "titles": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "suffixes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "extra_names": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "aliases": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "mothers_first_name": {
                        "type": "string",
                        "nullable": true
                    },
                    "mothers_last_name": {
                        "type": "string",
                        "nullable": true
                    },
                    "born": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "place_of_birth": {
                        "type": "string",
                        "nullable": true
                    },
                    "died": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "place_of_death": {
                        "type": "string",
                        "nullable": true
                    },
                    "life_events": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "to": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "description": {
                                    "type": "string"
                                }
                            }
                        },
                        "nullable": true
                    },
                    "occupations": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "occupation_to_display": {
                        "type": "string",
                        "nullable": true
                    },
                    "others_said": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "relationship": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string",
                                    "nullable": true
                                }
                            }
                        },
                        "nullable": true
                    },
                    "limit": {
                        "type": "integer",
                        "nullable": true
                    },
                    "photos": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "date": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "name": {
                                    "type": "string"
                                }
                            }
                        },
                        "nullable": true
                    },
                    "videos": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "date": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "name": {
                                    "type": "string"
                                }
                            }
                        },
                        "nullable": true
                    },
                    "audios": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "date": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "name": {
                                    "type": "string"
                                }
                            }
                        },
                        "nullable": true
                    },
                    "profile_picture": {
                        "type": "string",
                        "nullable": true
                    },
                    "verified": {
                        "type": "boolean",
                        "nullable": true
                    },
                    "email": {
                        "type": "string",
                        "nullable": true
                    },
                    "phone": {
                        "type": "string",
                        "nullable": true
                    },
                    "residence": {
                        "type": "object",
                        "properties": {
                            "city": {
                                "type": "string"
                            },
                            "country": {
                                "type": "string"
                            },
                            "zip_code": {
                                "type": "string"
                            },
                            "address_line_1": {
                                "type": "string"
                            },
                            "address_line_2": {
                                "type": "string"
                            }
                        },
                        "nullable": true
                    },
                    "religion": {
                        "type": "string",
                        "nullable": true
                    },
                    "baptized": {
                        "type": "string",
                        "nullable": true
                    },
                    "ideologies": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "blood_type": {
                        "type": "string",
                        "nullable": true
                    },
                    "allergies": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "medications": {
                        "type": "array",
                        "nullable": true,
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string",
                                    "nullable": true
                                },
                                "components": {
                                    "type": "string",
                                    "nullable": true
                                },
                                "dosage": {
                                    "type": "string",
                                    "nullable": true
                                },
                                "from": {
                                    "type": "string",
                                    "format": "date",
                                    "nullable": true
                                },
                                "to": {
                                    "type": "string",
                                    "format": "date",
                                    "nullable": true
                                }
                            }
                        }
                    },
                    "medical_conditions": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        },
                        "nullable": true
                    },
                    "height": {
                        "type": "number",
                        "nullable": true
                    },
                    "weight": {
                        "type": "number",
                        "nullable": true
                    },
                    "hair_colour": {
                        "type": "string",
                        "nullable": true
                    },
                    "skin_colour": {
                        "type": "string",
                        "nullable": true
                    },
                    "eye_colour": {
                        "type": "string",
                        "nullable": true
                    },
                    "sports": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "hobbies": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "interests": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "languages": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "language": {
                                    "type": "string"
                                },
                                "level": {
                                    "type": "string",
                                    "nullable": true
                                }
                            }
                        },
                        "nullable": true
                    },
                    "notes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "date": {
                                    "type": "string",
                                    "format": "date",
                                    "nullable": true
                                },
                                "title": {
                                    "type": "string",
                                    "nullable": true
                                },
                                "note": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string",
                                    "nullable": true
                                }
                            }
                        },
                        "nullable": true
                    }
                }
            },
            "PersonRegistration": {
                "type": "object",
                "required": [
                    "first_name",
                    "last_name",
                    "born",
                    "limit",
                    "mothers_first_name",
                    "mothers_last_name"
                ],
                "properties": {
                    "first_name": {
                        "type": "string"
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "nullable": true
                    },
                    "limit": {
                        "type": "integer"
                    },
                    "born": {
                        "type": "string",
                        "format": "date"
                    },
                    "mothers_first_name": {
                        "type": "string"
                    },
                    "mothers_last_name": {
                        "type": "string"
                    }
                }
            },
            "Person": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "labels": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "nullable": true
                    },
                    "properties": {
                        "$ref": "#/components/schemas/PersonProperties"
                    }
                }
            },
            "FamilyRelationship": {
                "type": "object",
                "properties": {
                    "verified": {
                        "type": "boolean",
                        "nullable": true
                    },
                    "notes": {
                        "type": "string",
                        "nullable": true
                    },
                    "from": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "to": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    }
                }
            },
            "Relationship": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "label": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "nullable": true
                    },
                    "start": {
                        "type": "integer"
                    },
                    "end": {
                        "type": "integer"
                    },
                    "properties": {
                        "$ref": "#/components/schemas/FamilyRelationship"
                    }
                }
            },
            "OptimizedPersonNode": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "labels": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "nullable": true
                    },
                    "first_name": {
                        "type": "string",
                        "nullable": false
                    },
                    "middle_name": {
                        "type": "string",
                        "nullable": false
                    },
                    "last_name": {
                        "type": "string",
                        "nullable": false
                    },
                    "born": {
                        "type": "string",
                        "format": "date",
                        "nullable": false
                    },
                    "died": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    }
                }
            },
            "FamilyTree": {
                "type": "object",
                "properties": {
                    "ancestors": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OptimizedPersonNode"
                        }
                    },
                    "prel1": {
                        "$ref": "#/components/schemas/Relationship"
                    },
                    "children": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OptimizedPersonNode"
                        }
                    },
                    "prel2": {
                        "$ref": "#/components/schemas/Relationship"
                    },
                    "spouses": {
                        "type": "string"
                    },
                    "srel": {
                        "$ref": "#/components/schemas/Relationship"
                    },
                    "user": {
                        "type": "string"
                    }
                }
            },
            "RecipeProperties": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "origin": {
                        "type": "string",
                        "nullable": true
                    },
                    "allow_admin_access": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "category": {
                        "type": "string",
                        "nullable": true
                    },
                    "first_recorded": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "description": {
                        "type": "string",
                        "nullable": true
                    },
                    "ingredients": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "instructions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "photo": {
                        "type": "string",
                        "nullable": true
                    },
                    "notes": {
                        "type": "string",
                        "nullable": true
                    },
                    "others_said": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "said": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "Recipe": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "labels": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "properties": {
                        "$ref": "#/components/schemas/RecipeProperties"
                    }
                }
            },
            "Likes": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "label": {
                        "type": "string"
                    },
                    "start": {
                        "type": "string"
                    },
                    "end": {
                        "type": "string"
                    },
                    "properties": {
                        "$ref": "#/components/schemas/LikesProperties"
                    }
                }
            },
            "LikesProperties": {
                "type": "object",
                "properties": {
                    "favourite": {
                        "type": "boolean",
                        "nullable": true
                    },
                    "like_it": {
                        "type": "boolean",
                        "nullable": true
                    },
                    "could_make_it": {
                        "type": "boolean",
                        "nullable": true
                    }
                }
            }
        }
    }
}