-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: generate SQL table schema from JSON Schemas [1/n] #140
Conversation
Now finished and ready for review, but awaiting publishing of new version of Will be stacking other PRs on this, working on #139 |
Squashed commits: [a8267eb] Switch moduleResolution so @digidem/types work [1205a2b] Fixes and add forks [981070a] Add tests and fix accordingly [2dac678] Add tests and fixes [01ac065] add types for brittle [537ff7a] Add project, preset, field schemas [ad186ae] cleanup code and add comments [c23cf09] fix: extract correct schema w/out schemaName param [d8786c8] fix: docId as primary key [36eda92] fix enum type [f0c7eed] Remove db artifact [89468e2] WIP: Generate SQL table schema from JSON Schemas
981070a
to
4da0146
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good! curious about what else to add to the tests, if anything
I think more type tests would be good, but probably make more sense to be end-to-end tests rather than unit-testing just this function. |
TODO: Figure out best way to test types
@@ -0,0 +1,84 @@ | |||
// Types generated from brittle readme with chatgpt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed?
Merged in #149 |
Generate drizzle-orm SQLite table schemas from Mapeo types & JSONSchemas.
(Currently uses unpublished version of
@mapeo/schema
that exports JSONSchemas with expanded $refs)