You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/api-def/openapi-pages/extensions/ignore.mdx
+33-2Lines changed: 33 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
---
2
2
title: Ignoring elements
3
-
description: Skip reading endpoints, schemas, or properties using the `x-fern-ignore` extension
3
+
description: Skip reading endpoints, schemas, properties, or parameters using the `x-fern-ignore` extension
4
4
---
5
5
6
-
If you want Fern to skip reading any endpoints, schemas, or properties, use the `x-fern-ignore` extension.
6
+
If you want Fern to skip reading any endpoints, schemas, properties, or parameters, use the `x-fern-ignore` extension.
7
+
8
+
## Ignore an endpoint
7
9
8
10
To skip an endpoint, add `x-fern-ignore: true` at the operation level.
9
11
@@ -14,6 +16,7 @@ paths:
14
16
x-fern-ignore: true
15
17
...
16
18
```
19
+
## Ignore a schema
17
20
18
21
To skip a schema, add `x-fern-ignore: true` at the schema level.
19
22
@@ -25,6 +28,7 @@ components:
25
28
...
26
29
```
27
30
31
+
## Ignore a property
28
32
To skip a property within a schema, add `x-fern-ignore: true` at the property level.
29
33
30
34
```yaml title="x-fern-ignore at property level in openapi.yml" {9}
@@ -39,3 +43,30 @@ components:
39
43
x-fern-ignore: true
40
44
type: string
41
45
```
46
+
47
+
## Ignore a parameter
48
+
49
+
To skip a parameter, add `x-fern-ignore: true` at the parameter level.
50
+
```yaml title="x-fern-ignore at parameter level in openapi.yml" {7}
51
+
paths:
52
+
/users:
53
+
get:
54
+
parameters:
55
+
- name: internalParam
56
+
in: query
57
+
x-fern-ignore: true
58
+
schema:
59
+
type: string
60
+
```
61
+
62
+
<Tip>
63
+
To skip a parameter without modifying your base spec, use `null` values in your [overrides file](/api-definitions/overview/overrides) to delete parameters:
64
+
65
+
```yaml title="overrides.yml" {5}
66
+
paths:
67
+
"/users":
68
+
get:
69
+
parameters:
70
+
- null # Deletes the first parameter from base spec
Copy file name to clipboardExpand all lines: fern/products/api-def/openapi-pages/extensions/parameter-names.mdx
-83Lines changed: 0 additions & 83 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,86 +63,3 @@ paths:
63
63
type: string
64
64
required: false
65
65
```
66
-
67
-
## Delete parameters with null overrides
68
-
69
-
You can use explicit `null` values in your overrides file to delete parameters from the base specification. This is useful when:
70
-
71
-
- Resolving duplicate identifier conflicts between query parameters and request body properties
72
-
- Removing deprecated or unnecessary parameters from the SDK
73
-
- Simplifying the SDK interface by hiding internal parameters
74
-
75
-
<Warning>
76
-
Deleting parameters is a breaking change. Parameters removed via null overrides will not be available in the generated SDK, even though they exist in the base OpenAPI specification.
77
-
</Warning>
78
-
79
-
### Delete a single parameter
80
-
81
-
To delete the first parameter from an endpoint, use `parameters: [null]` in your overrides file:
82
-
83
-
```yaml title="overrides.yml" {5-6}
84
-
paths:
85
-
"/edge-config":
86
-
post:
87
-
x-fern-sdk-group-name: edgeConfig
88
-
x-fern-sdk-method-name: create
89
-
parameters:
90
-
- null
91
-
```
92
-
93
-
This removes the first parameter defined in the base specification for this endpoint.
94
-
95
-
### Delete multiple parameters
96
-
97
-
To delete multiple parameters, add multiple `null` entries:
A common use case is resolving duplicate identifier errors when a query parameter and request body property have the same name. In this example, both the query parameter `slug` and the request body property `slug` would cause a TypeScript compilation error:
113
-
114
-
<CodeGroup>
115
-
```yaml title="openapi.yml"
116
-
paths:
117
-
"/edge-config":
118
-
post:
119
-
operationId: create_edge_config
120
-
parameters:
121
-
- name: slug
122
-
in: query
123
-
description: "The Team slug"
124
-
schema:
125
-
type: string
126
-
requestBody:
127
-
content:
128
-
application/json:
129
-
schema:
130
-
type: object
131
-
properties:
132
-
slug:
133
-
type: string
134
-
description: "The Edge Config slug"
135
-
```
136
-
137
-
```yaml title="overrides.yml"
138
-
paths:
139
-
"/edge-config":
140
-
post:
141
-
x-fern-sdk-group-name: edgeConfig
142
-
x-fern-sdk-method-name: create
143
-
parameters:
144
-
- null # Removes the query parameter slug
145
-
```
146
-
</CodeGroup>
147
-
148
-
After applying the override, the generated SDK will only include the request body `slug` property, eliminating the duplicate identifier error.
0 commit comments