yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
626 stars 147 forks source link

Object field #226

Open movilitero opened 4 years ago

movilitero commented 4 years ago

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

mackoj commented 4 years ago

I will need more context to help you @movilitero

movilitero commented 4 years ago

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

mackoj commented 4 years ago

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