Skip to content

Commit

Permalink
Fix: Production setting on serv package options not applied #392
Browse files Browse the repository at this point in the history
  • Loading branch information
dosco committed Oct 3, 2022
1 parent 2f23d4a commit 3dc8fd3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1,956 deletions.
20 changes: 8 additions & 12 deletions internal/tools/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ import (
"encoding/json"
"fmt"

"github.com/dosco/graphjin/core"
"github.com/dosco/graphjin/serv"
"github.com/invopop/jsonschema"
)

func main() {
// cm := make(map[string]string)
// err := jsonschema.ExtractGoComments("github.com/dosco/graphjin", "./core", cm)
// if err != nil {
// panic(err)
// }
// for k, v := range cm {
// fmt.Println(">", k, v)
// }
// return

r := new(jsonschema.Reflector)
if err := r.AddGoComments("github.com/dosco/graphjin", "./core"); err != nil {
panic(err)
}
if err := r.AddGoComments("github.com/dosco/graphjin", "./serv"); err != nil {
panic(err)
}
if err := r.AddGoComments("github.com/dosco/graphjin", "./serv/auth"); err != nil {
panic(err)
}

s := r.Reflect(&core.Config{})
s := r.Reflect(&serv.Config{})
b, err := json.MarshalIndent(s, "", "\t")
// b, err := s.MarshalJSON()
if err != nil {
Expand Down
Loading

0 comments on commit 3dc8fd3

Please sign in to comment.