mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 14:14:56 +03:00
change decimal places description
This commit is contained in:
parent
d761b8f7a2
commit
b83a972b4a
|
@ -362,7 +362,7 @@ describe('Utils', () => {
|
|||
|
||||
it('should have a humanized constraint when multipleOf is set, and it is in format of /^0\\.0*1$/', () => {
|
||||
expect(humanizeConstraints(itemConstraintSchema(undefined, undefined, 0.01))).toContain(
|
||||
'decimals <= 2 digits',
|
||||
'decimal places <= 2',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -374,9 +374,9 @@ function humanizeMultipleOfConstraint(multipleOf: number | undefined): string |
|
|||
}
|
||||
const strigifiedMultipleOf = multipleOf.toString(10);
|
||||
if (!/^0\.0*1$/.test(strigifiedMultipleOf)) {
|
||||
return `multiple of ${multipleOf}`;
|
||||
return `multiple of ${strigifiedMultipleOf}`;
|
||||
}
|
||||
return `decimals <= ${strigifiedMultipleOf.split('.')[1].length} digits`;
|
||||
return `decimal places <= ${strigifiedMultipleOf.split('.')[1].length} digits`;
|
||||
}
|
||||
|
||||
function humanizeRangeConstraint(
|
||||
|
|
Loading…
Reference in New Issue
Block a user