express-openapi-validator icon indicating copy to clipboard operation
express-openapi-validator copied to clipboard

enhance SchemaObject type for composition types

Open uwinkelvos opened this issue 3 years ago • 3 comments

Composition types (allOf, anyOf, oneOf and not) are valid SchemaObjects according to the spec, but right now anything without type could not be assigned as a schema.

uwinkelvos avatar Jan 17 '22 23:01 uwinkelvos

Hey @cdimascio! First of all thanks for all your work here! We use express-openapi-validator with .ts schema files and realized the typing of some schema objects is not correct. So this typing only change will solve this problem. Would be nice to get this into a next release! Thanks a lot!

uwinkelvos avatar Jan 19 '22 13:01 uwinkelvos

Hey @cdimascio: Could you find the time to have a quick look at this change? It's just typing level with no runtime code change and would spare typescript users a lot of insecure and redundant type assertions.

uwinkelvos avatar Apr 27 '22 07:04 uwinkelvos

Hey @cdimascio! I updated my branch, status checks pass. Is there anything else I can do?

uwinkelvos avatar May 30 '22 13:05 uwinkelvos

Hey @cdimascio, any thoughts about this?

uwinkelvos avatar Nov 08 '22 09:11 uwinkelvos

Hey @cdimascio: New year next try! ;)

uwinkelvos avatar Jan 06 '23 14:01 uwinkelvos

Will roll a new version soon

cdimascio avatar Jan 07 '23 02:01 cdimascio

available in v.5.0.1

cdimascio avatar Jan 09 '23 00:01 cdimascio

Thanks a lot! This fixes quite some cases where we had to "unknown-assert" parts of the schema before! :)

uwinkelvos avatar Jan 09 '23 11:01 uwinkelvos