Files
libopenapi/libopenapi.go
Dave Shanley 8929db5868 Testing out mutation
works great! just as I expected. (this will be the) best openapi library out there!
2022-09-02 10:41:06 -04:00

31 lines
693 B
Go

package main
func main() {
// testData := `openapi: 3.0.1
//info:
// title: this is a title
// description: this is a description`
//
// data := []byte(testData)
// _ = ioutil.WriteFile("sample.yaml", data, 0664)
//
// info, _ := datamodel.ExtractSpecInfo(data)
// lowDoc, err := low.CreateDocument(info)
// if len(err) > 0 {
// for e := range err {
// fmt.Printf("%e\n", err[e])
// }
// return
// }
// highDoc := high.NewDocument(lowDoc)
// fmt.Println(highDoc.Info.Title)
// highDoc.Info.GoLow().Title.ValueNode.Value = "let's hack this shizzle"
//
// modified, _ := yaml.Marshal(info.RootNode)
// fmt.Println(string(modified))
//os.Remove("sample.yaml")
}