adonis-autoswagger icon indicating copy to clipboard operation
adonis-autoswagger copied to clipboard

feat: double type interface

Open 0xNekr opened this issue 1 year ago • 3 comments

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!

0xNekr avatar Jul 10 '24 18:07 0xNekr

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

ad-on-is avatar Jul 10 '24 18:07 ad-on-is

It's bound to be cleaner!

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

0xNekr avatar Jul 10 '24 18:07 0xNekr

have you started anything yet?

image

yes, I added a comment 4 months ago 🤣

ad-on-is avatar Jul 10 '24 19:07 ad-on-is