{
  "openapi": "3.0.1",
  "info": {
    "title": "Sample | forms",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://localhost/"
    }
  ],
  "paths": {
    "/forms/form-file": {
      "post": {
        "tags": [
          "Sample"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "resume"
                ],
                "type": "object",
                "properties": {
                  "resume": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/forms/form-files": {
      "post": {
        "tags": [
          "Sample"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "files"
                ],
                "type": "object",
                "properties": {
                  "files": {
                    "$ref": "#/components/schemas/IFormFileCollection"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/forms/form-file-multiple": {
      "post": {
        "tags": [
          "Sample"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "resume",
                  "files"
                ],
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "resume": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "files": {
                        "$ref": "#/components/schemas/IFormFileCollection"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/forms/form-todo": {
      "post": {
        "tags": [
          "Sample"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Todo"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Todo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/forms/forms-pocos-and-files": {
      "post": {
        "tags": [
          "Sample"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Todo"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "file": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "IFormFileCollection": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/IFormFile"
        }
      },
      "Todo": {
        "required": [
          "id",
          "title",
          "completed",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "completed": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Sample"
    }
  ]
}