Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefftree committed Jun 20, 2024
1 parent 0d2381b commit bac3cab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ func GenerateOpenAPIV3OneOfSchema(types []string) (oneOf []spec.Schema) {
return
}

// MaybePopulateIntOrString populates the x-int-or-string extension only if
// the oneOf type refers to supporting both an int (integer/number) and string.
func MaybePopulateIntOrString(oneOf []string, ext spec.Extensions) spec.Extensions {
if len(oneOf) != 2 {
return ext
Expand Down

0 comments on commit bac3cab

Please sign in to comment.