Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 2.28 KB

File metadata and controls

48 lines (37 loc) · 2.28 KB

OpenApiTools Documentation

A dotnet global tool for managing and interacting with OpenAPI (Swagger) JSON and YAML documents.

Commands

Command Description
help Shows help for the application or a specific command
validate Validates an OpenAPI document against the specification
convert Converts an OpenAPI document between JSON and YAML
discover Recursively scans a directory and identifies OpenAPI documents
endpoints Lists all endpoints (paths and operations) in a document
stats Shows overview statistics for a document
search Fuzzy searches endpoints, schemas, and other components
describe endpoint Describes a specific endpoint in detail
describe schema Describes a specific schema in detail
unused Finds unused/orphaned components
lint Lints a document against a configurable ruleset
diff Diffs two documents and identifies breaking changes
resolve Resolves all $ref references into a single document
split Splits a monolithic document into multiple component files
merge Merges multiple documents into a single unified specification

Installation

dotnet tool install --global DanielGSmith.OpenApiTools --add-source https://nuget.pkg.github.com/danielgsmith/index.json

Output Formats

Several commands support multiple output formats via --format:

Format Description
table Rich console table with colors (default)
json Indented JSON, suitable for piping to jq
yaml YAML, suitable for piping to yq
plain Tab-separated values, suitable for grep/awk

All commands that produce output also support -o/--output to write results to a file instead of stdout. When writing tables to a file, ANSI color codes are stripped automatically.

Running in Development

dotnet run --project src/OpenApiTools/OpenApiTools.csproj -- <command> [options]