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

feat(cli): support bytes in the fern definition #5388

Merged
merged 7 commits into from
Dec 11, 2024

Conversation

dsinghvi
Copy link
Member

Description

This PR supports responses that are bytes. The motivation here is to not 1) force users to specify file when they actually return bytes and 2) allow the generators to generate more idiomatic code like returning an ArrayBuffer.

Changes Made

  • Introduced a new union variant for HttpResponseBody as part of IR V54
  • Added a reverse migration (i casted to any bc union visiting is annoying and we know the types will align in a specific case)

Testing

  • Unit tests added/updated
  • Manual testing completed

@dsinghvi dsinghvi force-pushed the dsinghvi/support-bytes-in-the-fern-definition branch from 738a94b to ef8c601 Compare December 11, 2024 18:21
@dsinghvi dsinghvi marked this pull request as ready for review December 11, 2024 18:21
@dsinghvi dsinghvi requested a review from chdeskur as a code owner December 11, 2024 19:58
Copy link

github-actions bot commented Dec 11, 2024

🌿 Preview your docs: https://fern-preview-38514ce8-81cf-4c82-af25-6b7e33427721.docs.buildwithfern.com/learn

@chdeskur
Copy link
Contributor

docs look good to me

@dsinghvi dsinghvi merged commit 710060b into main Dec 11, 2024
10 of 11 checks passed
@dsinghvi dsinghvi deleted the dsinghvi/support-bytes-in-the-fern-definition branch December 11, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants