You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
452 B
19 lines
452 B
package main
|
|
|
|
import (
|
|
"flag"
|
|
"io/ioutil"
|
|
"log"
|
|
|
|
"github.com/maxibanki/golang-url-shortener/config"
|
|
"github.com/urakozz/go-json-schema-generator"
|
|
)
|
|
|
|
func main() {
|
|
schemaPath := flag.String("path", "schema.json", "location of the converted schema")
|
|
flag.Parse()
|
|
schema := generator.Generate(&config.Configuration{})
|
|
if err := ioutil.WriteFile(*schemaPath, []byte(schema), 644); err != nil {
|
|
log.Fatalf("could not write schema: %v", err)
|
|
}
|
|
}
|
|
|