Skip to content

Switch from dataclasses-jsonschema to Pydantic#146

Merged
gjreda merged 6 commits into
mainfrom
136-find-replacement-for-dataclasses-jsonschema
Jun 15, 2023
Merged

Switch from dataclasses-jsonschema to Pydantic#146
gjreda merged 6 commits into
mainfrom
136-find-replacement-for-dataclasses-jsonschema

Conversation

@gjreda

@gjreda gjreda commented Jun 12, 2023

Copy link
Copy Markdown
Collaborator

fixes #136

This is a WIP. Figured we might as well do it now when we don't have many types as it seems fairly straightforward.

@danvk danvk marked this pull request as ready for review June 15, 2023 16:18
@gjreda gjreda requested review from cguedes, danvk and sehyod June 15, 2023 16:22

@danvk danvk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gjreda this looks good to me and the tests are all passing. Do you want to take a pass over my changes (and merge conflict resolution) before we merge?

Comment thread src/api/types.ts
export type Text1 = string;
export type Rewrite = RewriteChoice[];
export type Index1 = number;
export type Text2 = string;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't great — it's certainly not how you'd write the TypeScript types if you were writing them by hand. But it's not wrong, and we can work with it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this as well. I'm happy to change field names here on my end if it'd make the TS side nicer for y'all.

@gjreda gjreda merged commit f8a75ed into main Jun 15, 2023
@gjreda gjreda deleted the 136-find-replacement-for-dataclasses-jsonschema branch June 15, 2023 16:36
@gjreda gjreda mentioned this pull request Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find replacement for dataclasses-jsonschema

2 participants