Skip to content
✨ Publier v1 is live — a polished docs platform built for the open web.
On this page

publier.openapi.parser

The publier.openapi.parser module.

Overview

Functions

parseOpenApiSpec

function parseOpenApiSpec(input: string | object, options: { onRead?: (file: string) => void } = {}): Promise<OpenApiSpec>

Parameters

NameTypeDefaultDescription
inputstring | objectFile path, URL, or the JSON/YAML text of a spec, or a parsed spec object. Relative external $refs resolve against a path or URL input.
options{ onRead?: (file: string) => void }{}

Raises

  • with the parser’s validation messages when the document is not a valid OpenAPI/Swagger document.