Skip to main content

getOpenApiSchema() function

This method can be used to generate an OpenAPIv3 schema to describe how the methods of a Veramo agent can be called remotely.

Signature:

getOpenApiSchema: (
agent: IAgent,
basePath: string,
exposedMethods: Array<string>,
name?: string,
version?: string,
) => OpenAPIV3.Document

Parameters

ParameterTypeDescription
agentIAgentThe agent whose schema needs to be interpreted.
basePathstringThe base URL
exposedMethodsArray<string>The list of method names available through this schema
namestring(Optional) The name of the agent
versionstring(Optional) The version of the agent

Returns:

OpenAPIV3.Document