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

Parameter

Type

Description

agent

IAgent

The agent whose schema needs to be interpreted.

basePath

string

The base URL

exposedMethods

Array<string>

The list of method names available through this schema

name

string

(Optional) The name of the agent

version

string

(Optional) The version of the agent

**Returns:**

OpenAPIV3.Document