yarax / swagger-to-graphql

Swagger to GraphQL API adapter
MIT License
924 stars 150 forks source link

Swagger arrays with specified type should not return nulls #110

Closed kamilchm closed 5 years ago

kamilchm commented 5 years ago

Isn't null an invalid item in a array?

0xR commented 5 years ago

OpenAPI does not have a nullable field, therefore the safe assumption is that the elements in an array are nullable.

OTOH, in most cases nonnullable is a safe assumption.