Skip to main content

$restclient

Callable

  • $restclient(definition: OpenapiV3, options?: Partial<RestClientOptions>): Promise<RestclientType>

  • Create a new CustomType instance with the given options.

    Example

    export const petStore = got
    .get('https://petstore3.swagger.io/api/v3/openapi.json')
    .json<OpenapiV3>()
    .then((data) => $restclient(data, { strict: false }))

    Parameters

    • definition: OpenapiV3
    • options: Partial<RestClientOptions> = {}

      Additional options to pass to the tuple.

    Returns Promise<RestclientType>