OneOfConverter validator in array. #183
Labels
bug
Something isn't working
good first issue
Good for newcomers
swagger-generation
Concerns automatic swagger generation
Given the following schema:
Swagger-generator is producing the following output:
the problem here is that the
enum
property should be insideitems
, since enum (as defined in json schema) have the following defined behaviour: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.1.2 that is to limit the possible values to those listed in its associated value.If we were to have the enum property at the same level as we have the type array, we would need for this example to have this infinite array (and that's why we should instead place it inside items):
The text was updated successfully, but these errors were encountered: