SOP Writer Pro

SOP Writer Pro · GPT アクション

Workflow Diagrams

This is an API for generating and returning workflow diagrams for use with custom GPTs.

  • POST /generate-diagram/Generate Diagram
元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "Workflow Diagrams",
    "description": "This is an API for generating and returning workflow diagrams for use with custom GPTs.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://cybrix.ai/workflow_diagrams",
      "description": "Workflow Diagrams"
    }
  ],
  "paths": {
    "/generate-diagram/": {
      "post": {
        "summary": "Generate Diagram",
        "operationId": "generate_diagram_generate_diagram__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "URL of the generated workflow diagram and any warnings",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WorkflowConnection": {
        "properties": {
          "from_id": {
            "type": "string",
            "title": "From Id",
            "description": "The ID of the starting step."
          },
          "to_id": {
            "type": "string",
            "title": "To Id",
            "description": "The ID of the ending step."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Label for the connection."
          },
          "color": {
            "type": "string",
            "title": "Color",
            "description": "Color of the connection.",
            "default": "black"
          },
          "style": {
            "type": "string",
            "title": "Style",
            "description": "Style of the connection (solid, dashed, dotted).",
            "default": "solid"
          },
          "fontsize": {
            "type": "integer",
            "title": "Fontsize",
            "description": "Font size of the connection label.",
            "default": 10
          }
        },
        "type": "object",
        "required": [
          "from_id",
          "to_id"
        ],
        "title": "WorkflowConnection"
      },
      "WorkflowData": {
        "properties": {
          "steps": {
            "items": {
              "$ref": "#/components/schemas/WorkflowStep"
            },
            "type": "array",
            "title": "Steps",
            "description": "List of steps in the workflow.",
            "example": [
              {
                "color": "green",
                "fontcolor": "white",
                "fontsize": 12,
                "id": "start",
                "label": "Start",
                "shape": "ellipse"
              },
              {
                "color": "blue",
                "fontcolor": "white",
                "fontsize": 12,
                "id": "step1",
                "label": "Step 1",
                "shape": "box"
              },
              {
                "color": "orange",
                "fontcolor": "white",
                "fontsize": 12,
                "id": "decision",
                "label": "Decision Point",
                "shape": "diamond"
              },
              {
                "color": "purple",
                "fontcolor": "white",
                "fontsize": 12,
                "id": "optionA",
                "label": "Option A",
                "shape": "box"
              },
              {
                "color": "yellow",
                "fontcolor": "black",
                "fontsize": 12,
                "id": "optionB",
                "label": "Option B",
                "shape": "box"
              },
              {
                "color": "red",
                "fontcolor": "white",
                "fontsize": 12,
                "id": "end",
                "label": "End",
                "shape": "ellipse"
              }
            ]
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/WorkflowConnection"
            },
            "type": "array",
            "title": "Connections",
            "description": "List of connections between steps.",
            "example": [
              {
                "color": "black",
                "fontsize": 10,
                "from_id": "start",
                "label": "Next",
                "style": "solid",
                "to_id": "step1"
              },
              {
                "color": "black",
                "fontsize": 10,
                "from_id": "step1",
                "label": "Evaluate",
                "style": "dotted",
                "to_id": "decision"
              },
              {
                "color": "green",
                "fontsize": 10,
                "from_id": "decision",
                "label": "Yes",
                "style": "solid",
                "to_id": "optionA"
              },
              {
                "color": "red",
                "fontsize": 10,
                "from_id": "decision",
                "label": "No",
                "style": "dashed",
                "to_id": "optionB"
              },
              {
                "color": "black",
                "fontsize": 10,
                "from_id": "optionA",
                "label": "Finish",
                "style": "solid",
                "to_id": "end"
              },
              {
                "color": "black",
                "fontsize": 10,
                "from_id": "optionB",
                "label": "Finish",
                "style": "solid",
                "to_id": "end"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "steps",
          "connections"
        ],
        "title": "WorkflowData"
      },
      "WorkflowStep": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Unique identifier for the step."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Label for the step."
          },
          "shape": {
            "type": "string",
            "title": "Shape",
            "description": "Shape of the step node.",
            "default": "ellipse"
          },
          "color": {
            "type": "string",
            "title": "Color",
            "description": "Color of the step node.",
            "default": "black"
          },
          "fontcolor": {
            "type": "string",
            "title": "Fontcolor",
            "description": "Font color of the step node.",
            "default": "black"
          },
          "fontsize": {
            "type": "integer",
            "title": "Fontsize",
            "description": "Font size of the step label.",
            "default": 12
          },
          "group": {
            "type": "string",
            "title": "Group",
            "description": "Group or cluster for the step."
          }
        },
        "type": "object",
        "required": [
          "id",
          "label"
        ],
        "title": "WorkflowStep"
      }
    }
  }
}