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

[gen] newtype aliases #3002

Merged
merged 8 commits into from
Aug 15, 2024
Merged

Conversation

hochgi
Copy link
Contributor

@hochgi hochgi commented Aug 4, 2024

basic implementation.
Aliased types is only supported for primitives in this PR.

fixes #2962
/claim #2962

TODO:

  • make it configurable
  • when opt-out, replace alias with original primitive name
  • add more tests to cover most common scenarios:
    • collections of aliased newtypes
    • collections of un-aliased primitives
    • path aliased newtype params
    • path un-aliased primitive params
    • query aliased newtype params
    • query un-aliased primitive params
  • documentation

Copy link

algora-pbc bot commented Aug 4, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

@jdegoes
Copy link
Member

jdegoes commented Aug 6, 2024

Looks good to me, may want to get @987Nabil to take a quick look too.

@987Nabil
Copy link
Contributor

987Nabil commented Aug 6, 2024

Will do tomorrow. Already too sleepy 😴

@hochgi hochgi force-pushed the http-issue-2962-gen-type-aliases branch from d35cdbe to eb24fd4 Compare August 15, 2024 10:59
@987Nabil 987Nabil merged commit 70fbcd8 into zio:main Aug 15, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gen] add support for type aliases (newtype / opaque type) when generating code from spec
3 participants