Catalog npm
PACKAGE EXPLORERView in registry

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

npm

Ajv JSON Schema validator adapter for Universal Config Engine.

ajvconfigconfigurationjson-schemavalidation
Versions collected21
Direct dependencies2From release 1.1.2
Last observed20 Oct, 22:09 UTC

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.

Versions 21

Collected releases
VersionPublishedDirect dependenciesOpen version
1.1.2Registry latest20 Oct 20262
1.1.2-rc.120 Oct 20262
1.1.120 Oct 20262
1.1.1-rc.120 Oct 20262
1.1.020 Oct 20262
1.1.0-rc.120 Oct 20262
1.0.019 Oct 20262
1.0.0-rc.519 Oct 20262
1.0.0-rc.411 Aug 20262
1.0.0-rc.322 Jul 20262
1.0.0-rc.215 Jul 20262
1.0.0-rc.114 Jul 20262
0.6.014 Jul 20262
0.5.014 Jul 20262
0.4.011 Jul 20262
0.3.111 Jul 20262
0.3.010 Jul 20262
0.2.110 Jul 20262
0.2.08 Jul 20262
0.1.28 Jul 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

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:c587816903e4fcee6ab46b275dac82a1390059476b0102e8a48ee1bb2bd77bf5