-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/config: use JSON Schema (#678)
This change switches the `runme.yaml` schema definition from protobuf to JSON Schema. This results in fewer conversions and more natural representation. It also adds support for parsing and merging multiple configuration files. Default config was moved to [a file](internal/config/runme.default.yaml). Go's struct representing the config is generated from the schema. When you change `internal/config/config.schema.json`, remember to call `make schema/generate`. --------- Co-authored-by: Sebastian Tiedtke <[email protected]>
- Loading branch information
1 parent
03e23d3
commit 2379518
Showing
31 changed files
with
943 additions
and
7,541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,7 @@ install/dev: | |
go install mvdan.cc/[email protected] | ||
go install github.com/icholy/[email protected] | ||
go install github.com/stateful/go-proto-gql/protoc-gen-gql@latest | ||
go install github.com/atombender/[email protected] | ||
|
||
.PHONY: install/goreleaser | ||
install/goreleaser: | ||
|
@@ -148,6 +149,14 @@ proto/dev/reset: | |
proto/publish: | ||
@cd ./pkg/api/proto && buf push | ||
|
||
.PHONY: schema/generate | ||
schema/generate: | ||
go-jsonschema -t \ | ||
-p config \ | ||
--tags "json,yaml" \ | ||
-o internal/config/config_schema.go \ | ||
internal/config/config.schema.json | ||
|
||
.PHONY: release | ||
release: install/goreleaser | ||
@goreleaser check | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.