Skip to content

value for multipleOf #364

Closed Answered by CarstenWickner
AleksanderBialik asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @AleksanderBialik,

Generally, yes. In the schema generator, the multipleOf value is treated as a BigDecimal, i.e., you can explicitly set the scale (number of decimal digits).
Unfortunately, on the swagger @Schema annotation, the multipleOf parameter is of type double which has this precision problem.

Short-term, you could basically re-implement the configuration with your desired precision:


Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AleksanderBialik
Comment options

@CarstenWickner
Comment options

Answer selected by AleksanderBialik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants