xddq / schema2typebox

Creating TypeBox code from JSON schemas
MIT License
54 stars 12 forks source link

Feature/rewrite with schema types and parsers #28

Closed xddq closed 10 months ago

xddq commented 10 months ago

Summary

Used the fully types JSONSchema draft v7 types to basically rewrite the logic. Edge cases which were not implemented and/or incorrect were now added. E.g. Type.Union() via list of types for "type" attribute. Or Type.Unknown() for object without properties. Some more tests still should be added, since most cases were caught by typescript type issues rather than the tests.

xddq commented 10 months ago

perhaps the rewrite also fixes some of the issues you faced @pdfowler

Keeping the pr open for a little while, in case you want to check it out