We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json-schema
It would be nice to handle json-schema, few months ago, I played with this experiment:
{ pkgs ? import <nixpkgs> { }, data ? { # "productId" = 1; # "productName" = "A green door"; # "price" = 12.5; # "tags" = [ "home" "green" ]; }, schema ? { # "$schema" = "https://json-schema.org/draft/2020-12/schema"; # "$id" = "https://example.com/product.schema.json"; # "title" = "Product"; # "description" = "A product in the catalog"; # "type" = "object"; } }: with builtins; let jsonData = pkgs.writeText "data.json" (toJSON data); jsonSchema = pkgs.writeText "schema.json" (toJSON schema); check = pkgs.runCommand "check-jsonschema" { } '' mkdir -p $out && echo 0 > $out/output ${pkgs.check-jsonschema}/bin/check-jsonschema --schemafile ${jsonSchema} ${jsonData} || echo $? > $out/output ''; valid = readFile "${check}/output" == "0\n"; in valid # trace valid { }
The text was updated successfully, but these errors were encountered:
yvan-sraka
No branches or pull requests
It would be nice to handle
json-schema
, few months ago, I played with this experiment:The text was updated successfully, but these errors were encountered: