-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of non-string default values #436
Conversation
Size Change: +123 B (0%) Total Size: 6.2 MB
ℹ️ View Unchanged
|
Visit the preview URL for this PR (updated for commit 4cec991): https://docusaurus-openapi-36b86--pr436-9hdyr5l6.web.app (expires Sat, 18 Mar 2023 14:06:51 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
It looks like an alternative solution would be to improve the docusaurus-openapi-docs/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts Line 27 in 0ded7f0
value != undefined (which also includes null if you use == ) or something like that?
|
Yes, I think that can also be improved - at least, it handles the |
ac92829
to
04c6cc0
Compare
* Improve handling of non-string default values (#436) * Point to test spec * Add utility for casting to string * More explicitly check for undefined and add code comments to toString() * Revert back to demo petstore spec * Update deploy-preview.yml * Update validate.yaml * Update codeql-analysis.yml
Description
Addresses #432
Adds utility for converting/casting various data types to
String
:undefined
ornull
will returnundefined
Array
will be joined to a formatted stringString