{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenAPI Plant Store",
    "description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://sandbox.mintlify.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/plants": {
      "get": {
        "description": "will this description overwrite my markdown one?",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of results to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plant response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Plant"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a new plant in the store",
        "requestBody": {
          "description": "Plant to add to the store",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPlant"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "plant response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plant"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/plants/{id}": {
      "delete": {
        "description": "Deletes a single plant based on the ID supplied",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of plant to delete",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Plant deleted",
            "content": {}
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lorem": {
      "get": {
        "description": "Returns a list of lorem ipsum items",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of results to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Search term to filter lorem items by title or body",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of lorem items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Lorem"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a new lorem ipsum item",
        "requestBody": {
          "description": "Lorem item to create",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewLorem"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created lorem item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lorem"
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lorem/{id}": {
      "get": {
        "description": "Returns a single lorem ipsum item by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the lorem item",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A lorem item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lorem"
                }
              }
            }
          },
          "404": {
            "description": "Lorem item not found"
          }
        }
      },
      "put": {
        "description": "Updates a lorem ipsum item by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the lorem item to update",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Updated lorem item",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewLorem"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated lorem item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lorem"
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Lorem item not found"
          }
        }
      },
      "delete": {
        "description": "Deletes a lorem ipsum item by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the lorem item to delete",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Lorem item deleted",
            "content": {}
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "/plant/webhook": {
      "post": {
        "description": "Information about a new plant added to the store",
        "requestBody": {
          "description": "Plant added to the store",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPlant"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        }
      }
    },
    "/lorem/webhook": {
      "post": {
        "description": "Information about a new lorem ipsum item created",
        "requestBody": {
          "description": "New lorem item payload",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewLorem"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Plant": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the plant",
            "type": "string"
          },
          "tag": {
            "description": "Tag to specify the type",
            "type": "string"
          }
        }
      },
      "NewPlant": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Plant"
          },
          {
            "required": [
              "id"
            ],
            "type": "object",
            "properties": {
              "id": {
                "description": "Identification number of the plant",
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "Error": {
        "required": [
          "error",
          "message"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Lorem": {
        "required": [
          "id",
          "title",
          "body"
        ],
        "type": "object",
        "properties": {
          "id": {
            "description": "Identification number of the lorem item",
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "description": "Title for the lorem item",
            "type": "string"
          },
          "body": {
            "description": "Body content for the lorem item",
            "type": "string"
          },
          "createdAt": {
            "description": "Timestamp when the item was created",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NewLorem": {
        "required": [
          "title",
          "body"
        ],
        "type": "object",
        "properties": {
          "title": {
            "description": "Title for the lorem item",
            "type": "string"
          },
          "body": {
            "description": "Body content for the lorem item",
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
