ePages-de / ePages-de/restdocs-api-spec
Add support for communicating BigDecimal scale/precision using multipleOf
- Dominant language
- Kotlin
- Stars
- 427
- Forks
- 116
- Avg merge
- 23h 54m
- Merged PRs (30d)
- 1
Description
I'm producing a JSON schema for a service that needs to communicate the precision of BigDecimal numbers.
This allows client generators to pick the right data type (i.e. not pick a float but a decimal data type).
The `multipleOf` keyword is the right one for this, e.g. https://swagger.io/docs/specification/data-models/data-types/
This is the kind of API spec I want to produce
```
type: number
multipleOf: 0.01
```
I have not found any annotation that I can use right now to do this. Maybe making this similar to [Bean Validation Constraints](https://github.com/ePages-de/restdocs-api-spec?tab=readme-ov-file#documenting-bean-validation-constraints) would be an option.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.