Skip to content

Commit

Permalink
removed redundant default yaml output and adjusted docs to reflect ne…
Browse files Browse the repository at this point in the history
…w output
  • Loading branch information
ehearneRedHat committed May 20, 2024
1 parent 2187ca0 commit f198d40
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ Generate Gateway API resources from an OpenAPI 3.x specification

| Subcommand | Description | Flags |
| ---------- | ------------------------------------------------ | --------------------------------- |
| `httproute`| Generate Gateway API HTTPRoute from OpenAPI 3.0.X| `--oas string` Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). `-o` Output format: 'yaml' or 'json'. Default: yaml |
| `httproute`| Generate Gateway API HTTPRoute from OpenAPI 3.0.X| `--oas string` Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). `-o` Output format: 'yaml' or 'json'. (default "yaml") |

##### `generate kuadrant`

Generate Kuadrant resources from an OpenAPI 3.x specification

| Subcommand | Description | Flags |
| ---------------- | ------------------------------------------------- | --------------------------------- |
| `authpolicy` | Generate a [Kuadrant AuthPolicy](https://docs.kuadrant.io/kuadrant-operator/doc/auth/) from an OpenAPI 3.0.x specification | `--oas string` Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). `-o` Output format: 'yaml' or 'json'. Default: yaml |
| `ratelimitpolicy`| Generate [Kuadrant RateLimitPolicy](https://docs.kuadrant.io/kuadrant-operator/doc/rate-limiting/) from an OpenAPI 3.0.x specification | `--oas string` Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). `-o` Output format: 'yaml' or 'json'. Default: yaml |
| `authpolicy` | Generate a [Kuadrant AuthPolicy](https://docs.kuadrant.io/kuadrant-operator/doc/auth/) from an OpenAPI 3.0.x specification | `--oas string` Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). `-o` Output format: 'yaml' or 'json'. (default "yaml") |
| `ratelimitpolicy`| Generate [Kuadrant RateLimitPolicy](https://docs.kuadrant.io/kuadrant-operator/doc/rate-limiting/) from an OpenAPI 3.0.x specification | `--oas string` Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). `-o` Output format: 'yaml' or 'json'. (default "yaml") |


#### `version`
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate_gatewayapi_httproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func generateGatewayApiHttpRouteCommand() *cobra.Command {

// OpenAPI ref
cmd.Flags().StringVar(&generateGatewayAPIHTTPRouteOAS, "oas", "", "Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required)")
cmd.Flags().StringVarP(&generateGatewayAPIHTTPRouteFormat, "output-format", "o", "yaml", "Output format: 'yaml' or 'json'. Default: yaml")
cmd.Flags().StringVarP(&generateGatewayAPIHTTPRouteFormat, "output-format", "o", "yaml", "Output format: 'yaml' or 'json'.")
err := cmd.MarkFlagRequired("oas")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate_kuadrant_authpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func generateKuadrantAuthPolicyCommand() *cobra.Command {

// OpenAPI ref
cmd.Flags().StringVar(&generateAuthPolicyOAS, "oas", "", "Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required)")
cmd.Flags().StringVarP(&generateAuthPolicyFormat, "output-format", "o", "yaml", "Output format: 'yaml' or 'json'. Default: yaml")
cmd.Flags().StringVarP(&generateAuthPolicyFormat, "output-format", "o", "yaml", "Output format: 'yaml' or 'json'.")
err := cmd.MarkFlagRequired("oas")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate_kuadrant_ratelimitpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func generateKuadrantRateLimitPolicyCommand() *cobra.Command {
}

cmd.Flags().StringVar(&generateRateLimitPolicyOAS, "oas", "", "Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required)")
cmd.Flags().StringVarP(&generateRateLimitPolicyFormat, "output-format", "o", "yaml", "Output format: 'yaml' or 'json'. Default: yaml")
cmd.Flags().StringVarP(&generateRateLimitPolicyFormat, "output-format", "o", "yaml", "Output format: 'yaml' or 'json'.")

if err := cmd.MarkFlagRequired("oas"); err != nil {
fmt.Println("Error setting 'oas' flag as required:", err)
Expand Down
2 changes: 1 addition & 1 deletion doc/generate-gateway-api-httproute.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Usage:
Flags:
-h, --help help for httproute
--oas string Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required)
-o Output format: 'yaml' or 'json'. Default: yaml
-o Output format: 'yaml' or 'json'. (default "yaml")

Global Flags:
-v, --verbose verbose output
Expand Down
2 changes: 1 addition & 1 deletion doc/generate-kuadrant-auth-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Usage:
Flags:
-h, --help help for authpolicy
--oas string Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required)
-o Output format: 'yaml' or 'json'. Default: yaml
-o Output format: 'yaml' or 'json'. (default "yaml")
Global Flags:
-v, --verbose verbose output
Expand Down
2 changes: 1 addition & 1 deletion doc/generate-kuadrant-rate-limit-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Usage:
Flags:
-h, --help help for ratelimitpolicy
--oas string Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required)
-o Output format: 'yaml' or 'json'. Default: yaml
-o Output format: 'yaml' or 'json'. (default "yaml")

Global Flags:
-v, --verbose verbose output
Expand Down

0 comments on commit f198d40

Please sign in to comment.