Skip to content

Function: loadProfileFromSchemaUrls() ​

ts
function loadProfileFromSchemaUrls(
   schemaUrl, 
   typeLibraryUrl, 
   fetchFn?, 
   options?
): Promise<{
  profile: DocumentProfile;
  sources: {
     schema: string;
     typeLibrary: string;
  };
  typeLibrary: any;
}>;

Defined in: domain/schema-utils.ts:66

Load schema resources and construct a profile. Keeps schema loading/parsing logic in backend utilities instead of UI code.

Parameters ​

ParameterType
schemaUrlstring | string[]
typeLibraryUrlstring | string[]
fetchFn?(input) => Promise<{ json: () => Promise<any>; ok?: boolean; status?: number; }>
options?{ fieldVocabularyAttachmentsUrl?: string | string[]; }
options.fieldVocabularyAttachmentsUrl?string | string[]

Returns ​

Promise<{ profile: DocumentProfile; sources: { schema: string; typeLibrary: string; }; typeLibrary: any; }>