Skip to content

Commit

Permalink
add ignore option to README and converter.go
Browse files Browse the repository at this point in the history
  • Loading branch information
dancantos committed Jan 29, 2025
1 parent eb28912 commit 13af607
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ protoc-gen-connect-openapi also has support for the [OpenAPI v3 annotations](htt
| debug | - | Emit debug logs |
| format | `yaml` or `json` | Which format to use for the OpenAPI file, defaults to `yaml`. |
| include-number-enum-values | - | Include number enum values beside the string versions, defaults to only showing strings |
| ignore-googleapi-http | - | Ignore `google.api.http` options on methods when generating openapi specs |
| path | `{filepath}` | Output filepath, defaults to per-protofile output if not given. |
| proto | - | Generate requests/repsonses with the protobuf content type |
| trim-unused-types | - | Remove types that aren't references from any method request or response. |
Expand Down
8 changes: 8 additions & 0 deletions converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ func WithIncludeNumberEnumValues(includeNumberEnumValues bool) Option {
}
}

// WithIgnoreGoogleapiHTTP tells the generator to ignore google.api.http options.
func WithIgnoreGoogleapiHTTP(ignoreGoogleapiHTTP bool) Option {
return func(g *generator) error {
g.options.IgnoreGoogleapiHTTP = ignoreGoogleapiHTTP
return nil
}
}

// WithStreaming sets a file to use as a base for all OpenAPI files.
func WithStreaming(streaming bool) Option {
return func(g *generator) error {
Expand Down

0 comments on commit 13af607

Please sign in to comment.