{
  "info": {
    "title": "Ent Schema API",
    "description": "This is an auto generated API description made out of an Ent schema definition",
    "termsOfService": "",
    "contact": {},
    "license": {
      "name": ""
    },
    "version": "0.0.0"
  },
  "paths": {
    "/entries": {
      "get": {
        "summary": "List Entries",
        "description": "List Entries.",
        "tags": [
          "Entry"
        ],
        "operationId": "listEntry",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "what page to render",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "item count to render per page",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "result Entry list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Entry3455346119View"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "summary": "Create a new Entry",
        "description": "Creates a new Entry and persists it to storage.",
        "tags": [
          "Entry"
        ],
        "operationId": "createEntry",
        "requestBody": {
          "description": "Entry to create",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content",
                  "created_at"
                ],
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Entry created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry3455346119View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/entries/{id}": {
      "get": {
        "summary": "Find a Entry by ID",
        "description": "Finds the Entry with the requested ID and returns it.",
        "tags": [
          "Entry"
        ],
        "operationId": "readEntry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the Entry",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entry with requested ID was found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry3455346119View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "summary": "Deletes a Entry by ID",
        "description": "Deletes the Entry with the requested ID.",
        "tags": [
          "Entry"
        ],
        "operationId": "deleteEntry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the Entry to delete",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Entry with requested ID was deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "summary": "Updates a Entry",
        "description": "Updates a Entry and persists changes to storage.",
        "tags": [
          "Entry"
        ],
        "operationId": "updateEntry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the Entry to update",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Entry properties to update",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content",
                  "created_at"
                ],
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Entry updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry3455346119View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Entry3455346119View": {
        "type": "object",
        "required": [
          "content",
          "created_at",
          "id"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "integer",
            "format": "int32"
          }
        }
      }
    },
    "responses": {
      "400": {
        "description": "invalid input, data invalid",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer",
                  "format": "int32",
                  "example": 400
                },
                "errors": {
                  "type": "object",
                  "properties": {}
                },
                "status": {
                  "type": "string",
                  "example": "Bad Request"
                }
              }
            }
          }
        }
      },
      "403": {
        "description": "user misses permission",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer",
                  "format": "int32",
                  "example": 403
                },
                "errors": {
                  "type": "object",
                  "properties": {}
                },
                "status": {
                  "type": "string",
                  "example": "Forbidden"
                }
              }
            }
          }
        }
      },
      "404": {
        "description": "resource not found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer",
                  "format": "int32",
                  "example": 404
                },
                "errors": {
                  "type": "object",
                  "properties": {}
                },
                "status": {
                  "type": "string",
                  "example": "Not Found"
                }
              }
            }
          }
        }
      },
      "409": {
        "description": "conflicting resources",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer",
                  "format": "int32",
                  "example": 409
                },
                "errors": {
                  "type": "object",
                  "properties": {}
                },
                "status": {
                  "type": "string",
                  "example": "Conflict"
                }
              }
            }
          }
        }
      },
      "500": {
        "description": "unexpected error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500
                },
                "errors": {
                  "type": "object",
                  "properties": {}
                },
                "status": {
                  "type": "string",
                  "example": "Internal Server Error"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {}
  },
  "openapi": "3.0.3"
}