OpenAPI Plant Store Documentation

website·Indexed 19 days ago

https://12-f68f320d.mintlify.app/introduction

Documentation for a sample plant store API, featuring endpoints to create, get, and delete plants, as well as a webhook for new plants. The API uses bearer authentication and is based on the OpenAPI 3.1.0 specification.

Tokens
5.3K
Snippets
48
Records
58
Agent score
97%

What's inside OpenAPI Plant Store

  1. Author content using MDX and React components

    Mintlify documentation is authored using MDX syntax, which allows the integration of standard Markdown with React components. Supported content types include standard MDX text, syntax-highlighted code blocks, images, and custom reusable components.
  2. Update the Mintlify CLI to the latest version

    To ensure your local website aligns with the production version, update the Mintlify CLI to the latest release.
    # Update via npm
    npm i -g mintlify@latest
    
    # Update via yarn
    yarn global upgrade mintlify
  3. Create and use reusable MDX content snippets

    To avoid repeating content across multiple pages, create snippet files within the snippets directory. Files in this directory are treated as snippets and are not rendered as standalone pages. You can use curly braces {} to define variables within the snippet that can be populated via props when the snippet is imported into a destination file.
    // snippets/my-snippet.mdx
    Hello world! This is my content I want to reuse across pages. My keyword of the day is {word}.
    // destination-file.mdx
    import MySnippet from '/snippets/path/to/my-snippet.mdx';
    
    <MySnippet word="bananas" />
  4. Format inline code in documentation

    To denote a specific word or phrase as code within a sentence, enclose the text in single backticks (`).
    To denote a `word` or `phrase` as code, enclose it in backticks (`).
  5. Preview Mintlify documentation changes locally

    To preview documentation changes before deploying, use the Mintlify CLI. This allows you to render changes locally at the root of your documentation directory where the docs.json file is located.
    # Install the Mintlify CLI globally
    npm i -g mintlify
    
    # Run the development server at the root of your docs
    mintlify dev
  6. Create page headers and table of contents anchors

    Use standard Markdown header syntax (## for titles and ### for subtitles) to create section headers. Each title and subtitle automatically generates an anchor and is added to the page's table of contents.
    ## Section Title
    ### Subsection Title
  7. Organize documentation pages into folders

    To create a URL structure like https://yoursite.com/your-folder/your-page, place the MDX file inside a folder named your-folder and update the path in docs.json to your-folder/your-page.

    Constraint: You cannot name a top-level folder api because Mintlify (via Next.js) reserves that folder for internal server calls. Use an alternative like api-reference instead.

    "navigation": {
      "tabs": [
        {
          "tab": "Docs",
          "groups": [
            {
              "group": "Group Name",
              "pages": ["your-folder/your-page"]
            }
          ]
        }
      ]
    }
  8. Link to external pages and internal documentation

    Use the [text](url) syntax for links. For internal documentation pages, use root-relative paths (including the full folder path) to ensure optimal loading performance. Avoid relative paths like ../text as they may result in slower page loads.
    [External Link](https://google.com)
    [Internal Page Link](/writing-content/text)
  9. Add images using Markdown syntax

    You can add images to your documentation using standard Markdown syntax. Note that image files must be smaller than 5MB. For larger files, host the image on a service like Cloudinary or S3 and use the external URL.
    ![title](/path/image.jpg)
  10. Install and run Mintlify locally

    To preview documentation changes locally, you must have Node.js version 19 or higher installed. Ensure you have migrated to docs.json and deleted any legacy mint.json files before proceeding. After installing the CLI globally, navigate to the directory containing your docs.json file and start the development server.
    # Install via npm
    npm i -g mintlify
    
    # OR install via yarn
    yarn global add mintlify
    
    # Run the development server
    mintlify dev
  11. Create reusable components in snippets

    Create a reusable component by exporting an arrow function from a file in the snippets directory. Note that MDX does not compile inside the body of an arrow function; you must use HTML syntax or use a default export if MDX is required.
    // snippets/custom-component.mdx
    export const MyComponent = ({ title }) => (
      <div>
        <h1>{title}</h1>
        <p>... snippet content ...</p>
      </div>
    );
    // destination-file.mdx
    import { MyComponent } from '/snippets/custom-component.mdx';
    
    <MyComponent title={'Custom title'} />
  12. Export and reuse variables across documentation pages

    You can export constants (strings, objects, etc.) from a file in the snippets directory and import them into other MDX files to maintain consistent values across your documentation.
    // snippets/path/to/custom-variables.mdx
    export const myName = 'my name';
    export const myObject = { fruit: 'strawberries' };
    // destination-file.mdx
    import { myName, myObject } from '/snippets/path/to/custom-variables.mdx';
    
    Hello, my name is {myName} and I like {myObject.fruit}.