{
  "openapi": "3.0.3",
  "info": {
    "title": "Check API",
    "version": "0.0.1"
  },
  "paths": {
    "/batch_delete": {
      "post": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_BatchDeleteChecks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchDeleteChecksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchDeleteChecksReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/batch_submit": {
      "post": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_BatchSubmitChecks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchSubmitChecksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchSubmitChecksReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/delete/{checkId}": {
      "delete": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_DeleteCheck",
        "parameters": [
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCheckReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/get/{checkId}": {
      "get": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_GetCheckById",
        "parameters": [
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCheckByIdReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/list": {
      "get": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_ListChecks",
        "parameters": [
          {
            "name": "pagination.page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pagination.size",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagination.uid",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagination.offset",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagination.total",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListChecksReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/submit": {
      "post": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_SubmitCheck",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitCheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitCheckReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/update": {
      "post": {
        "tags": [
          "Check"
        ],
        "operationId": "Check_UpdateCheck",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateCheckReply"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BatchDeleteChecksReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          }
        }
      },
      "BatchDeleteChecksRequest": {
        "type": "object",
        "properties": {
          "checkIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BatchSubmitChecksReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          }
        }
      },
      "BatchSubmitChecksRequest": {
        "type": "object",
        "properties": {
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListOrGetCheck"
            }
          }
        }
      },
      "DeleteCheckReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          }
        }
      },
      "GetCheckByIdReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ListOrGetCheck"
          }
        }
      },
      "GoogleProtobufAny": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string",
            "description": "The type of the serialized message."
          }
        },
        "additionalProperties": true,
        "description": "Contains an arbitrary serialized message along with a @type that describes the type of the serialized message."
      },
      "ListChecksReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListOrGetCheck"
            }
          }
        }
      },
      "ListOrGetCheck": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "postId": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "Status": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].",
            "format": "int32"
          },
          "message": {
            "type": "string",
            "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client."
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleProtobufAny"
            },
            "description": "A list of messages that carry the error details.  There is a common set of message types for APIs to use."
          }
        },
        "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
      },
      "SubmitCheckReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          }
        }
      },
      "SubmitCheckRequest": {
        "type": "object",
        "properties": {
          "checkId": {
            "type": "string"
          },
          "approved": {
            "type": "boolean"
          }
        }
      },
      "UpdateCheckReply": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "msg": {
            "type": "string"
          }
        }
      },
      "UpdateCheckRequest": {
        "type": "object",
        "properties": {
          "check": {
            "$ref": "#/components/schemas/ListOrGetCheck"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Check"
    }
  ]
}