Skip to content

Commit

Permalink
Merge branch 'main' into icmp-set
Browse files Browse the repository at this point in the history
  • Loading branch information
elazarg authored Mar 17, 2024
2 parents 0c58017 + 5578810 commit 489c747
Show file tree
Hide file tree
Showing 3 changed files with 653 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
REPOSITORY := github.com/np-guard/models
JSON_PACKAGE_NAME := model

mod: go.mod
@echo -- $@ --
Expand All @@ -19,3 +20,11 @@ precommit: mod fmt lint
test:
@echo -- $@ --
go test ./... -v -cover -coverprofile models.coverprofile

pkg/${JSON_PACKAGE_NAME}/data_model.go: spec_schema.json
@echo -- generate --
# Install https://github.com/atombender/go-jsonschema
go-jsonschema spec_schema.json --package ${JSON_PACKAGE_NAME} --struct-name-from-title --tags json --output $@
goimports -local $(REPOSITORY) -w $@

generate: pkg/${JSON_PACKAGE_NAME}/data_model.go
Loading

0 comments on commit 489c747

Please sign in to comment.