SwagGen icon indicating copy to clipboard operation
SwagGen copied to clipboard

Object field

Open movilitero opened this issue 5 years ago • 3 comments

Hello.

I have a definition as Any. As it has its complications i changed it manually to a [String: Any] dictionary. When an int with value 1 or 0 is encoded, its converted into boolean.

Best regards

movilitero avatar Mar 12 '20 12:03 movilitero

I will need more context to help you @movilitero

mackoj avatar Mar 19 '20 02:03 mackoj

if you have a type: object it will be translated as [String: Any]. If you add ["MyId": 1] to the dictionary, when you send it it will be sent as MyId: true

movilitero avatar Mar 23 '20 07:03 movilitero

Is this gonna help you ? https://github.com/yonaskolb/SwagGen/pull/229

mackoj avatar Mar 23 '20 17:03 mackoj