---
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/bceb8da43dd8bc63d57932bbd905d36a1b40c949/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.
