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

[BUG] A field defined with type as number, format: int32 is generated as a Double field by the Kotlin Generator. #2110

Closed
2 tasks done
gitankit7 opened this issue Oct 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gitankit7
Copy link
Contributor

Describe the bug.

        durationInMonths:
          type:
            - number
            - 'null'
          example: 36
          format: int32
          description: Duration of contract in months

When the Kotlin generator is run on this, the field generated is of type Double.

val durationInMonths: Double? = null,

Expected behavior

The field should ideally be an Integer

val durationInMonths: Int? = null,

Screenshots

Screenshot 2024-10-23 at 11 22 42 AM Screenshot 2024-10-23 at 11 22 50 AM

How to Reproduce

  1. Have a yml file with type as number
  2. Run the kotlin generator
  3. you will get the type of field as Double

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

@gitankit7 gitankit7 added the bug Something isn't working label Oct 23, 2024
@gitankit7
Copy link
Contributor Author

Wrong issue reported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant