in packages/vscode-extension-web-ide/src/thirdPartyExtensions/redhatVscodeYaml.ts [49:64]
export async function requestSchemaContent(uriStr: string): Promise<string> {
const uri = await getWebIdeCompatibleUri(uriStr);
let content: Uint8Array;
try {
content = await vscode.workspace.fs.readFile(uri);
} catch (e) {
log.error(`Error reading YAML schema for ${uriStr}`, e);
await vscode.window.showErrorMessage(`Cannot read YAML schema: ${uriStr}`);
return '';
}
const decoder = new TextDecoder('utf-8');
const result = decoder.decode(content);
return result;
}