Skip to content
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

Creates ADR with conventions for zod schemas #8824

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Conversation

Rotorsoft
Copy link
Contributor

@Rotorsoft Rotorsoft commented Aug 12, 2024

Link to Issue

Closes: #8823

Description of Changes

  • Adds new ADR

Next Steps

  • Once this is approved, we'll create a new cleanup bucket to enforce these conventions

Copy link
Contributor

@rbennettcw rbennettcw left a comment

Choose a reason for hiding this comment

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

I think it's not a bad idea to have an alias type for the timestamps, e.g. TIMESTAMP_DATE that reduces the cognitive load of needing to remember the pattern + provides flexibility to change/refine the type in the future for whatever quirks may arise

@Rotorsoft
Copy link
Contributor Author

I think it's not a bad idea to have an alias type for the timestamps, e.g. TIMESTAMP_DATE that reduces the cognitive load of needing to remember the pattern + provides flexibility to change/refine the type in the future for whatever quirks may arise

We had zDate, but I don't think it adds a lot of value by just coercing to date... probably better to remember to coerce all dates explicitly in the schemas.

PG_INT is different because it enforces PG integer limits

@Rotorsoft Rotorsoft merged commit b829808 into master Aug 12, 2024
9 checks passed
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.

Create ADR for Zod entity definition conventions
3 participants