-
-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema.markSchemaErrorKey()
disposes of oneOf
context
#940
Comments
jordan-wu-97
added a commit
to jordan-wu-97/kin-openapi
that referenced
this issue
Apr 15, 2024
jordan-wu-97
added a commit
to jordan-wu-97/kin-openapi
that referenced
this issue
Apr 15, 2024
jordan-wu-97
added a commit
to jordan-wu-97/kin-openapi
that referenced
this issue
Apr 15, 2024
jordan-wu-97
added a commit
to jordan-wu-97/kin-openapi
that referenced
this issue
Apr 16, 2024
fenollp
pushed a commit
that referenced
this issue
Apr 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oneOf
validation provides a good reason ofvalue doesn't match any schema from "oneOf"
kin-openapi/openapi3/schema.go
Lines 1380 to 1381 in 9dbb4c3
However, the function
markSchemaErrorKey
unwraps theOrigin
toerr
, resulting in the original error containing theoneOf
context being lost (line 2125)kin-openapi/openapi3/schema.go
Lines 2121 to 2139 in 9dbb4c3
Example:
Output:
We lost the error message describing that
foo
must be oneOf the schemasThe text was updated successfully, but these errors were encountered: