Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
qawatake committed Sep 3, 2023
1 parent d620c55 commit 9cb391d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions protoc-gen-openapiv2/internal/genopenapi/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ func (po openapiPathsObject) MarshalYAML() (interface{}, error) {
return pathObjectNode, nil
}

// We can simplify this implementation once the go-yaml bug is resolved. See: https://github.com/go-yaml/yaml/issues/643.
//
// func (pio *openapiPathItemObject) toYAMLNode() (*yaml.Node, error) {
// var node yaml.Node
// if err := node.Encode(pio); err != nil {
// return nil, err
// }
// return &node, nil
// }
func (pio *openapiPathItemObject) toYAMLNode() (*yaml.Node, error) {
var doc yaml.Node
var buf bytes.Buffer
Expand Down

0 comments on commit 9cb391d

Please sign in to comment.