Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ start-kafka:
-e KAFKA_CLIENT_PASSWORDS=adminpassword \
-e KAFKA_CFG_SASL_ENABLED_MECHANISMS=PLAIN \
-e KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN \
bitnami/kafka:latest
bitnamilegacy/kafka:4.0.0-debian-12-r10
printf '%s\n' \
'security.protocol=SASL_PLAINTEXT' \
'sasl.mechanism=PLAIN' \
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/bmeg/grip

go 1.24

toolchain go1.24.2
go 1.24.2

require (
github.com/IBM/sarama v1.45.1
Expand All @@ -13,7 +11,7 @@ require (
github.com/bmeg/benchtop v0.0.0-20250827195345-9810354883b9
github.com/bmeg/jsonpath v0.0.0-20210207014051-cca5355553ad
github.com/bmeg/jsonschema/v6 v6.0.4
github.com/bmeg/jsonschemagraph v0.0.4-0.20250828230703-257ca9afd85a
github.com/bmeg/jsonschemagraph v0.0.4-0.20251017205345-236d2de9887c
github.com/boltdb/bolt v1.3.1
github.com/bytedance/sonic v1.14.0
github.com/casbin/casbin/v2 v2.97.0
Expand Down Expand Up @@ -65,6 +63,7 @@ require (
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 // indirect
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bmeg/golib v0.0.0-20200725232156-e799a31439fc // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/casbin/govaluate v1.2.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
Expand Down
10 changes: 8 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bmeg/benchtop v0.0.0-20250827195345-9810354883b9 h1:sIgPwNZKv3pSuIm/hngszbBrg3pKlZcyJ+HTzeFyjNA=
github.com/bmeg/benchtop v0.0.0-20250827195345-9810354883b9/go.mod h1:Jy39KqCHrPeU9J3SEAdVnZ5dxE6VZm8tX899z5n6ud8=
github.com/bmeg/golib v0.0.0-20200725232156-e799a31439fc h1:/0v/ZcXYjGs44InmjECrls31onIbVKVu1Q/E2cmnCEU=
github.com/bmeg/golib v0.0.0-20200725232156-e799a31439fc/go.mod h1:hoSeuZtqe58ANXHuWpeODx4bDHGV36QXlCs1yrUvK6M=
github.com/bmeg/jsonpath v0.0.0-20210207014051-cca5355553ad h1:ICgBexeLB7iv/IQz4rsP+MimOXFZUwWSPojEypuOaQ8=
github.com/bmeg/jsonpath v0.0.0-20210207014051-cca5355553ad/go.mod h1:ft96Irkp72C7ZrUWRenG7LrF0NKMxXdRvsypo5Njhm4=
github.com/bmeg/jsonschema/v6 v6.0.4 h1:AXFAz7G05VZkKretSSU+uacMKF8+C16ONG6pzFzzA7E=
github.com/bmeg/jsonschema/v6 v6.0.4/go.mod h1:gTh32doM+BEZyi/TDPJEp8k3qXTckXY4ohptV2xExQY=
github.com/bmeg/jsonschemagraph v0.0.4-0.20250828230703-257ca9afd85a h1:O0JcMLcazrwVzf8iC/RogUen4CG5UVErrBU76UkxhYQ=
github.com/bmeg/jsonschemagraph v0.0.4-0.20250828230703-257ca9afd85a/go.mod h1:rlek2WcKAhnynqE7NJi8U+RDbUkRFr8Kqpb2SDmcW94=
github.com/bmeg/jsonschemagraph v0.0.4-0.20251015150525-9ed100499f63 h1:vXw9uZsI22wSqJsQDnje1fetSv5iQTkXGJKRFJP8+S4=
github.com/bmeg/jsonschemagraph v0.0.4-0.20251015150525-9ed100499f63/go.mod h1:Ve7jAQhYAMkHUiko99+2CwqXI4Ur0ty/ai8Tfa2ONz4=
github.com/bmeg/jsonschemagraph v0.0.4-0.20251017205159-c430853877eb h1:I/dIUg+RciaJ615cFlaN1SFgmM5SuLFOiiE8QqpeYW4=
github.com/bmeg/jsonschemagraph v0.0.4-0.20251017205159-c430853877eb/go.mod h1:Ve7jAQhYAMkHUiko99+2CwqXI4Ur0ty/ai8Tfa2ONz4=
github.com/bmeg/jsonschemagraph v0.0.4-0.20251017205345-236d2de9887c h1:J1EhcEmL1D/YHxoMIw4HeeVv+hRMUFezNlAAlFX/a8M=
github.com/bmeg/jsonschemagraph v0.0.4-0.20251017205345-236d2de9887c/go.mod h1:Ve7jAQhYAMkHUiko99+2CwqXI4Ur0ty/ai8Tfa2ONz4=
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
Expand Down
9 changes: 9 additions & 0 deletions server/metagraphs.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ func (server *GripServer) addFullGraph(ctx context.Context, graphName string, sc

func (server *GripServer) LoadSchemas(sch *gripql.Graph, out *graph.GraphSchema) (*graph.GraphSchema, error) {
compiler := jsonschema.NewCompiler()

compiler.AssertFormat()
compiler.RegisterFormat(&jsonschema.Format{Name: "date-time", Validate: compile.ValidateFhirDateTime})
compiler.RegisterFormat(&jsonschema.Format{Name: "date", Validate: compile.ValidateFhirDate})
compiler.RegisterFormat(&jsonschema.Format{Name: "binary", Validate: compile.ValidateFhirBinary})
compiler.RegisterFormat(&jsonschema.Format{Name: "time", Validate: compile.ValidateFhirTime})
compiler.RegisterFormat(&jsonschema.Format{Name: "uuid", Validate: compile.ValidateFhirUUID})
compiler.RegisterFormat(&jsonschema.Format{Name: "uri", Validate: compile.ValidateFhirURI})

compiler.AssertVocabs()
vc, err := compile.GetHyperMediaVocab()
if err != nil {
Expand Down
Loading