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

OpenAPIServer

The interface publier.openapi.server.OpenAPIServer.

Overview

interface OpenAPIServer

Methods

getEndpoints

getEndpoints(): Promise<EndpointEntry[]>

Flat list of every extracted endpoint — paths and (by default) webhooks.

getNavigation

getNavigation(options?: BuildNavigationOptions): Promise<NavigationGroup[]>

Build a navigation tree from the merged spec.

Parameters

NameType
optionsBuildNavigationOptions

getOperation

getOperation(operationId: string): Promise<ResolvedOperation | undefined>

Look up an operation by its operationId. Returns undefined when no operation matches.

Parameters

NameType
operationIdstring

getOperationByPath

getOperationByPath(path: string, method: HttpMethod): Promise<ResolvedOperation | undefined>

Look up an operation by path + method (e.g. '/users', 'get'). Returns undefined when no operation matches.

Parameters

NameType
pathstring
methodHttpMethod

getOperationsByTag

getOperationsByTag(tag: string): Promise<ResolvedOperation[]>

Return every operation tagged with the given tag (case-sensitive, matches OpenAPI’s tags: [...] array).

Parameters

NameType
tagstring

getSpec

getSpec(): Promise<OpenApiSpec>

Get the parsed and merged OpenAPI spec.