icerockdev / moko-network

Network components with codegeneration of rest api for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
151 stars 29 forks source link

Add support for decimal string format to generator #96

Closed Tetraquark closed 3 years ago

Tetraquark commented 3 years ago

Now if openapi config has property like this:

amount:
  title: Amount
  type: string
  format: decimal

Then the class with this property will be generated with error:

@SerialName("amount")
val amount: java.math.BigDecimal // can't import java in common code
Alex009 commented 3 years ago

will generate BigNum type from https://korlibs.soywiz.com/kbignum/

Alex009 commented 3 years ago

will be available in 0.12.0