manifesto icon indicating copy to clipboard operation
manifesto copied to clipboard

Manifest error handling

Open Sozialarchiv opened this issue 7 years ago • 1 comments

Is it possible to get error messages if a manifest file is invalid?

For a example if the id or label is missing.

Something like:

manifesto = manifesto.create(json);
if (!manifesto.isValid()) {
 let errors =  manifesto.getErrors();
}

Sozialarchiv avatar Sep 19 '18 13:09 Sozialarchiv

Possibly... I was talking to @stephenwf recently about the future direction for manifesto. We thought about making a separate manifest "upgrader" library that updates your json to the latest presentation API spec. We could then potentially validate that against a json schema... I think we'd want to use a schema as opposed to some kind of procedural check.

edsilv avatar Sep 20 '18 16:09 edsilv