createOpenAPIClient | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function createOpenAPIClient

    • Create an typed openapi client either by URL or a 'fetch' callback. You can use a getDirectOpenAPIFetch to directly access a local service in-process (giving you better stacktraces and console logging)

      Type Parameters

      • ClientType extends "platform:api"

        The module:client type to create. Refers to an openAPIClient in the moduledefinition.yml

      Parameters

      • urlOrFetch: string | OpenAPIClientFetch

        The URL of the service to connect to or a fetch call to use to connect to it.

      • Optionaloptions: OpenAPIClientOptions & { service?: ClientType }

      Returns OpenAPIClientDefinitions[ClientType]