You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found issues with OpenApiSpex.Schema.example/1 when allOf/anyOf/oneOf fields are involved. Produced examples do not even pass validation/casting.
Looking at source code the source code of example/1, if it inputs a schema with one of these fields, it handles just one of them and ignores all other fields.
Hi, first of all, thanks for this great library!
I've found issues with
OpenApiSpex.Schema.example/1
whenallOf
/anyOf
/oneOf
fields are involved. Produced examples do not even pass validation/casting.Looking at source code the source code of
example/1
, if it inputs a schema with one of these fields, it handles just one of them and ignores all other fields.Here are two examples.
If I understand it correctly, this schema should describe an object that has both
a
andb
and eitherc
ord
. Butexample/1
return just a map withc
.Similar goes for the second example.
This schema should describe an object with all three keys
a
,b
, andc
. However,example/1
return just a map witha
andb
.The text was updated successfully, but these errors were encountered: