This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
print json schema for a sample document
the document is of the type map[string]interface{} which is the type when reading a yaml or json file
- Loading branch information
0 parents
commit 3be4cc4
Showing
4 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
helm-schema-gen |
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,5 @@ | ||
module github.com/karuppiah7890/helm-schema-gen | ||
|
||
go 1.13 | ||
|
||
require github.com/karuppiah7890/go-jsonschema-generator v0.0.0-20191226170814-3854335796de |
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,7 @@ | ||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
github.com/karuppiah7890/go-jsonschema-generator v0.0.0-20191226170814-3854335796de h1:xLPxL9cvp8SMJs4UJntWW+avLLeOjZg4j6znMHmOPac= | ||
github.com/karuppiah7890/go-jsonschema-generator v0.0.0-20191226170814-3854335796de/go.mod h1:SltxBi57U2RnGZlEO3kSfuVQ8gdHdgSEcJFQ5zOnqqk= | ||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | ||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | ||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | ||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
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,17 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/karuppiah7890/go-jsonschema-generator" | ||
) | ||
|
||
func main() { | ||
data := map[string]interface{}{ | ||
"something": map[string]interface{}{ | ||
"okay": "dokey", | ||
}, | ||
} | ||
s := &jsonschema.Document{} | ||
s.ReadDeep(&data) | ||
fmt.Println(s) | ||
} |