Skip to main content

Module: @ts-rest/open-api

Functions

generateOpenApi

generateOpenApi(router, apiDoc, options?): OpenAPIObject

Parameters

NameTypeDescription
routerAppRouter-
apiDocOmit<OpenAPIObject, "paths" | "openapi"> & { info: InfoObject }-
optionsObject-
options.jsonQuery?booleanEnable JSON query parameters, see
options.operationMapper?(operation: OperationObject, appRoute: AppRoute) => OperationObject-
options.setOperationId?boolean | "concatenated-path"-

Returns

OpenAPIObject

Defined in

lib/ts-rest-open-api.ts:195