openapi: generate

This commit is contained in:
2025-03-19 17:43:17 -07:00
parent 0b1e7085e3
commit f52e0a91a2
10 changed files with 1056 additions and 0 deletions

View File

@@ -406,6 +406,64 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
case 's': // Prefix: "set-"
if l := len("set-"); len(elem) >= l && elem[0:l] == "set-" {
elem = elem[l:]
} else {
break
}
if len(elem) == 0 {
break
}
switch elem[0] {
case 'u': // Prefix: "uploading"
if l := len("uploading"); len(elem) >= l && elem[0:l] == "uploading" {
elem = elem[l:]
} else {
break
}
if len(elem) == 0 {
// Leaf node.
switch r.Method {
case "POST":
s.handleActionSubmissionValidatedRequest([1]string{
args[0],
}, elemIsEscaped, w, r)
default:
s.notAllowed(w, r, "POST")
}
return
}
case 'v': // Prefix: "validating"
if l := len("validating"); len(elem) >= l && elem[0:l] == "validating" {
elem = elem[l:]
} else {
break
}
if len(elem) == 0 {
// Leaf node.
switch r.Method {
case "POST":
s.handleActionSubmissionAcceptedRequest([1]string{
args[0],
}, elemIsEscaped, w, r)
default:
s.notAllowed(w, r, "POST")
}
return
}
}
case 'v': // Prefix: "voke"
if l := len("voke"); len(elem) >= l && elem[0:l] == "voke" {
@@ -1023,6 +1081,68 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
}
}
case 's': // Prefix: "set-"
if l := len("set-"); len(elem) >= l && elem[0:l] == "set-" {
elem = elem[l:]
} else {
break
}
if len(elem) == 0 {
break
}
switch elem[0] {
case 'u': // Prefix: "uploading"
if l := len("uploading"); len(elem) >= l && elem[0:l] == "uploading" {
elem = elem[l:]
} else {
break
}
if len(elem) == 0 {
// Leaf node.
switch method {
case "POST":
r.name = ActionSubmissionValidatedOperation
r.summary = "Role Admin manually resets uploading softlock and changes status from Uploading -> Validated"
r.operationID = "actionSubmissionValidated"
r.pathPattern = "/submissions/{SubmissionID}/status/reset-uploading"
r.args = args
r.count = 1
return r, true
default:
return
}
}
case 'v': // Prefix: "validating"
if l := len("validating"); len(elem) >= l && elem[0:l] == "validating" {
elem = elem[l:]
} else {
break
}
if len(elem) == 0 {
// Leaf node.
switch method {
case "POST":
r.name = ActionSubmissionAcceptedOperation
r.summary = "Role Reviewer manually resets validating softlock and changes status from Validating -> Accepted"
r.operationID = "actionSubmissionAccepted"
r.pathPattern = "/submissions/{SubmissionID}/status/reset-validating"
r.args = args
r.count = 1
return r, true
default:
return
}
}
}
case 'v': // Prefix: "voke"
if l := len("voke"); len(elem) >= l && elem[0:l] == "voke" {