Skip to content

chore(cli-v2): publish JSON Schema for fern.yml#15487

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1777384192-publish-fern-yml-jsonschema
Open

chore(cli-v2): publish JSON Schema for fern.yml#15487
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1777384192-publish-fern-yml-jsonschema

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Description

Linear ticket: Closes FER-8474

Generate and publish a JSON Schema for fern.yml (CLI v2 config) so that YAML language servers can provide autocomplete and validation in IDEs.

The schema is generated from the Zod FernYmlSchema using Zod v4's toJSONSchema() and committed as fern-yml.schema.json. Once merged, it will be served at https://schema.buildwithfern.dev/fern-yml.json.

The fern init command in CLI v2 already emits the schema reference comment at the top of generated fern.yml files:

# yaml-language-server: $schema=https://schema.buildwithfern.dev/fern-yml.json

Changes Made

  • Added packages/cli/config/scripts/generate-jsonschema.mjs — script that converts the Zod FernYmlSchema to JSON Schema via z.toJSONSchema()
  • Added fern-yml.schema.json to the repo root (generated output, ~6k lines)
  • Added fern-yml:jsonschema npm script and included it in the aggregate jsonschema script in the root package.json
  • Added unreleased changelog entry
  • Updated README.md generator (if applicable)

Testing

  • Verified schema generation produces valid JSON Schema output
  • Verified existing generators-yml.json and fern.json are served from repo root files via schema.buildwithfern.dev — same pattern applies to fern-yml.schema.json
  • Lint (pnpm lint:biome) and format (pnpm format:check) pass cleanly

Link to Devin session: https://app.devin.ai/sessions/1e2aa4f2a4dc4a35bee9141dd9a16888

Generate a JSON Schema from the Zod FernYmlSchema using z.toJSONSchema()
and commit it as fern-yml.schema.json so it can be served at
https://schema.buildwithfern.dev/fern-yml.json for IDE integrations.

- Add packages/cli/config/scripts/generate-jsonschema.mjs
- Add fern-yml:jsonschema script to root package.json
- Include fern-yml:jsonschema in the jsonschema aggregate script
- Add unreleased changelog entry

Co-Authored-By: federico <federico@buildwithfern.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions
Copy link
Copy Markdown
Contributor

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI

How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants