AsyncSchemaLocationToSchemaExperienceResolverRegistrationApi

Type: Class

An API object to register schema experiences with for the asynchronous schema experience resolver.

Methods

addOperations

Type: Function

Add Operations which then become globally available.

JavaScript

registrationApi.addOperations({
	exampleOperation: {
		label: "t__Example operation",
		steps: [
			{
				type: "operations/do-nothing"
			}
		]
	}
});

Arguments

addSchemaExperienceModule

Type: Function

Add a schema experience module which can then be used to add schema experience configuration.

Example: Add a new schema experience module which extends preexisting modules.

JavaScript

registrationApi.addSchemaExperienceModule('new-sx-module', ['base-sx-module', 'metadata-sx-module']);

Arguments

Returns

defineAndRegisterSchemaExperience

Type: Function

Define and register a schema experience for a given schema and matching schema location(s).

Example: Define and register a schema experience using a new schema experience module which is bundled together with others in a schema experience (shell).

JavaScript

registrationApi.addSchemaExperienceModule('new-sx-module', ['base-sx-module', 'metadata-sx-module']);
registrationApi.addSchemaExperienceModule('recipe-sx-shell', ['new-sx-module', 'base-sx-module', 'metadata-sx-module']);
registrationApi.defineAndRegisterSchemaExperience(
	'assets/schemas/recipe-sx-shell.json',
	['urn:fontoxml:training:delicious:recipe.xsd']
	['recipe-sx-shell']
);

Example: Define and register a schema experience, combining a preexisting schema experience (shell) with a new schema experience module.

JavaScript

registrationApi.addSchemaExperienceModule('new-sx-module', ['base-sx-module', 'metadata-sx-module']);
registrationApi.defineAndRegisterSchemaExperience(
	'assets/schemas/preexisting-sx-shell.json',
	['urn:fontoxml:example:preexisting.xsd']
	['preexisting-sx-shell', 'new-sx-module']
);

Arguments