{
  "id": "openapi",
  "name": "OpenAPI CLI",
  "homepage": "https://github.com/speakeasy-api/openapi",
  "description": "A set of packages and tools for working with OpenAPI Specification documents.",
  "executables": [
    "openapi"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.openapi/lint.yaml"
    ],
    "exclude": [],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "OpenAPI CLI",
    "description": "Validate, lint or bundle an OpenAPI specification. Overlays, Arazzo workflows, sanitize, optimize, join and the other spec commands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "spec",
          "validate"
        ],
        "label": "Validate a specification",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/speakeasy-api/openapi/blob/main/cmd/openapi/commands/openapi/README.md",
            "revision": "2026-10",
            "evidence": "# Validate a specification file\nopenapi spec validate ./spec.yaml\n# Validate with verbose output\nopenapi spec validate -v ./spec.yaml\n"
          }
        ],
        "field": [
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "spec",
            "label": "Specification",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "validate",
            "label": "Validate",
            "fields": [
              "spec",
              "verbose"
            ],
            "required": [
              "spec"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "spec",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "spec",
          "lint"
        ],
        "label": "Lint a specification",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/speakeasy-api/openapi/blob/main/cmd/openapi/commands/openapi/README.md",
            "revision": "2026-10",
            "evidence": "openapi spec lint ./spec.yaml\nopenapi spec lint -f json ./spec.yaml\nopenapi spec lint -c ./lint.yaml ./spec.yaml\nopenapi spec lint -d rule-id-1 -d rule-id-2 ./spec.yaml\nopenapi spec lint --fix ./spec.yaml\nopenapi spec lint --fix-interactive --dry-run ./spec.yaml\n| `--format`          | `-f`  | Output format: `text` (default) or `json` |\n| `--config`          | `-c`  | Path to lint configuration file |\n| `--ruleset`         | `-r`  | Ruleset to use (default: `all`) |\n| `--disable`         | `-d`  | Rules to disable (can be specified multiple times) |\n| `--summary`         |       | Print a per-rule summary table of findings |\n| `--fix`             |       | Automatically apply non-interactive fixes and write back |\n| `--dry-run`         |       | Show what fixes would be applied without changing the file (requires `--fix` or `--fix-interactive`) |\n"
          }
        ],
        "field": [
          {
            "id": "format",
            "label": "Output format",
            "type": "enum",
            "option": [
              "--format",
              "-f"
            ],
            "choices": [
              {
                "value": "text",
                "label": "Text"
              },
              {
                "value": "json",
                "label": "JSON"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "config",
            "label": "Lint configuration",
            "type": "path",
            "option": [
              "--config",
              "-c"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "ruleset",
            "label": "Ruleset",
            "description": "Default is all.",
            "type": "string",
            "option": [
              "--ruleset",
              "-r"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "disable",
            "label": "Disabled rules",
            "type": "string",
            "option": [
              "--disable",
              "-d"
            ],
            "multiple": true,
            "sources": [
              "readme"
            ]
          },
          {
            "id": "summary",
            "label": "Per-rule summary",
            "type": "boolean",
            "option": [
              "--summary"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "fix",
            "label": "Apply fixes in place",
            "description": "Writes the non-interactive fixes back to the specification file.",
            "type": "boolean",
            "option": [
              "--fix"
            ],
            "effect": "overwrite",
            "sources": [
              "readme"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "description": "Only meaningful together with --fix.",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "spec",
            "label": "Specification",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "lint",
            "label": "Lint",
            "fields": [
              "spec",
              "format",
              "config",
              "disable"
            ],
            "required": [
              "spec"
            ]
          },
          {
            "id": "fix_preview",
            "label": "Preview fixes",
            "fields": [
              "spec",
              "fix",
              "dry_run"
            ],
            "required": [
              "spec"
            ],
            "set": {
              "fix": [
                true
              ],
              "dry_run": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "spec",
              "format",
              "config",
              "disable",
              "summary"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "ruleset",
              "fix",
              "dry_run"
            ]
          }
        ]
      },
      {
        "path": [
          "spec",
          "bundle"
        ],
        "label": "Bundle external references",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://github.com/speakeasy-api/openapi/blob/main/cmd/openapi/commands/openapi/README.md",
            "revision": "2026-10",
            "evidence": "# Bundle to specific file with filepath naming (default)\nopenapi spec bundle ./spec.yaml ./bundled-spec.yaml\n# Bundle in-place with counter naming\nopenapi spec bundle -w --naming counter ./spec.yaml\n# Bundle with filepath naming (explicit)\nopenapi spec bundle --naming filepath ./spec.yaml ./bundled.yaml\n- `filepath` (default): Uses file path-based naming like `external_api_yaml__User` for conflicts\n- `counter`: Uses counter-based suffixes like `User_1`, `User_2` for conflicts\n"
          }
        ],
        "field": [
          {
            "id": "write",
            "label": "Rewrite the input file in place",
            "type": "boolean",
            "option": [
              "-w"
            ],
            "effect": "overwrite",
            "sources": [
              "readme"
            ]
          },
          {
            "id": "naming",
            "label": "Naming strategy",
            "type": "enum",
            "option": [
              "--naming"
            ],
            "choices": [
              {
                "value": "filepath",
                "label": "File path (default)"
              },
              {
                "value": "counter",
                "label": "Counter"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "spec",
            "label": "Specification",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "output",
            "label": "Output file",
            "description": "Omit to print to stdout.",
            "type": "path",
            "position": 1,
            "path": {
              "kind": "file",
              "role": "output"
            },
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "bundle",
            "label": "Bundle to a file",
            "fields": [
              "spec",
              "output",
              "naming"
            ],
            "required": [
              "spec",
              "output"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "spec",
              "output",
              "naming",
              "write"
            ]
          }
        ]
      }
    ]
  }
}
