Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions fern/products/api-def/openapi-pages/extensions/ignore.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: Ignoring elements
description: Skip reading endpoints, schemas, or properties using the `x-fern-ignore` extension
description: Skip reading endpoints, schemas, properties, or parameters using the `x-fern-ignore` extension
---

If you want Fern to skip reading any endpoints, schemas, or properties, use the `x-fern-ignore` extension.
If you want Fern to skip reading any endpoints, schemas, properties, or parameters, use the `x-fern-ignore` extension.

## Ignore an endpoint

To skip an endpoint, add `x-fern-ignore: true` at the operation level.

Expand All @@ -14,6 +16,7 @@ paths:
x-fern-ignore: true
...
```
## Ignore a schema

To skip a schema, add `x-fern-ignore: true` at the schema level.

Expand All @@ -25,6 +28,7 @@ components:
...
```

## Ignore a property
To skip a property within a schema, add `x-fern-ignore: true` at the property level.

```yaml title="x-fern-ignore at property level in openapi.yml" {9}
Expand All @@ -39,3 +43,30 @@ components:
x-fern-ignore: true
type: string
```

## Ignore a parameter

To skip a parameter, add `x-fern-ignore: true` at the parameter level.
```yaml title="x-fern-ignore at parameter level in openapi.yml" {7}
paths:
/users:
get:
parameters:
- name: internalParam
in: query
x-fern-ignore: true
schema:
type: string
```

<Tip>
To skip a parameter without modifying your base spec, use `null` values in your [overrides file](/api-definitions/overview/overrides) to delete parameters:

```yaml title="overrides.yml" {5}
paths:
/users:
get:
parameters:
- null # Deletes the first parameter from base spec
```
</Tip>