Skip to content

Commit aa8397c

Browse files
authored
chore: add the available options for the output types in openapi diff (#1661)
1 parent 311dd9f commit aa8397c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmd/openapi/openapi.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package openapi
33
import (
44
"context"
55
"fmt"
6-
"github.com/speakeasy-api/speakeasy/cmd/lint"
76
"os"
87
"strings"
98

9+
"github.com/speakeasy-api/speakeasy/cmd/lint"
10+
1011
"github.com/pb33f/openapi-changes/tui"
1112
"github.com/pkg/errors"
1213
"github.com/speakeasy-api/sdk-gen-config/workflow"
@@ -22,6 +23,8 @@ import (
2223

2324
const openapiLong = "# OpenAPI \n The `openapi` command provides a set of commands for visualizing, linting and transforming OpenAPI documents."
2425

26+
var outputTypes = []string{"summary", "console", "html"}
27+
2528
var OpenAPICmd = &model.CommandGroup{
2629
Usage: "openapi",
2730
Short: "Utilities for working with OpenAPI documents",
@@ -75,8 +78,8 @@ var openapiDiffCmd = model.ExecutableCommand[OpenAPIDiffFlags]{
7578
flag.EnumFlag{
7679
Name: "format",
7780
Shorthand: "f",
78-
Description: "output format",
79-
AllowedValues: []string{"summary", "console", "html"},
81+
Description: fmt.Sprintf("output format (available options: %s)", outputTypes),
82+
AllowedValues: outputTypes,
8083
DefaultValue: "summary",
8184
},
8285
},

0 commit comments

Comments
 (0)