openapi: generate

This commit is contained in:
Quaternions 2025-04-03 13:17:59 -07:00
parent 3334b84d40
commit f9313ec08f
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131
5 changed files with 13 additions and 13 deletions

@ -50,7 +50,7 @@ type Invoker interface {
//
// (Internal endpoint) Fail an operation and write a StatusMessage.
//
// POST /operations/{OperationID}/failed
// POST /operations/{OperationID}/status/operation-failed
ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error
// ActionSubmissionAccepted invokes actionSubmissionAccepted operation.
//
@ -468,7 +468,7 @@ func (c *Client) sendActionMapfixValidated(ctx context.Context, params ActionMap
//
// (Internal endpoint) Fail an operation and write a StatusMessage.
//
// POST /operations/{OperationID}/failed
// POST /operations/{OperationID}/status/operation-failed
func (c *Client) ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error {
_, err := c.sendActionOperationFailed(ctx, params)
return err
@ -478,7 +478,7 @@ func (c *Client) sendActionOperationFailed(ctx context.Context, params ActionOpe
otelAttrs := []attribute.KeyValue{
otelogen.OperationID("actionOperationFailed"),
semconv.HTTPRequestMethodKey.String("POST"),
semconv.HTTPRouteKey.String("/operations/{OperationID}/failed"),
semconv.HTTPRouteKey.String("/operations/{OperationID}/status/operation-failed"),
}
// Run stopwatch.
@ -530,7 +530,7 @@ func (c *Client) sendActionOperationFailed(ctx context.Context, params ActionOpe
}
pathParts[1] = encoded
}
pathParts[2] = "/failed"
pathParts[2] = "/status/operation-failed"
uri.AddPathParts(u, pathParts[:]...)
stage = "EncodeQueryParams"

@ -485,14 +485,14 @@ func (s *Server) handleActionMapfixValidatedRequest(args [1]string, argsEscaped
//
// (Internal endpoint) Fail an operation and write a StatusMessage.
//
// POST /operations/{OperationID}/failed
// POST /operations/{OperationID}/status/operation-failed
func (s *Server) handleActionOperationFailedRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) {
statusWriter := &codeRecorder{ResponseWriter: w}
w = statusWriter
otelAttrs := []attribute.KeyValue{
otelogen.OperationID("actionOperationFailed"),
semconv.HTTPRequestMethodKey.String("POST"),
semconv.HTTPRouteKey.String("/operations/{OperationID}/failed"),
semconv.HTTPRouteKey.String("/operations/{OperationID}/status/operation-failed"),
}
// Start a span for this request.

@ -242,9 +242,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
break
}
switch elem[0] {
case '/': // Prefix: "/failed"
case '/': // Prefix: "/status/operation-failed"
if l := len("/failed"); len(elem) >= l && elem[0:l] == "/failed" {
if l := len("/status/operation-failed"); len(elem) >= l && elem[0:l] == "/status/operation-failed" {
elem = elem[l:]
} else {
break
@ -817,9 +817,9 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
break
}
switch elem[0] {
case '/': // Prefix: "/failed"
case '/': // Prefix: "/status/operation-failed"
if l := len("/failed"); len(elem) >= l && elem[0:l] == "/failed" {
if l := len("/status/operation-failed"); len(elem) >= l && elem[0:l] == "/status/operation-failed" {
elem = elem[l:]
} else {
break
@ -832,7 +832,7 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
r.name = ActionOperationFailedOperation
r.summary = "(Internal endpoint) Fail an operation and write a StatusMessage"
r.operationID = "actionOperationFailed"
r.pathPattern = "/operations/{OperationID}/failed"
r.pathPattern = "/operations/{OperationID}/status/operation-failed"
r.args = args
r.count = 1
return r, true

@ -30,7 +30,7 @@ type Handler interface {
//
// (Internal endpoint) Fail an operation and write a StatusMessage.
//
// POST /operations/{OperationID}/failed
// POST /operations/{OperationID}/status/operation-failed
ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error
// ActionSubmissionAccepted implements actionSubmissionAccepted operation.
//

@ -44,7 +44,7 @@ func (UnimplementedHandler) ActionMapfixValidated(ctx context.Context, params Ac
//
// (Internal endpoint) Fail an operation and write a StatusMessage.
//
// POST /operations/{OperationID}/failed
// POST /operations/{OperationID}/status/operation-failed
func (UnimplementedHandler) ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error {
return ht.ErrNotImplemented
}