···11+{
22+ fetchurl,
33+ lib,
44+ newCatalog,
55+}:
66+77+newCatalog {
88+ name = "json-patch-schemastore";
99+ displayName = "JSON Patch as maintained by the https://www.schemastore.org community";
1010+ version = "2024-11-26";
1111+ groups = {
1212+ "JSON Patch" = {
1313+ "https://json.schemastore.org/json-patch.json" = fetchurl {
1414+ name = "json-patch-schema";
1515+ # Note that we don't use the json.schemastore.org URLs directly, as those are mutable resources.
1616+ # Make sure to update the version above!
1717+ url = "https://github.com/schemastore/schemastore/raw/138439cd4f9d7bf57d6747b674ce5bbcffbfafdc/src/schemas/json/json-patch.json";
1818+ hash = "sha256-vrqlgvlU61aEO6jd1SLLEqJDZG1k+eTBozcyPmhUp2U=";
1919+ };
2020+ };
2121+ };
2222+ extraDescription = ''
2323+ A JSON Patch is a sequence of editing and checking operations to perform against another JSON document.
2424+ It is specified in IETF RFC 6902: https://datatracker.ietf.org/doc/html/rfc6902/
2525+2626+ The schema is maintained by the community at https://www.schemastore.org, which is a collection of JSON Schemas for various purposes.
2727+ '';
2828+ meta = {
2929+ maintainers = with lib.maintainers; [ roberth ];
3030+ license = lib.licenses.asl20;
3131+ changelog = "https://github.com/schemastore/schemastore/commits/master/src/schemas/json/json-patch.json";
3232+ };
3333+}
+39
pkgs/data/json-schema/catalogs/json-schema.nix
···11+{
22+ fetchurl,
33+ lib,
44+ newCatalog,
55+}:
66+77+newCatalog {
88+ name = "json-schema";
99+ displayName = "JSON Schema Metaschemas";
1010+ groups = {
1111+ "JSON Schema" = {
1212+ "http://json-schema.org/draft-04/schema#" = fetchurl {
1313+ name = "json-schema-draft-04";
1414+ url = "https://json-schema.org/draft-04/schema";
1515+ hash = "sha256-4UidC0dV8CeTMCWR0/y48Htok6gqlPJIlfjk7fEbguI=";
1616+ };
1717+ "http://json-schema.org/draft-06/schema#" = fetchurl {
1818+ name = "json-schema-draft-06";
1919+ url = "https://json-schema.org/draft-06/schema";
2020+ hash = "sha256-AGTogLohS/8c7lEeZ4++SMmCbdNZ6R4kI/w23mey6+E=";
2121+ };
2222+ "http://json-schema.org/draft-07/schema#" = fetchurl {
2323+ name = "json-schema-draft-07";
2424+ url = "https://json-schema.org/draft-07/schema";
2525+ hash = "sha256-aS4dFl5Hr8tfEbLOHGOWNf+oNANdbstrzzCHSB2uhAQ=";
2626+ };
2727+ # Unclear how newer metaschemas should be handled, so leaving them out for now.
2828+ # https://github.com/roberth/json-schema-catalog-rs/issues/8
2929+ };
3030+ };
3131+ meta = {
3232+ maintainers = with lib.maintainers; [ roberth ];
3333+ # https://github.com/json-schema-org/json-schema-spec/blob/main/LICENSE
3434+ license = [
3535+ lib.licenses.bsd3
3636+ lib.licenses.afl3
3737+ ];
3838+ };
3939+}