appmap-validate
Check whether an appmap adheres to the specification.
Install
npm i @appland/validate
CLI
npx appmap-validate path/to/file.appmap.json
API
const {validate} = require("appmap-validate");
validate(
data,
{
version,
"schema-depth": 0
"instance-depth": 0
}
);
Design Decisions
- Every object is extensible Appmap producers are free to include additional properties. This can
be useful to experiment with novel extensions which are not yet part of the spec. Also it can be
useful to include additional data for debugging purpose.
- Every optional property is nullable When a property is is not required, appmap producers have
two options. Either they do not include the property in the object. Or they set its value to
null
which is easier/faster to do when using literal object notation. For instance, in js:
{
required: 'foo',
...(test ? { optional: 'bar' } : {}),
};
{
required: 'foo',
optional: test ? 'bar' : null,
};