Skip to content

feat(cli): add 'fern export' command #7586

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

Merged
merged 15 commits into from
Jun 23, 2025
Merged

feat(cli): add 'fern export' command #7586

merged 15 commits into from
Jun 23, 2025

Conversation

zachkirsch
Copy link
Collaborator

@zachkirsch zachkirsch commented Jun 22, 2025

Description

Add fern export command, which exports a fern definition into an openapi spec.

In a future PR, I'll update this to include x-fern- extensions, which will help us transition our Fern Definition to overrides.yml.

Changes Made

  • Add CLI command fern export, which converts API -> IR -> OpenAPI spec
  • The IR -> OpenAPI logic is copy-pasted from the openapi generator

Testing

  • Added ETE test with snapshot

…ces.ts

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Copy link
Member

@dsinghvi dsinghvi left a comment

Choose a reason for hiding this comment

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

@zachkirsch looks great to me -- can you add this as a changelog here https://github.com/fern-api/fern/blob/main/packages/cli/cli/versions.yml

Copy link

github-actions bot commented Jun 23, 2025

@zachkirsch
Copy link
Collaborator Author

Updated docs.

SDK Generation Commands -> Generation Commands:

Screenshot 2025-06-23 at 12 18 52 PM

Add section for fern export:

Screenshot 2025-06-23 at 12 18 46 PM

Set max-toc-depth: 3:

Screenshot 2025-06-23 at 12 19 50 PM

@dsinghvi dsinghvi merged commit d3a6f80 into main Jun 23, 2025
21 checks passed
@dsinghvi dsinghvi deleted the zk/cli-export-command branch June 23, 2025 19:27
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