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.3.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.3.0
File Size Uploaded Provenance Actions
hestia_earth_schema_validation-39.3.0.tar.gz 73.1 kB Without provenance Details for hestia_earth_schema_validation-39.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 193.7 kB

Release files / hestia_earth_schema_validation-39.3.0.tar.gz

Download URL hestia_earth_schema_validation-39.3.0.tar.gz
Size 73.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bd114c824a0e09872e7fe44bfde7a883dc1817e87aebc3f9dcb5fb3f525d251f
BLAKE2b-256 checksum
How to use checksums
3d3e123a294b65231641104664093d251fbbf5dc546242e67459e5f2000c9e8a
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.3.0-py3-none-any.whl

Download URL hestia_earth_schema_validation-39.3.0-py3-none-any.whl
Size 120.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bec3d630fde5437cbe4d9fb672aee34f1822e6cf65581215dd55908c02a0600e
BLAKE2b-256 checksum
How to use checksums
36a6a485e64f0bede52975b47e22eb91e87562d9504f4d6caf252091f2f2135a
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.3.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