Skip to content

Commit

Permalink
Removal of unimportant codegen stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Aug 15, 2024
1 parent 33d367b commit 17323e0
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -16310,16 +16310,6 @@ func ValidateSwagger(resp http.ResponseWriter, request *http.Request) {
OpenAPI string `datastore:"openapi" json:"openapi" yaml:"openapi"`
}

//body = []byte(`swagger: "2.0"`)
//body = []byte(`swagger: '1.0'`)
//newbody := string(body)
//newbody = strings.TrimSpace(newbody)
//body = []byte(newbody)
//log.Printf(string(body))
//tmpbody, err := yaml.YAMLToJSON(body)
//log.Printf(err)
//log.Printf(string(tmpbody))

// This has to be done in a weird way because Datastore doesn't
// support map[string]interface and similar (openapi3.Swagger)
var version versionCheck
Expand All @@ -16333,7 +16323,7 @@ func ValidateSwagger(resp http.ResponseWriter, request *http.Request) {
isJson := false
err = json.Unmarshal(body, &version)
if err != nil {
log.Printf("[WARNING] Json upload err: %s", err)
log.Printf("[WARNING] Json API upload err: %s", err)

body = []byte(strings.Replace(string(body), "\\/", "/", -1))
err = yaml.Unmarshal(body, &version)
Expand Down

0 comments on commit 17323e0

Please sign in to comment.