Skip to content

Commit

Permalink
openapi3: fix format error when Header marshal to YAML (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Aug 26, 2023
1 parent e27de61 commit 91659ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openapi3/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func (header *Header) UnmarshalJSON(data []byte) error {
return header.Parameter.UnmarshalJSON(data)
}

// MarshalJSON returns the JSON encoding of Header.
func (header Header) MarshalYAML() (interface{}, error) {
return header.Parameter, nil
}

// SerializationMethod returns a header's serialization method.
func (header *Header) SerializationMethod() (*SerializationMethod, error) {
style := header.Style
Expand Down

0 comments on commit 91659ae

Please sign in to comment.