How can I specify how many digitis is allowed for decimal part by using OAS 3.0/Redoc?
decimal(10,2) or NUMBER(10,2) means total length is 10 digits but out of 10 digits 2 digits are for decimal part. So the final allowed number will be 8 digits for integral part and 2 digits for fractional part.
type: number
multipleOf: 0.01
If I use mutipleOf it is not visible in the Redoc Document.
required:
- name
properties:
name:
type: string
tag:
multipleOf: 0.01
minimum: 0
type: number

Well, this is already a ReDoc "issue".
EDIT
It's pretty easy to add to ReDoc, somewhere in this function.
The question is what should it display ( '* 0.01' for example ? ).
That is a good question. Something like decimals<= 2 digits.
or * 0.01
well, decimal 2 digits won't work, as you could also give multipleOf: 0.02 for example or even multipleOf: 2. Ie. this has other use cases also.
@RomanHotsiy what is your opinion on this, i can implement it ?
I don't have a good idea of how to display this.
The current working idea is as below:
decimals <= x digits for multipleOf with 0.1, 0.01, 0.001 etc..multiple of x for other casesWhat do you think?
This is not a bad solution, splitting the cases.
I鈥檒l implement something this weekend and we can take it from there.
Most helpful comment
I don't have a good idea of how to display this.
The current working idea is as below:
decimals <= x digitsformultipleOfwith0.1,0.01,0.001etc..multiple of xfor other casesWhat do you think?