From 3e58c6a2b08ea9d55f5e1b626abcb151fcccc50f Mon Sep 17 00:00:00 2001 From: subomi Date: Wed, 15 Oct 2025 03:37:58 +0100 Subject: [PATCH] docs: add the available options for the output types for the openapi diff cmd --- cmd/openapi/openapi.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/openapi/openapi.go b/cmd/openapi/openapi.go index 8ac9782b8..d73c14c0f 100644 --- a/cmd/openapi/openapi.go +++ b/cmd/openapi/openapi.go @@ -3,10 +3,11 @@ package openapi import ( "context" "fmt" - "github.com/speakeasy-api/speakeasy/cmd/lint" "os" "strings" + "github.com/speakeasy-api/speakeasy/cmd/lint" + "github.com/pb33f/openapi-changes/tui" "github.com/pkg/errors" "github.com/speakeasy-api/sdk-gen-config/workflow" @@ -22,6 +23,8 @@ import ( const openapiLong = "# OpenAPI \n The `openapi` command provides a set of commands for visualizing, linting and transforming OpenAPI documents." +var outputTypes = []string{"summary", "console", "html"} + var OpenAPICmd = &model.CommandGroup{ Usage: "openapi", Short: "Utilities for working with OpenAPI documents", @@ -75,8 +78,8 @@ var openapiDiffCmd = model.ExecutableCommand[OpenAPIDiffFlags]{ flag.EnumFlag{ Name: "format", Shorthand: "f", - Description: "output format", - AllowedValues: []string{"summary", "console", "html"}, + Description: fmt.Sprintf("output format (available options: %s)", outputTypes), + AllowedValues: outputTypes, DefaultValue: "summary", }, },