publier.openapi.parser
The publier.openapi.parser module.
Overview
Functions
parseOpenApiSpec
function parseOpenApiSpec(input: string | object, options: { onRead?: (file: string) => void } = {}): Promise<OpenApiSpec>
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | string | object | File 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.