-
Notifications
You must be signed in to change notification settings - Fork 150
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
Use of meta:enum fails when one of the enum values is "enum" #458
Comments
## [7.1.3](v7.1.2...v7.1.3) (2022-11-14) ### Bug Fixes * **markdown-builder:** guard against `enum` being not an array ([aa46ac4](aa46ac4)), closes [#458](#458)
🎉 This issue has been resolved in version 7.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Wow that was FAST! Thanks a lot. Works fine for me now (as already proven by your tests)! |
That one was easy, thanks to the test provided and the fact that there is an underlying systematic bug that causes jsonschema2md to trip up when JSON Schema keywords are used in unexpected places. I've fixed similar bugs before, so there wasn't much discovery involved. Thanks for reporting! |
Expected Behaviour
Using "meta:enum" to provide a map with descriptions of enum values should work for all possible values also the value "enum".
My guess is that the schema parser mistakes the "enum" map key for an actual "enum" JSON Schema keyword.
E.g. following example should work:
Actual Behaviour
Generation fails with the following error:
Reproduce Scenario (including but not limited to)
Add a "meta:enum" description for an enum value with the actual value "enum".
Platform and Version
Node.js v19.0.1, "@adobe/jsonschema2md": "~7.1.2"
The text was updated successfully, but these errors were encountered: