Skip to content

Commit eba91d9

Browse files
Jamie Tannajamietanna
authored andcommitted
docs: improve error message
Especially now these could be a number of different incompatible types, we should report this to the user.
1 parent 620da6b commit eba91d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/codegen/merge_schemas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func mergeOpenapiSchemas(s1, s2 openapi3.Schema, allOf bool) (openapi3.Schema, e
121121
result.AllOf = append(s1.AllOf, s2.AllOf...)
122122

123123
if s1.Type.Slice() != nil && s2.Type.Slice() != nil && !equalTypes(s1.Type, s2.Type) {
124-
return openapi3.Schema{}, errors.New("can not merge incompatible types")
124+
return openapi3.Schema{}, fmt.Errorf("can not merge incompatible types: %v, %v", s1.Type.Slice(), s2.Type.Slice())
125125
}
126126
result.Type = s1.Type
127127

0 commit comments

Comments
 (0)