Sources

Validate an OpenAPI specification

Validate an OpenAPI specification against the same checks Biel runs when it indexes your spec, including $ref resolution. A 200 means the next sync will parse the spec; a 422 returns the validation errors it would fail with.

Designed for CI/CD: publish your spec, call this endpoint, and fail the pipeline on a non-2xx status. This catches changes that would break API indexing before Biel's next sync does.

Submit the spec either by url (Biel fetches it and resolves relative $refs against it) or inline as content (JSON or YAML).

Required permission: none. Any valid API key works.

post/api/v2/openapi/validate/

Request

  • Base URL: https://app.biel.ai
  • URL: https://app.biel.ai/api/v2/openapi/validate/
  • Auth: API key in header Authorization

Request body

OR

Example request

{
  "url": "https://api.example.com/openapi.yaml",
  "content": "openapi: 3.0.3\ninfo:\n  title: Example\n  version: 1.0.0\npaths: {}\n"
}

Response

The specification is valid. A sync will parse it.

validtrue required
openapi_versionstring

Value of the spec's openapi (or legacy swagger) field.

titlestring

The API title declared in info.title.

versionstring

The API version declared in info.version.

pathsinteger

Number of paths in the specification.

operationsinteger

Number of operations across all paths.

Example response

{
  "openapi_version": "3.0.3",
  "title": "Petstore API",
  "version": "1.2.0",
  "paths": 12,
  "operations": 34
}

Changes

No recorded changes to this operation across all 1 revision of this API.