docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
Schema minimums of 0 are not rendered
Describe the bug
A schema that has a minimum value of 0 is not rendered
Expected behavior
You should see Possible values: [>= 0]
Current behavior
Only non-zero minimums are rendered.
Possible solution
Smells like a truthiness bug.
Steps to reproduce
Add this to any object schema:
minmax:
type: number
example: 15
minimum: 0
maximum: 50
Only the maximum will render Possible values: [<= 50]
Your Environment
"@docusaurus/core": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"docusaurus-plugin-openapi-docs": "^2.0.0-beta.3",
"docusaurus-theme-openapi-docs": "^2.0.0-beta.3",
Reported on multiple browsers.
I think that's the same issue than here : https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/724 I didn't saw the issue when I created mine ...
I provided a MR to fix this, eventually it will also fix the minimum too.
#754 should have addressed this