---
lang: en
title: 'API docs: testlab.validateapispec'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/testlab
permalink: /doc/en/lb4/apidocs.testlab.validateapispec.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/testlab](./testlab.md) &gt; [validateApiSpec](./testlab.validateapispec.md)

## validateApiSpec() function

**Signature:**

```typescript
export declare function validateApiSpec(spec: any): Promise<void>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

spec


</td><td>

any


</td><td>


</td></tr>
</tbody></table>
**Returns:**

Promise&lt;void&gt;


