> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Validate an API specification

> Check if your specification has syntax errors or governance rule violations.

As you [edit your specification](/docs/design-apis/specifications/edit-a-specification/), Postman identifies [syntax errors](#view-syntax-errors-in-your-specification), such as wrong data types and nesting, and shows details about the errors so you can correct them. Postman also identifies [API governance issues](#view-rule-violations-in-your-specification) in OpenAPI specifications, based on the rules configured for your team.

You can also [run a full lint check with the Postman CLI](#run-a-spec-lint-check-with-the-postman-cli) directly from the specification editor, which checks both syntax and governance rules in one pass and can be added to a CI/CD pipeline.

> **Info**
>
> Checks on governance rules are available on Postman Enterprise plans. For more information, see the [pricing page](https://www.postman.com/pricing/).

Below the specification editor, Postman displays the validation pane in the **Issues** tab, which is selected by default. The validation pane has two sections: **Syntax** and **Governance**. Expand either section to view issues in your specification.

The validation pane only shows syntax errors and governance rule violations for the specification file you're editing.

> **Tip**
>
> In the Postman footer, you can also check whether your specification has syntax errors or governance rule violations. If there are any issues, the footer shows the number of issues by severity. Click the error icon ![Error icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-state-error-stroke.svg#icon) or warning icon ![Warning icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-state-warning-stroke.svg#icon) to open the validation pane.

## View syntax errors in your specification

Postman automatically identifies syntax errors as you edit your API specification. Errors can include missing fields, malformed field names, wrong data types, wrong nesting, or other issues. For Postman to be able to check your specification elements, you must use valid JSON or YAML.

To view any syntax errors, click **Syntax** in the validation pane. Each syntax error shows the number of times Postman found it in the specification, where the error occurs, details about the error, and the severity. Click a syntax error to go to its location in the specification.

If your specification is organized into [multiple files and folders](/docs/design-apis/specifications/add-files-to-a-specification/), every instance of the syntax error also has the path to its respective file. Click a syntax error to go to the file.

## View rule violations in your specification

> **Info**
>
> API Governance rule validation is available with [Postman Enterprise plans](https://www.postman.com/pricing/).

As you edit your OpenAPI specification, Postman automatically checks it against the [Postman API Governance](/docs/api-governance/api-governance-overview/) rules configured for your team.

To view any governance rule violations, click **Governance** in the validation pane. Each rule violation shows the number of times Postman found it in the specification, where the rule violation occurs, details about the rule violation, and the severity. Click a governance rule violation to go to its location in the specification.

If your specification is organized into [multiple files and folders](/docs/design-apis/specifications/add-files-to-a-specification/), every instance of the rule violation will also have the path to its respective file. Click a governance rule violation to go to the file.

API Governance Managers can [view detailed metrics](/docs/reports/api-governance-specifications-reports/) on API Governance rule compliance in your specifications.

## Run a spec lint check with the Postman CLI

In addition to the automatic checks in the editor, you can run a one-time lint check against your specification using the [Postman CLI](/docs/postman-cli/postman-cli-overview/). A spec lint checks both syntax and, on Enterprise plans, API Governance rules in a single command, and reports results back to Postman.

To run a spec lint from the editor, do the following:

1. Expand **Specifications** in the sidebar, then select the specification you want to check.
2. In the workbench, click ![Lint icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-terminal-stroke.svg#icon) **Lint** in the upper right.
3. In the **Spec Lint** pane, select **Terminal** to run the check locally, or **CI/CD Pipeline** for instructions on running it in a pipeline.
4. If you haven't already, [install the Postman CLI](/docs/postman-cli/postman-cli-installation/). Click **Install in Terminal** to run the install command in the built-in terminal.
5. Click ![Copy icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-copy-stroke.svg#icon) to copy the pre-filled `postman spec lint` command for this specification, or click **Run in Terminal** to run it directly.

> **Note**
>
> A spec lint run this way checks your specification against the current workspace's governance group ruleset. To review or change which rules apply, see your team's [governance library](/docs/api-governance/api-governance-overview/).

Learn more about the [`postman spec lint` command](/docs/postman-cli/postman-cli-governance/#postman-spec-lint), including how to change the output format and use it in a CI/CD pipeline.