Fixed issue with badly parsed characters for OpenAPI

This commit is contained in:
frikky
2021-06-09 06:06:18 +02:00
parent 5b3c4b7db1
commit 1dddcb5dfc
7 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ module shuffle
go 1.13 go 1.13
//replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
+2
View File
@@ -171,6 +171,8 @@ github.com/frikky/shuffle-shared v0.0.56 h1:stC793SdQeBh98yJqCL74aXFo9YYhVIg8CQJ
github.com/frikky/shuffle-shared v0.0.56/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc= github.com/frikky/shuffle-shared v0.0.56/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc=
github.com/frikky/shuffle-shared v0.0.57 h1:YDlOVjg8bUBcinehcmorxzOoV5O55oUfG8q7TOiBOeU= github.com/frikky/shuffle-shared v0.0.57 h1:YDlOVjg8bUBcinehcmorxzOoV5O55oUfG8q7TOiBOeU=
github.com/frikky/shuffle-shared v0.0.57/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc= github.com/frikky/shuffle-shared v0.0.57/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc=
github.com/frikky/shuffle-shared v0.0.60 h1:o6/QLsu3Rbjr4+BQWs9DF4B5qZCg0gPpZWPYXmjVWqM=
github.com/frikky/shuffle-shared v0.0.60/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc=
github.com/fsouza/go-dockerclient v1.7.2 h1:bBEAcqLTkpq205jooP5RVroUKiVEWgGecHyeZc4OFjo= github.com/fsouza/go-dockerclient v1.7.2 h1:bBEAcqLTkpq205jooP5RVroUKiVEWgGecHyeZc4OFjo=
github.com/fsouza/go-dockerclient v1.7.2/go.mod h1:+ugtMCVRwnPfY7d8/baCzZ3uwB0BrG5DB8OzbtxaRz8= github.com/fsouza/go-dockerclient v1.7.2/go.mod h1:+ugtMCVRwnPfY7d8/baCzZ3uwB0BrG5DB8OzbtxaRz8=
github.com/getkin/kin-openapi v0.8.0 h1:a6TQjTqwkyscC4/hShJX7WhCVE+4bi9lzw61XHQW5hE= github.com/getkin/kin-openapi v0.8.0 h1:a6TQjTqwkyscC4/hShJX7WhCVE+4bi9lzw61XHQW5hE=
+1
View File
@@ -3168,6 +3168,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
swagger, err := swaggerLoader.LoadSwaggerFromData(body) swagger, err := swaggerLoader.LoadSwaggerFromData(body)
if err != nil { if err != nil {
log.Printf("[ERROR] Swagger validation error: %s", err) log.Printf("[ERROR] Swagger validation error: %s", err)
//log.Printf("%s", string(body))
resp.WriteHeader(500) resp.WriteHeader(500)
resp.Write([]byte(`{"success": false, "reason": "Failed verifying openapi"}`)) resp.Write([]byte(`{"success": false, "reason": "Failed verifying openapi"}`))
return return
+1 -1
View File
@@ -2102,7 +2102,7 @@ const AngularWorkflow = (props) => {
// Basically just a stupid if-else :) // Basically just a stupid if-else :)
const synonyms = { const synonyms = {
"id": ["id", "ref", "sourceref", "reference", "sourcereference", "alert id", "case id", "incident id", "service id", "sid", "uid", "uuid"], "id": ["id", "ref", "sourceref", "reference", "sourcereference", "alert id", "case id", "incident id", "service id", "sid", "uid", "uuid", "team id"],
"title": ["title", "name", "message"], "title": ["title", "name", "message"],
"description": ["description", "explanation", "story", "details",], "description": ["description", "explanation", "story", "details",],
"email": ["mail", "email", "sender", "receiver", "recipient"], "email": ["mail", "email", "sender", "receiver", "recipient"],
+1 -1
View File
@@ -970,7 +970,7 @@ const AppCreator = (props) => {
const basePath = "/"+(splitBase.slice(3, )).join("/") const basePath = "/"+(splitBase.slice(3, )).join("/")
const data = { const data = {
"swagger": "3.0", "openapi": "3.0",
"info": { "info": {
"title": name, "title": name,
"description": description, "description": description,
+1 -1
View File
@@ -1639,7 +1639,7 @@ const Apps = (props) => {
hidden hidden
type="file" type="file"
ref={upload} ref={upload}
accept="application/JSON, text/yaml, text/x-yaml, application/x-yaml, application/vnd.yaml" accept="application/JSON, application/YAML, text/yaml, text/x-yaml, application/x-yaml, application/vnd.yaml"
multiple={false} multiple={false}
onChange={uploadFile} onChange={uploadFile}
/> />
+2 -2
View File
@@ -68,7 +68,7 @@ const LoginDialog = props => {
}), }),
) )
.catch(error => { .catch(error => {
setLoginInfo("Error logging in - please refresh in a minute: ", error) setLoginInfo("Error logging in - please refresh in a minute ", error)
}) })
} }
@@ -139,7 +139,7 @@ const LoginDialog = props => {
}), }),
) )
.catch(error => { .catch(error => {
setLoginInfo("Error in userdata: ", error) setLoginInfo("Error in from backend: ", error)
}); });
} }
} }