---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [scapi](../index.md) / normalizeScapiSchemaExpand

# Function: normalizeScapiSchemaExpand()

> **normalizeScapiSchemaExpand**(`input`): `string` \| `undefined`

Defined in: [packages/b2c-tooling-sdk/src/scapi/schema-source.ts:36](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/scapi/schema-source.ts#L36)

Validate expansion names and join them the way the Schemas API expects: one `expand` value, separated by
commas (semicolons are accepted when parsing). The API rejects a repeated `expand` parameter.

## Parameters

### input

`string` | readonly `string`[] | `undefined`

## Returns

`string` \| `undefined`

The canonical value, or undefined when nothing is requested.

## Throws

When a name is not a known expansion.
