Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
  • Loading branch information
fenollp committed Jul 5, 2024
1 parent e1944ed commit bb4fda4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/docs/openapi3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ type Info struct {
func (info Info) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON encoding of Info.

func (info Info) MarshalYAML() (any, error)
func (info *Info) MarshalYAML() (any, error)
MarshalYAML returns the YAML encoding of Info.

func (info *Info) UnmarshalJSON(data []byte) error
Expand Down
4 changes: 2 additions & 2 deletions openapi3/schema_formats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ func TestNumberFormats(t *testing.T) {
}
DefineNumberFormatValidator("lessThan10", NewCallbackValidator(func(value float64) error {
if value >= 10 {
return fmt.Errorf("not less than 10")
return errors.New("not less than 10")
}
return nil
}))
DefineIntegerFormatValidator("odd", NewCallbackValidator(func(value int64) error {
if value%2 == 0 {
return fmt.Errorf("not odd")
return errors.New("not odd")
}
return nil
}))
Expand Down

0 comments on commit bb4fda4

Please sign in to comment.