ADK for TypeScript: API Reference
    Preparing search index...

    Function dictToAuthScheme

    • Converts a security scheme object out of an OpenAPI document into an AuthScheme.

      Parameters

      • data: Record<string, unknown>

        The security scheme object.

      Returns AuthScheme

      The validated auth scheme.

      const scheme = dictToAuthScheme({
      type: 'apiKey',
      in: 'header',
      name: 'X-API-Key',
      });

      Error When type is missing or unrecognised, or the rest of the object does not match the shape that type requires.