Mermaid Chart: diagrams and charts

Mermaid Chart: diagrams and charts · Actions GPT

Mermaid Chart

  • GET /rest-api/chatgpt/render-diagramAccepts a Mermaid diagram, processes it to create a visual representation, and provides a link to access the generated image.
  • GET /rest-api/chatgpt/mermaid@11.4.0/docs/config/{file}Get common configuration options that apply to multiple diagram types

    The `file` parameter should be one of the following: - `math.md`: Explains how to use KaTeX math in diagrams (and which diagrams support it). - `looks-and-themes.md`: Explains the various looks and themes that can change how a diagram is rendered.

  • GET /rest-api/chatgpt/mermaid@11.4.0/docs/syntax/{file}Get the syntax documentation for a specific diagram type
Schéma original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "Mermaid Chart",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://mermaidchart.com"
    }
  ],
  "components": {
    "schemas": {},
    "securitySchemes": {
      "CHATGPT_BASIC_AUTH_LOGIN": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "paths": {
    "/rest-api/chatgpt/render-diagram": {
      "get": {
        "operationId": "render_diagram",
        "security": [
          {
            "CHATGPT_BASIC_AUTH_LOGIN": []
          },
          {}
        ],
        "tags": [
          "chatgpt"
        ],
        "summary": "Accepts a Mermaid diagram, processes it to create a visual representation, and provides a link to access the generated image.",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "description": "The code of the Mermaid Diagram to render"
            },
            "examples": {
              "flowchart": {
                "value": "flowchart TB\\n  A[\\\"Square Rect\\\"] -- \\\"Link text\\\" --> B((\\\"Circle\\\"))\\n  A --> C(\\\"Round Rect\\\")\\n  B --> D{\\\"Rhombus\\\"}\\n  C --> D"
              },
              "mindmap": {
                "value": "mindmap\\n  root((\"mindmap\"))\\n    cloud)\"Origins\")\\n      Long history\\n      Popularisation\\n        British popular psychology author Tony Buzan\\n    Research\\n      On effectivness<br/>and features\\n    Tools\\n      Pen and paper\\n      Mermaid"
              },
              "timeline": {
                "value": "timeline\\n    title Timeline of Industrial Revolution\\n    section 17th-20th century\\n        Industry 1.0 : Machinery\\n        Industry 2.0 : Electricity\\n        Industry 3.0 : Electronics, Computers\\n    section 21st century\\n        Industry 4.0 : Internet, Robotics"
              }
            },
            "name": "mermaidCode",
            "in": "query",
            "allowReserved": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "diagram": {
                      "type": "object",
                      "properties": {
                        "diagramUrl": {
                          "description": "URL to the generated diagram at Mermaid Chart",
                          "type": "string"
                        },
                        "linkToMermaidChartEditor": {
                          "type": "string",
                          "description": "Link to the online editor at Mermaid Chart for modifying the diagram"
                        },
                        "linkToMermaidChart": {
                          "type": "string",
                          "description": "Link to the Mermaid Chart website"
                        },
                        "errorMessage": {
                          "description": "Something went wrong when generated the diagram",
                          "type": "string"
                        }
                      },
                      "required": [
                        "diagramUrl",
                        "linkToMermaidChart"
                      ]
                    }
                  },
                  "required": [
                    "diagram"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW_Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/rest-api/chatgpt/mermaid@11.4.0/docs/config/{file}": {
      "get": {
        "operationId": "get_config_docs",
        "tags": [
          "chatgpt"
        ],
        "summary": "Get common configuration options that apply to multiple diagram types",
        "description": "The `file` parameter should be one of the following:\n- `math.md`: Explains how to use KaTeX math in diagrams (and which diagrams support it).\n- `looks-and-themes.md`: Explains the various looks and themes that can change how a diagram is rendered.\n",
        "parameters": [
          {
            "name": "file",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "math.md",
                "looks-and-themes.md"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The given configuration file",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/rest-api/chatgpt/mermaid@11.4.0/docs/syntax/{file}": {
      "get": {
        "operationId": "get_syntax_docs",
        "tags": [
          "chatgpt"
        ],
        "summary": "Get the syntax documentation for a specific diagram type",
        "parameters": [
          {
            "name": "file",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The filename of the diagram type.\n\nAvailable diagram types:\n- `architecture.md`: Cloud/CI/CD Architecture Diagram\n- `block.md`: Block Diagram\n- `c4.md`: C4 Diagram\n- `classDiagram.md`: Class Diagram\n- `entityRelationshipDiagram.md`: Entity Relationship Diagram\n- `flowchart.md`: Flowchart\n- `gantt.md`: Gantt Chart\n- `gitgraph.md`: Git Graph Diagram\n- `kanban.md`: Kanban Diagram\n- `mindmap.md`: Mindmap\n- `pie.md`: Pie Chart\n- `quadrantChart.md`: Quadrant Chart\n- `requirementDiagram.md`: Requirement Diagram\n- `sankey.md`: Sankey Diagram\n- `sequenceDiagram.md`: Sequence Diagram\n- `stateDiagram.md`: State Diagram\n- `timeline.md`: Timeline\n- `userJourney.md`: User Journey Diagram\n- `xyChart.md`: XY Chart\n",
              "enum": [
                "architecture.md",
                "block.md",
                "c4.md",
                "classDiagram.md",
                "entityRelationshipDiagram.md",
                "flowchart.md",
                "gantt.md",
                "gitgraph.md",
                "kanban.md",
                "mindmap.md",
                "pie.md",
                "quadrantChart.md",
                "requirementDiagram.md",
                "sankey.md",
                "sequenceDiagram.md",
                "stateDiagram.md",
                "timeline.md",
                "userJourney.md",
                "xyChart.md"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The markdown file for the requested diagram type",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}