Skip to content

Commit d677840

Browse files
devin-ai-integration[bot]fern-api[bot]devalog
authored
docs: add YAML schema validation for product.yml and generators.yml (#3506)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Devin Logan <devinannlogan@gmail.com>
1 parent 30e2c29 commit d677840

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

fern/products/docs/pages/navigation/products.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ You can also define external products, which link to external URLs (separate app
5252
</Folder>
5353
</Files>
5454

55-
<Note>No separate yml file needed for external products</Note>
55+
<Tip>
56+
To enable YAML validation and autocompletion in your editor, add a schema directive to the top of each `product.yml` file.
57+
</Tip>
5658

5759
<CodeBlocks>
5860
<CodeBlock title="products/product-a.yml">
5961
```yaml
62+
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/product-yml.schema.json
6063
navigation:
6164
- section: Introduction
6265
contents:
@@ -68,6 +71,7 @@ navigation:
6871
<CodeBlock title="products/product-b.yml">
6972
7073
```yaml
74+
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/product-yml.schema.json
7175
tabs:
7276
api:
7377
title: API Reference

fern/products/sdks/reference/generators-yml-reference.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ max-toc-depth: 3
66

77
The `generators.yml` file serves two purposes: it declares your API definition (required for OpenAPI/AsyncAPI), and configures SDK generation, including which languages to generate, where to publish them, and how to customize each SDK.
88

9+
<Tip>
10+
To enable intelligent YAML validation and autocompletion in your editor, add a schema directive to the top of your `generators.yml` file.
11+
</Tip>
12+
913
```yaml title="generators.yml" maxLines=10
14+
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
1015
api:
1116
specs:
1217
- openapi: "./openapi.yml"

0 commit comments

Comments
 (0)