generated from xddq/nodejs-typescript-modern-starter
-
Notifications
You must be signed in to change notification settings - Fork 15
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
feature request: parse Any and Unknown #50
Comments
hey @FosterSamuel thanks for raising this issue and fixing it. I quickly looked over the changes, they are looking good. Feel free to create a PR. It will probably be merged and released in the next couple of days |
xddq
added a commit
that referenced
this issue
Jun 6, 2024
## Summary Parse `{}` in schemas as `Type.Unknown()`. Closes #50. `Type.Any()` and `Type.Unknown()` produce `{}` in schemas. When `{}` was parsed, the unsupported schema error was thrown. Now `{}` is parsed to `Type.Unknown()` without an error. Added test in `parser.spec.ts`, bumped version, and added changelog item. --------- Co-authored-by: Pierre Dahmani <hi@pierre-dev.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Library version: 1.7.4
JSON schema version: draft-07
I am willing to contribute to fix the issue 💚
The current behavior
When parsing schemas with
Any
orUnknown
, an error is thrown. Example:The expected behavior
Parse
innerAny
andinnerUnknown
asType.Unknown
.Maybe this was intentionally avoided? I couldn't find anything in my search of the repo discussing this.
Why does it happen? What/How to fix the issue?
Empty
{}
is not parsed. Branch with fix: FosterSamuel@0af202fContent of minimal json schema file which causes the problem
Click to expand/collapse
The text was updated successfully, but these errors were encountered: