Skip to content

Commit cf38050

Browse files
authored
fix: add files and accordion components (#3495)
1 parent 21ec380 commit cf38050

3 files changed

Lines changed: 25 additions & 16 deletions

File tree

fern/products/api-def/openapi-pages/overlays.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ actions: # Required: Ordered list of changes to apply
5151
Fern requires parentheses around JSONPath filter expressions. Use `[?(@.name == 'plantId')]` instead of `[?@.name == 'plantId']`.
5252
</Warning>
5353

54-
### Modifying OpenAPI properties
54+
<AccordionGroup>
55+
<Accordion title="Modifying OpenAPI properties" toc={true}>
5556

5657
Use `update` to change standard OpenAPI properties like descriptions, summaries, or other fields:
5758

@@ -67,7 +68,8 @@ actions:
6768
description: Returns a paginated list of plants in the store inventory.
6869
```
6970

70-
### Customizing with Fern extensions
71+
</Accordion>
72+
<Accordion title="Customizing with Fern extensions" toc={true}>
7173

7274
Use `update` to add [Fern extensions](/api-definitions/openapi/extensions/overview):
7375

@@ -92,11 +94,12 @@ actions:
9294
x-fern-parameter-name: withDetails
9395
```
9496

95-
### Removing elements
97+
</Accordion>
98+
<Accordion title="Removing elements" toc={true}>
9699

97100
Use `remove: true` to delete elements from your specification:
98101

99-
```yaml title="openapi-overlays.yml"
102+
```yaml title="openapi-overlays.yml" {8}
100103
overlay: 1.0.0
101104
info:
102105
title: Remove internal endpoints
@@ -107,6 +110,9 @@ actions:
107110
remove: true
108111
```
109112

113+
</Accordion>
114+
</AccordionGroup>
115+
110116
## Separate overlays for SDKs and docs
111117

112118
<Markdown src="/snippets/separate-sdks-docs.mdx" type="overlays" />

fern/snippets/different-environments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Configure different {{type}} for production versus internal APIs:
22

3-
```yaml title="generators.yml"
3+
```yaml title="generators.yml" {5, 11}
44
groups:
55
production:
66
specs:

fern/snippets/separate-sdks-docs.mdx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
Use different {{type}} files for SDK generation versus documentation by creating separate folders with their own `generators.yml`:
22

3-
```bash
4-
fern/
5-
├─ fern.config.json
6-
├─ openapi.yml
7-
├─ docs/
8-
│ ├─ generators.yml
9-
│ └─ docs-{{type}}.yml
10-
└─ sdks/
11-
├─ generators.yml
12-
└─ sdk-{{type}}.yml
13-
```
3+
<Files>
4+
<Folder name="fern" defaultOpen>
5+
<File name="fern.config.json" />
6+
<File name="openapi.yml" />
7+
<Folder name="docs" defaultOpen>
8+
<File name="generators.yml" />
9+
<File name="docs-{{type}}.yml" />
10+
</Folder>
11+
<Folder name="sdks" defaultOpen>
12+
<File name="generators.yml" />
13+
<File name="sdk-{{type}}.yml" />
14+
</Folder>
15+
</Folder>
16+
</Files>
1417

1518
```yaml title="sdks/generators.yml"
1619
api:

0 commit comments

Comments
 (0)