swagger-api / swagger-api/swagger-codegen

[JAVA] Add possibility to use `java.math` number types

Open
#5,591 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Java General: Suggestion Server: Java
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Using float and double primitive types (or their respective wrapper classes) sometime leads to precision problems. Could it be useful to be able to easily map integer and number Swagger types to BigInteger and BigDecimal Java types?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names Java code generation but no files, tests, or entry points. Start by locating the Java generator's type-mapping logic and related templates, then determine how Swagger integer and number types should map to BigInteger and BigDecimal and verify generated output for both mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.