ADOP

fetchSchema

Fetches schemas from a given URL.

export async function fetchSchema(url: string): Promise<Schema> {
  if (!url || url.length === 0) throw new Error(`Invalid schema URL: ${url}`);

  const resp = await axios.get(url);
  return resp.data as unknown as Schema;
}
NameTypeDescription

url

string

The url to fetch the schema from.

Last updated