kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
892 stars 235 forks source link

openapi-request-validator: fix: nullability for allOf, anyOf, oneOf #679

Closed mastodon0 closed 4 years ago

mastodon0 commented 4 years ago

nullable: true validation didn't work on schemas like { nullable: true, allOf: [{ type: 'string' }] } because there was no type-property.

This change handles allOf, anyOf, oneOf. Please see the added tests that would fail to validate the requests on null-values.

jsdevel commented 4 years ago

thank you!

npdev453 commented 3 years ago

@jsdevel why that fix are not publicated?

jsdevel commented 3 years ago

@npdev453 it should be. please open apr

npdev453 commented 3 years ago

@jsdevel, sorry, missed that there are two packages with simmilar names.

I repeated this changes for openapi-response-validator package: https://github.com/kogosoftwarellc/open-api/pull/707

But in my mind perfectly it should be replaced by one shared library function call.