diff --git a/fern/products/api-def/openapi-pages/extensions/ignore.mdx b/fern/products/api-def/openapi-pages/extensions/ignore.mdx index 39b316e11..3a2e724b0 100644 --- a/fern/products/api-def/openapi-pages/extensions/ignore.mdx +++ b/fern/products/api-def/openapi-pages/extensions/ignore.mdx @@ -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. @@ -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. @@ -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} @@ -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 +``` + + +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 +``` +