Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance SchemaObject type for composition types #697

Merged
merged 2 commits into from Jan 7, 2023

Conversation

uwinkelvos
Copy link
Contributor

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.

-  Composition types: allOf, anyOf, oneOf and not are valid SchemaObjects
@uwinkelvos
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@uwinkelvos
Copy link
Contributor Author

Hey @cdimascio, any thoughts about this?

@uwinkelvos
Copy link
Contributor Author

Hey @cdimascio: New year next try! ;)

@cdimascio cdimascio merged commit ca43431 into cdimascio:master Jan 7, 2023
@cdimascio
Copy link
Owner

Will roll a new version soon

@cdimascio
Copy link
Owner

available in v.5.0.1

@uwinkelvos
Copy link
Contributor Author

uwinkelvos commented Jan 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants