async function readSchema()

in generator/cmd/listresources.ts [18:25]


async function readSchema(schemaUri: string) {
  if (!lowerCaseStartsWith(schemaUri, `${schemasBaseUri}/`)) {
    throw new Error(`Invalid schema Uri ${schemaUri}`);
  }

  const filePath = path.join(schemasBasePath, schemaUri.substring(schemasBaseUri.length + 1));
  return await readJsonFile(filePath);
}