Skip to content

podium/json_schema_nif

Repository files navigation

JsonSchemaNif

Library for validating JSON instances against JSON schemas.

Provides a straightforward way to ensure that JSON data adheres to a predefined schema, enhancing the reliability and consistency of data. Especially useful in contexts like Kafka.

Installation

The package can be installed by adding json_schema_nif to your list of dependencies in mix.exs:

defp deps do
  [
    {:json_schema_nif, "~> 0.1.0"}
  ]
end

Contributing

See CONTRIBUTING.md.

Documentation

Documentation is available in HexDocs.

Releasing

Since we rely on RustlerPrecompiled actually building our Rust bindings in advance, we need to follow their recommended flow:

  1. Release a new tag
  2. Push the code to your repository with the new tag: git push origin main --tags
  3. Wait for all NIFs to be built
  4. Run the mix rustler_precompiled.download JsonSchemaNif --alltask (with the flag --all) release the package to Hex.pm (make sure your release includes the correct files).
    • Run mix hex.build --unpack to ensure checksum files exist