# @appland/appmap-validate

Latest version **2.5.1** (published 2026-01-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @appland/appmap-validate
pnpm add @appland/appmap-validate
yarn add @appland/appmap-validate
bun add @appland/appmap-validate
```

Provides the commands `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2026-01-04 |
| First published | 2021-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 279.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55 |
| Maintainers | kgilpin, dustinbyrne, appland-release, lachrist |

## Links

- npm: https://www.npmjs.com/package/@appland/appmap-validate
- Repository: https://github.com/getappmap/appmap-js
- npm.io page: https://npm.io/package/@appland/appmap-validate

## Dependencies (4)

- [ajv](https://npm.io/package/ajv.md) ^8.6.0
- [treeify](https://npm.io/package/treeify.md) ^1.1.0
- [format-util](https://npm.io/package/format-util.md) ^1.0.5
- [ajv-error-tree](https://npm.io/package/ajv-error-tree.md) ^0.0.5

## Recent versions

- 2.5.1 (latest) — 2026-01-04
- 2.5.0 — 2025-12-05
- 2.4.0 — 2023-08-07
- 2.3.0 — 2022-07-07
- 2.2.0 — 2022-07-06
- 2.1.0 — 2021-12-06
- 2.0.0 — 2021-08-12
- 1.0.0 — 2021-06-16

## README

# appmap-validate

Check whether an appmap adheres to the [specification](https://github.com/getappmap/appmap).

## Install

```sh
npm i @appland/validate
```

## CLI

```sh
npx appmap-validate path/to/file.appmap.json
```

## API

```js
const {validate} = require("appmap-validate");
// Returns undefined if the appmap is valid
// Throws an InputError if there was a problem with the input options
// Throws an InvalidAppmapError if the provided appmap is invalid
// Any other thrown error should be considered as a bug
validate(
  data,
  {
    version, // appmap specification version
    "schema-depth": 0 // depth of the schema to display
    "instance-depth": 0 // depth of the instance to display
  }
);
```

## 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:
  ```js
  // Missing optional property:
  {
    required: 'foo',
    ...(test ? { optional: 'bar' } : {}),
  };
  // null optional property:
  {
    required: 'foo',
    optional: test ? 'bar' : null,
  };
  ```

---
_Source: https://npm.io/package/@appland/appmap-validate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
