From 2d0f55b9f338e49025ce151eb3dd21f71901f9cb Mon Sep 17 00:00:00 2001 From: Leandro Poroli Date: Mon, 30 Sep 2024 11:09:10 -0300 Subject: [PATCH 1/2] adding flow ID flag --- kardinal-cli/cmd/root.go | 3 + .../api/golang/server/server.gen.go | 56 +++++++++---------- .../api/golang/types/types.gen.go | 1 + .../api/typescript/client/types.d.ts | 1 + libs/cli-kontrol-api/specs/api.yaml | 2 + 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/kardinal-cli/cmd/root.go b/kardinal-cli/cmd/root.go index 7850d85..a858123 100644 --- a/kardinal-cli/cmd/root.go +++ b/kardinal-cli/cmd/root.go @@ -81,6 +81,7 @@ var ( templateYamlFile string templateDescription string templateArgsFile string + flowID string ) var rootCmd = &cobra.Command{ @@ -641,6 +642,7 @@ func init() { createCmd.Flags().StringSliceVarP(&serviceImagePairs, "service-image", "s", []string{}, "Extra service and respective image to include in the same flow (can be used multiple times)") createCmd.Flags().StringVarP(&templateName, "template", "t", "", "Template name to use for the flow creation") createCmd.Flags().StringVarP(&templateArgsFile, "template-args", "a", "", "JSON with the template arguments or path to YAML file containing template arguments") + createCmd.Flags().StringVarP(&flowID, "ID", "i", "", "Set the flow id") deployCmd.PersistentFlags().StringVarP(&kubernetesManifestFile, "k8s-manifest", "k", "", "Path to the K8S manifest file") deployCmd.MarkPersistentFlagRequired("k8s-manifest") @@ -859,6 +861,7 @@ func createDevFlow(tenantUuid api_types.Uuid, pairsMap map[string]string, templa } resp, err := client.PostTenantUuidFlowCreateWithResponse(ctx, tenantUuid, api_types.PostTenantUuidFlowCreateJSONRequestBody{ + FlowId: &flowID, FlowSpec: devSpec, TemplateSpec: templateSpec, }) diff --git a/libs/cli-kontrol-api/api/golang/server/server.gen.go b/libs/cli-kontrol-api/api/golang/server/server.gen.go index ff52ee3..44b9a3b 100644 --- a/libs/cli-kontrol-api/api/golang/server/server.gen.go +++ b/libs/cli-kontrol-api/api/golang/server/server.gen.go @@ -961,34 +961,34 @@ func (sh *strictHandler) GetTenantUuidTopology(ctx echo.Context, uuid Uuid) erro var swaggerSpec = []string{ "H4sIAAAAAAAC/8xaW2/buBL+KwTPeZSt5JwusPBbmzRt0LQIGmeBRREUjDSW2UikSlJOjMD/fcGbLhZl", - "y5smzZsizn0+zozGecQJL0rOgCmJZ4+4JIIUoECYvxY5v5/QVD+mIBNBS0U5wzN8lvN7RFNgii4oCBxh", - "ql+XRC1xhBkpAM9q7ggL+FlRASmeKVFBhGWyhIJosWpdalKpBGUZ3mwirKAoc6JgYqVsa9ZvEV8gtQTk", - "ScPqu4IOM6KqQl5fX5+fet0CJK9EMqDb8B+icqOJZcmZBBP590JwoR8SzhQwpR9JWeY0IdqY+IfUFj22", - "JJaClyAUtfzg+bseGLHIKI+2bYhwIbMhlgKkJFmAa9P28pvTe1OT8dsfkCjrYECu1vqFqzNesfQJ3oaS", - "9dUlCJ2fhnz1+ZvYk0HucKy2vO4Ki7Q9Y0JQK2FcoYWJgSayXhrHTvJKKhBzXvKcZ+tAntPMhUBBYR7+", - "K2CBZ/g/cXOxYycxfp9moJ13lhEhyFr/zXh6gJQvPA1I2QqJFRk5A/vRiLAxpudQTm4h7+fjQr9GCw3e", - "JSAtdBrKqruTPfb5Elrlyt/hOvppXVIGJSsiMlBjJVvqMZK3wlYXFacvFDhdfPuBI0kCUk6AKbEencpz", - "lgmQ8q3hfW9YA/BotYFeXKic3BIJOWXQOr/lPAfCeu41LaFj7pCXVyUkHV+2rn1BMpjkPCHKFjt4IEWZ", - "GwNIcgcsnZCZbgFSBcECYkWTptH0uT0F2Zu3rilbskPubcf4A1FwT9YnnC1o1nc1s8f68WGScVe1/Oup", - "48ZRczqhRcmFQaxrSllNZJrVDEuayendn3JKeewOJ6SkMSmpjFfHvi01XnoJIYcCUOp5sQtI5kxbKkuS", - "QJBkyaXyyeod7mZ1+Qie+Q6wO8MNdLcsbdnV6Gnb4zTsCNpQ1qk93s46A3XPxR1l2ep46kTsTn2bo8m/", - "S71OeUM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RYiXtm7n", + "a3RP1RIR1FH/GnB99qow/ejAsbF1PwcL8C6wT837LrTP/OT9b6Ad7aXzmLW7oJ2ih4d+i6prhfHgFcTV", + "XiYMdMduIOVTysMTsDvqzGhB3Bu+XnexLgijC7AVeuAqnEoELC05ZQoJUJVgEpE8N1Pap+oWBAMFsv52", + "Vt8GuAaJlPvOgShDnAEqqlzRSU3uLWjGkmgXDD57g18CCQ+TNSnyXzNpPW9qIyyroiBirUu/C3wd4hQW", + "lJkpXeeANCH/++3ni3bcFcmknal1uHGEa3jcBLDjW9vIDTyvyV/xJq6PwiM28gWVyhxXvGM19PW5kCEX", + "xd+xrWuTDhzE6hz9rmlsTG6Gx/R66GFw3z5Bvtwk0+Cnb51fexWFv0HIY+c/FQcNNzVc/MMX+8Hkeeac", + "7n8/xk07dcxfw7SjWl/8R9RLT/17yuUulG//gyEE9qbrL7gojJaXCPpm808AAAD//9jYkDP+JAAA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/libs/cli-kontrol-api/api/golang/types/types.gen.go b/libs/cli-kontrol-api/api/golang/types/types.gen.go index 32604a6..fb30ed4 100644 --- a/libs/cli-kontrol-api/api/golang/types/types.gen.go +++ b/libs/cli-kontrol-api/api/golang/types/types.gen.go @@ -167,6 +167,7 @@ type NotFound struct { // PostTenantUuidFlowCreateJSONBody defines parameters for PostTenantUuidFlowCreate. type PostTenantUuidFlowCreateJSONBody struct { + FlowId *string `json:"flow-id,omitempty"` FlowSpec FlowSpec `json:"flow_spec"` TemplateSpec *TemplateSpec `json:"template_spec,omitempty"` } diff --git a/libs/cli-kontrol-api/api/typescript/client/types.d.ts b/libs/cli-kontrol-api/api/typescript/client/types.d.ts index f698dc2..a9b2e6c 100644 --- a/libs/cli-kontrol-api/api/typescript/client/types.d.ts +++ b/libs/cli-kontrol-api/api/typescript/client/types.d.ts @@ -29,6 +29,7 @@ export interface paths { requestBody: { content: { "application/json": { + "flow-id"?: string; flow_spec: components["schemas"]["FlowSpec"]; template_spec?: components["schemas"]["TemplateSpec"]; }; diff --git a/libs/cli-kontrol-api/specs/api.yaml b/libs/cli-kontrol-api/specs/api.yaml index 411a99c..c46b797 100644 --- a/libs/cli-kontrol-api/specs/api.yaml +++ b/libs/cli-kontrol-api/specs/api.yaml @@ -30,6 +30,8 @@ paths: schema: type: object properties: + flow-id: + type: string flow_spec: $ref: "#/components/schemas/FlowSpec" template_spec: From 22270454aa6b57cd701cc0a84f937dc204aefa4f Mon Sep 17 00:00:00 2001 From: Leandro Poroli Date: Mon, 30 Sep 2024 12:19:59 -0300 Subject: [PATCH 2/2] adding 400 status code error in the cli-kontrol-api --- .../api/golang/client/client.gen.go | 80 +++++++++ .../api/golang/server/server.gen.go | 157 ++++++++++++++---- .../api/golang/types/types.gen.go | 9 + .../api/typescript/client/types.d.ts | 21 +++ libs/cli-kontrol-api/specs/api.yaml | 36 ++++ 5 files changed, 274 insertions(+), 29 deletions(-) diff --git a/libs/cli-kontrol-api/api/golang/client/client.gen.go b/libs/cli-kontrol-api/api/golang/client/client.gen.go index af1911b..fea9dfb 100644 --- a/libs/cli-kontrol-api/api/golang/client/client.gen.go +++ b/libs/cli-kontrol-api/api/golang/client/client.gen.go @@ -755,6 +755,7 @@ type GetHealthResponse struct { Body []byte HTTPResponse *http.Response JSON200 *string + JSON400 *RequestError JSON500 *Error } @@ -778,6 +779,7 @@ type PostTenantUuidDeployResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Flow + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -802,6 +804,7 @@ type PostTenantUuidFlowCreateResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Flow + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -825,6 +828,7 @@ func (r PostTenantUuidFlowCreateResponse) StatusCode() int { type DeleteTenantUuidFlowFlowIdResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -849,6 +853,7 @@ type GetTenantUuidFlowsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]Flow + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -873,6 +878,7 @@ type GetTenantUuidManifestResponse struct { Body []byte HTTPResponse *http.Response YAML200 *string + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -897,6 +903,7 @@ type GetTenantUuidTemplatesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]Template + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -921,6 +928,7 @@ type PostTenantUuidTemplatesCreateResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Template + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -944,6 +952,7 @@ func (r PostTenantUuidTemplatesCreateResponse) StatusCode() int { type DeleteTenantUuidTemplatesTemplateNameResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -968,6 +977,7 @@ type GetTenantUuidTopologyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ClusterTopology + JSON400 *RequestError JSON404 *NotFound JSON500 *Error } @@ -1123,6 +1133,13 @@ func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1156,6 +1173,13 @@ func ParsePostTenantUuidDeployResponse(rsp *http.Response) (*PostTenantUuidDeplo } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1196,6 +1220,13 @@ func ParsePostTenantUuidFlowCreateResponse(rsp *http.Response) (*PostTenantUuidF } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1229,6 +1260,13 @@ func ParseDeleteTenantUuidFlowFlowIdResponse(rsp *http.Response) (*DeleteTenantU } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1269,6 +1307,13 @@ func ParseGetTenantUuidFlowsResponse(rsp *http.Response) (*GetTenantUuidFlowsRes } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1302,6 +1347,13 @@ func ParseGetTenantUuidManifestResponse(rsp *http.Response) (*GetTenantUuidManif } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1349,6 +1401,13 @@ func ParseGetTenantUuidTemplatesResponse(rsp *http.Response) (*GetTenantUuidTemp } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1389,6 +1448,13 @@ func ParsePostTenantUuidTemplatesCreateResponse(rsp *http.Response) (*PostTenant } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1422,6 +1488,13 @@ func ParseDeleteTenantUuidTemplatesTemplateNameResponse(rsp *http.Response) (*De } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1462,6 +1535,13 @@ func ParseGetTenantUuidTopologyResponse(rsp *http.Response) (*GetTenantUuidTopol } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest RequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/libs/cli-kontrol-api/api/golang/server/server.gen.go b/libs/cli-kontrol-api/api/golang/server/server.gen.go index 44b9a3b..08384c4 100644 --- a/libs/cli-kontrol-api/api/golang/server/server.gen.go +++ b/libs/cli-kontrol-api/api/golang/server/server.gen.go @@ -288,6 +288,14 @@ type NotFoundJSONResponse struct { ResourceType string `json:"resource-type"` } +type RequestErrorJSONResponse struct { + // Error Error type + Error string `json:"error"` + + // Msg Error message + Msg *string `json:"msg,omitempty"` +} + type GetHealthRequestObject struct { } @@ -304,6 +312,15 @@ func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseW return json.NewEncoder(w).Encode(response) } +type GetHealth400JSONResponse struct{ RequestErrorJSONResponse } + +func (response GetHealth400JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type GetHealth500JSONResponse struct{ ErrorJSONResponse } func (response GetHealth500JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error { @@ -331,6 +348,15 @@ func (response PostTenantUuidDeploy200JSONResponse) VisitPostTenantUuidDeployRes return json.NewEncoder(w).Encode(response) } +type PostTenantUuidDeploy400JSONResponse struct{ RequestErrorJSONResponse } + +func (response PostTenantUuidDeploy400JSONResponse) VisitPostTenantUuidDeployResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type PostTenantUuidDeploy404JSONResponse struct{ NotFoundJSONResponse } func (response PostTenantUuidDeploy404JSONResponse) VisitPostTenantUuidDeployResponse(w http.ResponseWriter) error { @@ -367,6 +393,15 @@ func (response PostTenantUuidFlowCreate200JSONResponse) VisitPostTenantUuidFlowC return json.NewEncoder(w).Encode(response) } +type PostTenantUuidFlowCreate400JSONResponse struct{ RequestErrorJSONResponse } + +func (response PostTenantUuidFlowCreate400JSONResponse) VisitPostTenantUuidFlowCreateResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type PostTenantUuidFlowCreate404JSONResponse struct{ NotFoundJSONResponse } func (response PostTenantUuidFlowCreate404JSONResponse) VisitPostTenantUuidFlowCreateResponse(w http.ResponseWriter) error { @@ -403,6 +438,15 @@ func (response DeleteTenantUuidFlowFlowId2xxResponse) VisitDeleteTenantUuidFlowF return nil } +type DeleteTenantUuidFlowFlowId400JSONResponse struct{ RequestErrorJSONResponse } + +func (response DeleteTenantUuidFlowFlowId400JSONResponse) VisitDeleteTenantUuidFlowFlowIdResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type DeleteTenantUuidFlowFlowId404JSONResponse struct{ NotFoundJSONResponse } func (response DeleteTenantUuidFlowFlowId404JSONResponse) VisitDeleteTenantUuidFlowFlowIdResponse(w http.ResponseWriter) error { @@ -438,6 +482,15 @@ func (response GetTenantUuidFlows200JSONResponse) VisitGetTenantUuidFlowsRespons return json.NewEncoder(w).Encode(response) } +type GetTenantUuidFlows400JSONResponse struct{ RequestErrorJSONResponse } + +func (response GetTenantUuidFlows400JSONResponse) VisitGetTenantUuidFlowsResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type GetTenantUuidFlows404JSONResponse struct{ NotFoundJSONResponse } func (response GetTenantUuidFlows404JSONResponse) VisitGetTenantUuidFlowsResponse(w http.ResponseWriter) error { @@ -483,6 +536,15 @@ func (response GetTenantUuidManifest200ApplicationxYamlResponse) VisitGetTenantU return err } +type GetTenantUuidManifest400JSONResponse struct{ RequestErrorJSONResponse } + +func (response GetTenantUuidManifest400JSONResponse) VisitGetTenantUuidManifestResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type GetTenantUuidManifest404JSONResponse struct{ NotFoundJSONResponse } func (response GetTenantUuidManifest404JSONResponse) VisitGetTenantUuidManifestResponse(w http.ResponseWriter) error { @@ -518,6 +580,15 @@ func (response GetTenantUuidTemplates200JSONResponse) VisitGetTenantUuidTemplate return json.NewEncoder(w).Encode(response) } +type GetTenantUuidTemplates400JSONResponse struct{ RequestErrorJSONResponse } + +func (response GetTenantUuidTemplates400JSONResponse) VisitGetTenantUuidTemplatesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type GetTenantUuidTemplates404JSONResponse struct{ NotFoundJSONResponse } func (response GetTenantUuidTemplates404JSONResponse) VisitGetTenantUuidTemplatesResponse(w http.ResponseWriter) error { @@ -554,6 +625,15 @@ func (response PostTenantUuidTemplatesCreate200JSONResponse) VisitPostTenantUuid return json.NewEncoder(w).Encode(response) } +type PostTenantUuidTemplatesCreate400JSONResponse struct{ RequestErrorJSONResponse } + +func (response PostTenantUuidTemplatesCreate400JSONResponse) VisitPostTenantUuidTemplatesCreateResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type PostTenantUuidTemplatesCreate404JSONResponse struct{ NotFoundJSONResponse } func (response PostTenantUuidTemplatesCreate404JSONResponse) VisitPostTenantUuidTemplatesCreateResponse(w http.ResponseWriter) error { @@ -590,6 +670,15 @@ func (response DeleteTenantUuidTemplatesTemplateName2xxResponse) VisitDeleteTena return nil } +type DeleteTenantUuidTemplatesTemplateName400JSONResponse struct{ RequestErrorJSONResponse } + +func (response DeleteTenantUuidTemplatesTemplateName400JSONResponse) VisitDeleteTenantUuidTemplatesTemplateNameResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type DeleteTenantUuidTemplatesTemplateName404JSONResponse struct{ NotFoundJSONResponse } func (response DeleteTenantUuidTemplatesTemplateName404JSONResponse) VisitDeleteTenantUuidTemplatesTemplateNameResponse(w http.ResponseWriter) error { @@ -625,6 +714,15 @@ func (response GetTenantUuidTopology200JSONResponse) VisitGetTenantUuidTopologyR return json.NewEncoder(w).Encode(response) } +type GetTenantUuidTopology400JSONResponse struct{ RequestErrorJSONResponse } + +func (response GetTenantUuidTopology400JSONResponse) VisitGetTenantUuidTopologyResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + type GetTenantUuidTopology404JSONResponse struct{ NotFoundJSONResponse } func (response GetTenantUuidTopology404JSONResponse) VisitGetTenantUuidTopologyResponse(w http.ResponseWriter) error { @@ -960,35 +1058,36 @@ func (sh *strictHandler) GetTenantUuidTopology(ctx echo.Context, uuid Uuid) erro // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/8xaW2/buBL+KwTPeZSt5JwusPBbmzRt0LQIGmeBRREUjDSW2UikSlJOjMD/fcGbLhZl", - "y5smzZsszn0+zgwpP+KEFyVnwJTEs0dcEkEKUCDMr0XO7yc01Y8pyETQUlHO8Ayf5fwe0RSYogsKAkeY", - "6tclUUscYUYKwLOaO8ICflZUQIpnSlQQYZksoSBarFqXmlQqQVmGN5sIKyjKnCiYWCnbmvVbxBdILQF5", - "0rD6rqDDjKiqkNfX1+enXrcAySuRDOg2/Ieo3GhiWXImwUT+vRBc6IeEMwVM6UdSljlNiDYm/iG1RY8t", - "iaXgJQhFLT94/q4HRiwyyqNtGyJcyGyIpQApSRbg2rS9/Ob03tRk/PYHJMo6GJCrtX7h6oxXLH2Ct6Fk", - "fXUJQuenIV99/iZ2ZZA7HKstr7vCIm3PmBDUShhXaGFioImsl8axk7ySCsSclzzn2TqQ5zRzIVBQmIf/", - "CljgGf5P3Gzs2EmM36cZaOedZUQIsta/GU8PkPKFpwEpWyGxIiNnYD8aETbG9BzKyS3k/Xxc6NdoocG7", - "BKSFTkNZdXuyxz5fQqtc+T1cRz+tS8qgZEVEBmqsZEs9RvJW2Oqi4vSFAqeLbz9wJElAygk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L9s", + "bbIzoX5/7Ph+PWgANi55vg5YszEdxYKbNKTKXAVOLs7jD5wpwXP0+vIc1/iBZ/h4ejQ90sryEhgpKZ7h", + "f5tX1unG6HgJJNcB6A0PuUB2DSVLSO5QYqXgCLuLpvaRmXLoeo/fgXpvWW0Nyf51dHTQgCQwdOtqdlWZ", + "Hn5R5cgL0ka+snJCWFjrE3fGNpsI/2cMkdttVIkVMMJU/FhVNN3EthyZxOIy4JVLLtXcUFxXNLW12Li/", + "GeB+CYtvtsRmTrm5sckCUr3h6fogl+7qD/rtccDlVnFEUCl4ijjL1yixNL356eaJ4d+lq5ksBNVbId0T", + "oESA4YukIqqSP5wWr45e7SeqR6J/Qx5p7WOjPYxNJu2ME0vx0xPqsGvzV+mK777YmiLdLq5jCDsVPtQp", + "Wi5jZp3WnYig1CdUJSnLkNctQry0CJGv0T1VS0RQR/zvcBjOXv5BeHQZtbGwlIM9Fd3TcGred8/Dmb8Y", + "/Mh5iPbu84luj047rg8PfQStq5Kx4KUGww5IBhC/6335lEL0hFMy6h5sj0uvofwDsaQgjC7AAsjAfwJU", + "ImBpySlTSICqBJOI5LlpVz9UtyAYKJD136f1WMSBPlLuDx9EGeIMUFHlik7q7V6Dpj+LduXOR6/wz0if", + "h8maFPkvbDmfNx8iLKuiIGKt4cxFq45LCgvKzB1HB440cfr/648X7WApkkl7I9ExwhGuc+omkHAerkeW", + "inm9/TcuF/UgYUTJuKBSmcueN6w+L/pWzZDz4ospILUdB3akdWB/VVs6JqDDl5y6+2Nw3760/7yWrkm6", + "vnZ+7eXiUpNWj52vfg7q8uoc8w+f7B9bz9Pwdb9OGtf21YF6sW2fan3OMaKc+92/pprvOk/bn6eEjlXT", + "ySy4KIyU3zZSm81fAQAA//8RkEwHCigAAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/libs/cli-kontrol-api/api/golang/types/types.gen.go b/libs/cli-kontrol-api/api/golang/types/types.gen.go index fb30ed4..2144e5e 100644 --- a/libs/cli-kontrol-api/api/golang/types/types.gen.go +++ b/libs/cli-kontrol-api/api/golang/types/types.gen.go @@ -165,6 +165,15 @@ type NotFound struct { ResourceType string `json:"resource-type"` } +// RequestError defines model for RequestError. +type RequestError struct { + // Error Error type + Error string `json:"error"` + + // Msg Error message + Msg *string `json:"msg,omitempty"` +} + // PostTenantUuidFlowCreateJSONBody defines parameters for PostTenantUuidFlowCreate. type PostTenantUuidFlowCreateJSONBody struct { FlowId *string `json:"flow-id,omitempty"` diff --git a/libs/cli-kontrol-api/api/typescript/client/types.d.ts b/libs/cli-kontrol-api/api/typescript/client/types.d.ts index a9b2e6c..af21ac8 100644 --- a/libs/cli-kontrol-api/api/typescript/client/types.d.ts +++ b/libs/cli-kontrol-api/api/typescript/client/types.d.ts @@ -14,6 +14,7 @@ export interface paths { "application/json": string; }; }; + 400: components["responses"]["RequestError"]; 500: components["responses"]["Error"]; }; }; @@ -42,6 +43,7 @@ export interface paths { "application/json": components["schemas"]["Flow"]; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -61,6 +63,7 @@ export interface paths { "application/json": components["schemas"]["Flow"][]; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -75,6 +78,7 @@ export interface paths { }; }; responses: { + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; /** @description Dev flow deletion status */ @@ -104,6 +108,7 @@ export interface paths { "application/json": components["schemas"]["Flow"]; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -123,6 +128,7 @@ export interface paths { "application/json": components["schemas"]["ClusterTopology"]; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -148,6 +154,7 @@ export interface paths { "application/json": components["schemas"]["Template"]; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -167,6 +174,7 @@ export interface paths { "application/json": components["schemas"]["Template"][]; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -181,6 +189,7 @@ export interface paths { }; }; responses: { + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; /** @description Template deletion status */ @@ -208,6 +217,7 @@ export interface paths { "application/x-yaml": string; }; }; + 400: components["responses"]["RequestError"]; 404: components["responses"]["NotFound"]; 500: components["responses"]["Error"]; }; @@ -320,6 +330,17 @@ export interface components { }; }; }; + /** @description Request error */ + RequestError: { + content: { + "application/json": { + /** @description Error type */ + error: string; + /** @description Error message */ + msg?: string; + }; + }; + }; /** @description Resource not found */ NotFound: { content: { diff --git a/libs/cli-kontrol-api/specs/api.yaml b/libs/cli-kontrol-api/specs/api.yaml index c46b797..09ebaa9 100644 --- a/libs/cli-kontrol-api/specs/api.yaml +++ b/libs/cli-kontrol-api/specs/api.yaml @@ -11,6 +11,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "200": description: Successful response content: @@ -41,6 +43,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -57,6 +61,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -76,6 +82,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "2xx": @@ -95,6 +103,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -111,6 +121,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -134,6 +146,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -150,6 +164,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -169,6 +185,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "2xx": @@ -186,6 +204,8 @@ paths: responses: "500": $ref: "#/components/responses/Error" + "400": + $ref: "#/components/responses/RequestError" "404": $ref: "#/components/responses/NotFound" "200": @@ -213,6 +233,22 @@ components: required: - error + RequestError: + description: Request error + content: + application/json: + schema: + type: object + properties: + error: + type: string + description: Error type + msg: + type: string + description: Error message + required: + - error + NotFound: description: Resource not found content: