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

feat: double type interface #109

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

0xNekr
Copy link
Contributor

@0xNekr 0xNekr commented Jul 10, 2024

Good evening,

I've made a modification to the way double types are handled, in particular with the null.

I have an interface with several string | null or number | null fields.

and the swagger handled example and schema by returning :

field: {},

What's more, the schema didn't handle the nullable.

So I made the changes to default to the first type specified for the example, and to specify nullable correctly if one of the types is null.

I don't know if this is the best way to do it, so I'll wait for your feedback!

@ad-on-is
Copy link
Owner

I'm planing on implementing the oneOf functionality based on the swagger specs.

If you're motivated, you can help me out. This would be cleaner imho

@0xNekr
Copy link
Contributor Author

0xNekr commented Jul 10, 2024

It's bound to be cleaner!

I'll do what I can with the time I have, have you started anything yet?

@ad-on-is
Copy link
Owner

have you started anything yet?

image

yes, I added a comment 4 months ago 🤣

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.

2 participants