> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# yamlDocumentsToDeclarativeWorkspace()

- Package: [@gooddata/sdk-code-convertors](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-convertors/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.68/libs/sdk-code-convertors/src/to/yamlDocumentsToDeclarativeWorkspace.ts

Converts the AaC documents of one workspace to its declarative model.

**Signature:**

```typescript
export declare function yamlDocumentsToDeclarativeWorkspace(documents: EntityData[], options?: YamlDocumentsToDeclarativeWorkspaceOptions): Required<DeclarativeWorkspaceModel>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| documents | [EntityData](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-convertors/sdk-code-convertors.entitydata/index.md)[] | the AaC documents of the workspace |
| options | [YamlDocumentsToDeclarativeWorkspaceOptions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-convertors/sdk-code-convertors.yamldocumentstodeclarativeworkspaceoptions/index.md) | _(Optional)_ the conversion options |

**Returns:**

Required&lt;DeclarativeWorkspaceModel&gt;

the declarative model of the workspace

## Remarks

The documents must be valid against the AaC schema. The ids must be unique in each collection of the declarative model. For example, all chart types share the `visualizationObjects` collection. The function does not report duplicate ids.

The function generates the filter context ids. Two calls give different ids.
