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

# validateDeclarativePublisherEntityV2()

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

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Validates a stored v2 document, document template or page template, named by the bare `id` the declarative API stores. It runs the sdk-model validator, and an issue on the reference is reported on `id`.

**Signature:**

```typescript
export declare function validateDeclarativePublisherEntityV2(entity: unknown, kind: DeclarativePublisherEntityKindV2): IPublisherValidationIssueV2[];
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| entity | unknown |  |
| kind | [DeclarativePublisherEntityKindV2](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-convertors/sdk-code-convertors.declarativepublisherentitykindv2/index.md) |  |

**Returns:**

[IPublisherValidationIssueV2](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ipublishervalidationissuev2/index.md)[]

## Remarks

The declarative API stores no `type`, so the kind is passed next to the entity. Every key the declarative API does not store for that kind is reported. An id starting with `default.` is reported, except on a page template flagged `isDefault`: that is one of the backend's defaults.
