{
  "openapi": "3.0.3",
  "info": {
    "title": "FaceGov API",
    "version": "1.0.0",
    "description": "Backend API for FaceGov \u2014 health check and items CRUD. All items endpoints require a Cognito-authenticated caller."
  },
  "servers": [
    {
      "url": "https://api.puglieseweb.com/facegov",
      "description": "Production"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Service health check",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/items": {
      "get": {
        "tags": [
          "Items"
        ],
        "summary": "List the caller's items",
        "operationId": "list_items_items_get",
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemsResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Items"
        ],
        "summary": "Create an item",
        "operationId": "create_item_items_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Item"
                }
              }
            }
          }
        }
      }
    },
    "/items/{id}": {
      "get": {
        "tags": [
          "Items"
        ],
        "summary": "Get an item by ID",
        "operationId": "get_item_items__id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            },
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Item"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Items"
        ],
        "summary": "Update an item",
        "operationId": "update_item_items__id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            },
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Item"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Items"
        ],
        "summary": "Delete an item",
        "operationId": "delete_item_items__id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            },
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          },
          "service": {
            "type": "string",
            "title": "Service"
          }
        },
        "type": "object",
        "required": [
          "status",
          "service"
        ],
        "title": "HealthResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ResponseValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "ResponseValidationError"
      },
      "DeleteResponse": {
        "properties": {
          "deleted": {
            "type": "boolean",
            "title": "Deleted",
            "default": true
          }
        },
        "type": "object",
        "title": "DeleteResponse"
      },
      "Item": {
        "properties": {
          "itemId": {
            "type": "string",
            "title": "Itemid",
            "examples": [
              "550e8400-e29b-41d4-a716-446655440000"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 500,
            "title": "Title",
            "default": ""
          },
          "description": {
            "type": "string",
            "maxLength": 10000,
            "title": "Description",
            "default": ""
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "itemId",
          "createdAt",
          "updatedAt"
        ],
        "title": "Item"
      },
      "ItemCreate": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 500,
            "title": "Title",
            "default": ""
          },
          "description": {
            "type": "string",
            "maxLength": 10000,
            "title": "Description",
            "default": ""
          }
        },
        "type": "object",
        "title": "ItemCreate"
      },
      "ItemUpdate": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 500,
            "title": "Title",
            "default": ""
          },
          "description": {
            "type": "string",
            "maxLength": 10000,
            "title": "Description",
            "default": ""
          }
        },
        "type": "object",
        "title": "ItemUpdate"
      },
      "ItemsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ItemsResponse"
      }
    }
  }
}