Skip to main content

HESTIA Schema Validation

Module to validate data using the HESTIA Schema and Ajv.

Install

npm install @hestia-earth/schema @hestia-earth/schema-validation

Example validating JSON

const { SchemaType } = require('@hestia-earth/schema');
const { validator } = require('@hestia-earth/schema-validation/validate');

// Set to `true` to validate existing Nodes (@type/@id) or `false` for Nodes to upload (type/id)
const strictMode = false;
// Initialise the validation function, do this only once
const schemaValidation = validator(undefined, strictMode);

const node = {
  type: SchemaType.Cycle,
  id: 'my first cycle'
};

(async () => {
  const { success, errors } = await schemaValidation(node);
  console.log(success);
  // list of errors in Ajv formatting. See https://github.com/ajv-validator/ajv/tree/v6.12.6#validation-errors
  console.log(errors);
})();

Metadata

Release files for hestia-earth-schema-validation 39.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hestia-earth-schema-validation 39.4.0
File Size Uploaded Provenance Actions
hestia_earth_schema_validation-39.4.0.tar.gz 73.3 kB Without provenance Details for hestia_earth_schema_validation-39.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hestia-earth-schema-validation 39.4.0
File Interpreter ABI Platform Actions
hestia_earth_schema_validation-39.4.0-py3-none-any.whl Python 3 none any Details for hestia_earth_schema_validation-39.4.0-py3-none-any.whl

Total release size: 194.1 kB

Release files / hestia_earth_schema_validation-39.4.0.tar.gz

Download URL hestia_earth_schema_validation-39.4.0.tar.gz
Size 73.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7df20074e73820b8b72da772f5316c0ffc8398da87288f1e0d270e195619dfed
BLAKE2b-256 checksum
How to use checksums
6eccb61f22e48da7ae2217b4ce409446edf37eda073b8ddd446b36256cae0a99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / hestia_earth_schema_validation-39.4.0-py3-none-any.whl

Download URL hestia_earth_schema_validation-39.4.0-py3-none-any.whl
Size 120.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2786e6122e8a58d7bb3b6ff1345f0f0bd46a3863c20d3eb038a07fcf0c5d4145
BLAKE2b-256 checksum
How to use checksums
294450ab12ca3372dfd3c239284bcede97de9b481a5f153ca3d6af897762fc89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for hestia-earth-schema-validation 39.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page