Catalog npm
Back to packageRELEASE DETAILS

0.3.0

npm

@0disoft/universal-config-engine-validator-ajv

Ajv JSON Schema validator adapter for Universal Config Engine.

ajvconfigconfigurationjson-schemavalidation
Published10 Jul 2026
Direct dependencies2
Transitive dependenciesNot calculated

README

Current package documentation

@0disoft/universal-config-engine-validator-ajv

Ajv JSON Schema validation adapter for Universal Config Engine. Validation runs on the normalized config object after source resolution and coercion.

Install

npm install @0disoft/universal-config-engine-core \
  @0disoft/universal-config-engine-validator-ajv ajv

Node.js >=24, ESM, and Ajv ^8.20.0 are required.

Use

import { runValidators } from "@0disoft/universal-config-engine-core";
import { createAjvValidator } from "@0disoft/universal-config-engine-validator-ajv";

const validator = createAjvValidator({
  id: "service-schema",
  schema: {
    type: "object",
    required: ["service"],
    properties: {
      service: {
        type: "object",
        required: ["port"],
        properties: { port: { type: "integer", minimum: 1 } }
      }
    }
  }
});

const validation = await runValidators({
  config: { service: { port: 8080 } },
  provenance: [],
  validators: [validator]
});

console.log(validation.ok);

Ajv instance paths are normalized into Universal Config Engine paths. Numeric-looking object keys remain strings unless traversal proves that the parent is an array.

Standard Ajv keyword diagnostic codes are preserved. Custom keywords that do not match the core's bounded ASCII code grammar use ajv_custom_keyword instead. Their raw keyword names and Ajv error prose are omitted from diagnostics.

This adapter accepts synchronous Ajv Schema values. $async: true schemas are rejected during adapter creation, including for JavaScript callers, before any validation Promise can run. Synchronous schemas keep their existing result shape.

See the validator adapter contract.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 3

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0disoft/universal-config-engine-core
Environment
{
  "local_name": "@0disoft/universal-config-engine-core",
  "alias": false,
  "peer_metadata": null
}
0.3.0runtime
ajv
Environment
{
  "local_name": "ajv",
  "alias": false,
  "peer_metadata": null
}
^8.20.0development
ajv
Environment
{
  "local_name": "ajv",
  "alias": false,
  "peer_metadata": null
}
^8.20.0peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "7995b268953eaa7bac5e8a3c11acbabdd7b0745b",
  "tarball": "https://registry.npmjs.org/@0disoft/universal-config-engine-validator-ajv/-/universal-config-engine-validator-ajv-0.3.0.tgz",
  "fileCount": 6,
  "integrity": "sha512-4NiB4We8QiU797xHZL5CxatETdTYmDG3AHly3h/XFgfD21lNh7BnuhU7iPceZeozkPA/aKjRVll2GCd4d/Yw3g==",
  "signatures": [
    {
      "sig": "MEUCIBmbz1NS9xvgLk582Vk6C/kiwqG1ohOMhrhPMr8Oql+KAiEA2uM2mb49+KKVlTdMDH7YGTabk9cvKaZCyX02SM5QQyU=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "attestations": {
    "url": "https://registry.npmjs.org/-/npm/v1/attestations/@0disoft%2funiversal-config-engine-validator-ajv@0.3.0",
    "provenance": {
      "predicateType": "https://slsa.dev/provenance/v1"
    }
  },
  "unpackedSize": 6622
}

Repository

PENDING
0disoft/universal-config-engine

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0a2289b70bdbfcd804c8a03b157f7bfa9f358c90f630f2f789e6c0a7507df7f5

Other collected versions

1.1.220 Oct1.1.2-rc.120 Oct1.1.120 Oct1.1.1-rc.120 Oct1.1.020 Oct1.1.0-rc.120 OctView all collected versions →