xddq / schema2typebox

Creating TypeBox code from JSON schemas
MIT License
66 stars 15 forks source link

feature: parse {} as UnknownSchema #51

Closed FosterSamuel closed 5 months ago

FosterSamuel commented 5 months ago

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.