-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code generators to help build workflows
- Loading branch information
Showing
52 changed files
with
3,924 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Capabilities CLI tool | ||
|
||
This tool was built for generating capability Go types from the JSON schema. | ||
|
||
## Conventions | ||
|
||
- Capability JSON schemas must be named using this pattern `[capability_name]_[capability_type].json`. | ||
- Generated types are placed next to the JSON schema and named using this pattern `[capability_name]_[capability_type]_generated.go`. | ||
|
||
## Running | ||
|
||
_All commands run from the root of the repo._ | ||
|
||
Help: | ||
|
||
```bash | ||
go run ./pkg/capabilities/cli/... | ||
``` | ||
|
||
Generate types: | ||
|
||
```bash | ||
go run ./pkg/capabilities/cli/... generate-types | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package cmd | ||
|
||
import "github.com/atombender/go-jsonschema/pkg/generator" | ||
|
||
type ConfigInfo struct { | ||
generator.Config | ||
SchemaToTypeInfo map[string]TypeInfo | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package cmd | ||
|
||
type Field struct { | ||
Type string | ||
NumSlice int | ||
IsPrimitive bool | ||
ConfigName string | ||
} |
Oops, something went wrong.