From a8a48454e71a6fce1ad375e2dcac7e30d142c567 Mon Sep 17 00:00:00 2001 From: Laurent Luce Date: Wed, 18 Sep 2024 17:42:43 -0400 Subject: [PATCH] Normlalize cli kontrol api properties names using camelCase --- kardinal-cli/cmd/root.go | 4 +- .../api/golang/client/client.gen.go | 4 +- .../api/golang/server/server.gen.go | 84 +++++++++---------- .../api/golang/types/types.gen.go | 28 +++---- .../api/typescript/client/types.d.ts | 36 ++++---- libs/cli-kontrol-api/specs/api.yaml | 56 ++++++------- 6 files changed, 106 insertions(+), 106 deletions(-) diff --git a/kardinal-cli/cmd/root.go b/kardinal-cli/cmd/root.go index 59de46f..19bc7ec 100644 --- a/kardinal-cli/cmd/root.go +++ b/kardinal-cli/cmd/root.go @@ -816,8 +816,8 @@ func createDevFlow(tenantUuid api_types.Uuid, pairsMap map[string]string, templa devSpec := api_types.FlowSpec{} for serviceName, imageLocator := range pairsMap { devSpec = append(devSpec, struct { - ImageLocator string `json:"image-locator"` - ServiceName string `json:"service-name"` + ImageLocator string `json:"imageLocator"` + ServiceName string `json:"serviceName"` }{ ImageLocator: imageLocator, ServiceName: serviceName, 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..a191510 100644 --- a/libs/cli-kontrol-api/api/golang/client/client.gen.go +++ b/libs/cli-kontrol-api/api/golang/client/client.gen.go @@ -419,7 +419,7 @@ func NewDeleteTenantUuidFlowFlowIdRequest(server string, uuid Uuid, flowId FlowI var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "flow-id", runtime.ParamLocationPath, flowId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "flowId", runtime.ParamLocationPath, flowId) if err != nil { return nil, err } @@ -609,7 +609,7 @@ func NewDeleteTenantUuidTemplatesTemplateNameRequest(server string, uuid Uuid, t var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "template-name", runtime.ParamLocationPath, templateName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "templateName", runtime.ParamLocationPath, templateName) if err != nil { return nil, err } 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 2810ba0..1aaf5b3 100644 --- a/libs/cli-kontrol-api/api/golang/server/server.gen.go +++ b/libs/cli-kontrol-api/api/golang/server/server.gen.go @@ -35,7 +35,7 @@ type ServerInterface interface { // (POST /tenant/{uuid}/flow/create) PostTenantUuidFlowCreate(ctx echo.Context, uuid Uuid) error - // (DELETE /tenant/{uuid}/flow/{flow-id}) + // (DELETE /tenant/{uuid}/flow/{flowId}) DeleteTenantUuidFlowFlowId(ctx echo.Context, uuid Uuid, flowId FlowId) error // (GET /tenant/{uuid}/flows) @@ -50,7 +50,7 @@ type ServerInterface interface { // (POST /tenant/{uuid}/templates/create) PostTenantUuidTemplatesCreate(ctx echo.Context, uuid Uuid) error - // (DELETE /tenant/{uuid}/templates/{template-name}) + // (DELETE /tenant/{uuid}/templates/{templateName}) DeleteTenantUuidTemplatesTemplateName(ctx echo.Context, uuid Uuid, templateName TemplateName) error // (GET /tenant/{uuid}/topology) @@ -114,12 +114,12 @@ func (w *ServerInterfaceWrapper) DeleteTenantUuidFlowFlowId(ctx echo.Context) er return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter uuid: %s", err)) } - // ------------- Path parameter "flow-id" ------------- + // ------------- Path parameter "flowId" ------------- var flowId FlowId - err = runtime.BindStyledParameterWithOptions("simple", "flow-id", ctx.Param("flow-id"), &flowId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "flowId", ctx.Param("flowId"), &flowId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter flow-id: %s", err)) + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter flowId: %s", err)) } // Invoke the callback with all the unmarshaled arguments @@ -202,12 +202,12 @@ func (w *ServerInterfaceWrapper) DeleteTenantUuidTemplatesTemplateName(ctx echo. return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter uuid: %s", err)) } - // ------------- Path parameter "template-name" ------------- + // ------------- Path parameter "templateName" ------------- var templateName TemplateName - err = runtime.BindStyledParameterWithOptions("simple", "template-name", ctx.Param("template-name"), &templateName, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "templateName", ctx.Param("templateName"), &templateName, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter template-name: %s", err)) + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter templateName: %s", err)) } // Invoke the callback with all the unmarshaled arguments @@ -262,12 +262,12 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL router.GET(baseURL+"/health", wrapper.GetHealth) router.POST(baseURL+"/tenant/:uuid/deploy", wrapper.PostTenantUuidDeploy) router.POST(baseURL+"/tenant/:uuid/flow/create", wrapper.PostTenantUuidFlowCreate) - router.DELETE(baseURL+"/tenant/:uuid/flow/:flow-id", wrapper.DeleteTenantUuidFlowFlowId) + router.DELETE(baseURL+"/tenant/:uuid/flow/:flowId", wrapper.DeleteTenantUuidFlowFlowId) router.GET(baseURL+"/tenant/:uuid/flows", wrapper.GetTenantUuidFlows) router.GET(baseURL+"/tenant/:uuid/manifest", wrapper.GetTenantUuidManifest) router.GET(baseURL+"/tenant/:uuid/templates", wrapper.GetTenantUuidTemplates) router.POST(baseURL+"/tenant/:uuid/templates/create", wrapper.PostTenantUuidTemplatesCreate) - router.DELETE(baseURL+"/tenant/:uuid/templates/:template-name", wrapper.DeleteTenantUuidTemplatesTemplateName) + router.DELETE(baseURL+"/tenant/:uuid/templates/:templateName", wrapper.DeleteTenantUuidTemplatesTemplateName) router.GET(baseURL+"/tenant/:uuid/topology", wrapper.GetTenantUuidTopology) } @@ -285,7 +285,7 @@ type NotFoundJSONResponse struct { Id string `json:"id"` // ResourceType Resource type - ResourceType string `json:"resource-type"` + ResourceType string `json:"resourceType"` } type GetHealthRequestObject struct { @@ -387,7 +387,7 @@ func (response PostTenantUuidFlowCreate500JSONResponse) VisitPostTenantUuidFlowC type DeleteTenantUuidFlowFlowIdRequestObject struct { Uuid Uuid `json:"uuid"` - FlowId FlowId `json:"flow-id"` + FlowId FlowId `json:"flowId"` } type DeleteTenantUuidFlowFlowIdResponseObject interface { @@ -574,7 +574,7 @@ func (response PostTenantUuidTemplatesCreate500JSONResponse) VisitPostTenantUuid type DeleteTenantUuidTemplatesTemplateNameRequestObject struct { Uuid Uuid `json:"uuid"` - TemplateName TemplateName `json:"template-name"` + TemplateName TemplateName `json:"templateName"` } type DeleteTenantUuidTemplatesTemplateNameResponseObject interface { @@ -655,7 +655,7 @@ type StrictServerInterface interface { // (POST /tenant/{uuid}/flow/create) PostTenantUuidFlowCreate(ctx context.Context, request PostTenantUuidFlowCreateRequestObject) (PostTenantUuidFlowCreateResponseObject, error) - // (DELETE /tenant/{uuid}/flow/{flow-id}) + // (DELETE /tenant/{uuid}/flow/{flowId}) DeleteTenantUuidFlowFlowId(ctx context.Context, request DeleteTenantUuidFlowFlowIdRequestObject) (DeleteTenantUuidFlowFlowIdResponseObject, error) // (GET /tenant/{uuid}/flows) @@ -670,7 +670,7 @@ type StrictServerInterface interface { // (POST /tenant/{uuid}/templates/create) PostTenantUuidTemplatesCreate(ctx context.Context, request PostTenantUuidTemplatesCreateRequestObject) (PostTenantUuidTemplatesCreateResponseObject, error) - // (DELETE /tenant/{uuid}/templates/{template-name}) + // (DELETE /tenant/{uuid}/templates/{templateName}) DeleteTenantUuidTemplatesTemplateName(ctx context.Context, request DeleteTenantUuidTemplatesTemplateNameRequestObject) (DeleteTenantUuidTemplatesTemplateNameResponseObject, error) // (GET /tenant/{uuid}/topology) @@ -960,33 +960,33 @@ func (sh *strictHandler) GetTenantUuidTopology(ctx echo.Context, uuid Uuid) erro // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/8xZX2/bOBL/KgTvHmUruesBB7+1SbNrNC2KjbPAoggKRhrLbCSSJSknRuDvviApUZJF", - "2fKmTf0mi8P5++OPM/IzTnghOAOmFZ49Y0EkKUCDtL+WOX+c0NQ8pqASSYWmnOEZvsr5I6IpME2XFCSO", - "MDWvBdErHGFGCsAzvzvCEr6XVEKKZ1qWEGGVrKAgRq3eCCOqtKQsw9tthDUUIicaJk7LrmXzFvEl0itA", - "tWjYfFfRcU6UZSjq29v5ZW1bguKlTAZs2/3HmNwaYSU4U2Az/15KLs1DwpkGps0jESKnCTHOxN+U8ei5", - "pVFILkBq6vZDvb8bgVWLrPFo14cIFyob2lKAUiQL7Nq2o/xS2b3zYvz+GyTaBRjQa6x+4vqKlyx9QbSh", - "Yv1RFQjNL0Ox1vWbuJXB3eFc7UTdVRYZf8akwBthXKOlzYERclHawC7yUmmQCy54zrNNoM5pVqVAQ2Ef", - "/i1hiWf4X3FzsONKY/w+zcAEX3lGpCQb85vx9Agtn3ga0LKTEqcyqhzsZyPC1pleQDm5h7xfj2vzGi0N", - "eFeAjNJpqKrVmextX6ygRVf1GfbZTz2lDGrWRGagx2p20mM076TNk0plL5Q4Q779xLW4uue8XStl3q1x", - "P8YdWFA1uScKcsqgJX/PeQ6E9Vxv6L4xN+T+jYCk48vOeS5IBpOcJ0Q7FoMnUojcWifJA7B0QmaG25UO", - "ogDkmibNDdLfXUuQgwXpurKjOxTebhLnLJOg1AVnS5oFQnXL5vFpkvGKjjAD/cjlA2XZ+nxaqcBRIzKh", - "heDS4rG6cto7cOTuoxl++L+aUh4TQeNGIF6f11dOK9DKSCimj4SyiooOxD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5NvAictCQntBJc", + "2jL0fabLgRPXhKb44Xc1oTwlgqYtQbo8a/pMx02vJObTR0KZR6A9frjj8RDSj04MkUgFSpAMoqXqk3Go", + "1psuWxTBBiGwWDeq29wy+q3uYUGDVgYFopgyCuu2cuto3zIdqIEcw2ogmNWVSXVBNDySVVvM5uxJg2Sk", + "7OS/1bAEqShnaqjFhAWF42R83/jb8extH3Z48q3XheluS3YaiYcAor3bM1LED78L9zpcMUv7pTewNQdR", + "8lXlB58uIhAhlmeTi/Z8JxpY6igMECGUA4A2/RuqMi5heTa5CcWxQ5GjjWoyR1Goaauu424sWLNmqI/E", + "qVOFkdwxD/zDy+JFRgtiw84OrZe4y8jtKe2ZOpwaOm8i28xW14aC7D6kOSroEvaK6eQ+XNqfWgR7Lnpb", + "FHsj3UwO/TgTWdRVs7iSPKcmMqT83CFyq9ewZX/PljmudLaMCYacsjm3NUi1nUzOr6/SD5xpyUv09vMV", + "DrCLp/hscjo5NaZyAYwIiqf4//aVC7l1OV0AKU34B+s5l8idoWwB2QPKnBacYD/JmgjZ9crcCvwH6D+d", + "qI1N9H+npwdtZpHNtm/ZTZ1loNS8LlGjyDj5m9MTayHBntQvjVZqqoERptNns2yvU4cqtkK4ijj4mSs9", + "sxy3Nc0dpNpIth87vsTVtySp3evXdy7toPQ7nq8Ois6uDjkcuCLRc4YjgoTkOeKsXKHM8Qy+N6xfmMld", + "ttotJGreEpmuiDIJVi5SmuhamQy/OX2zP8Pha8APKAljSGoNgbF1Yfw6dxyvXhvDAabBvH2ZsHQdTBvD", + "18PV2GBjD8Z8yHDxQgTlTfJrRVmBGssSxIWD5XKFHqleIIJ62o+hcC+Pqmif3WS5drhegivgfuFe2Pf9", + "0r1sBtLvKd1kL52fd12RdxP09DTsQAEKrANHEFVr6rbm14+jesntf0HljtqkXAkPJqvjxuKKMDoHB8Bb", + "PqVRhYDlglOmkQRdS6YQKUs7g32o70Ey0KDCl/ewI/v+h7T/ToooQ5wBqupS05NA3ljQTh3JrjL42Bj8", + "GpXwdLIiVfljBqmfm9oEq7qqiFwZ4PeBDyHOYU6ZHcFNDkgb8n/efrzuxl2TQrmJ2YQbJziUx12kdpq2", + "NvICzwL5EV/isOWOuMjXVGm7jDSOhdI3Sx9DPoq/4loHkw6cs0KOftWwNSY326fwMPIweOzuh683x7T1", + "M7SuOTsK4G8r5Lm7Hx802oRqmfX/0v05U05vjR8364SIH8Osozv/F45Ay4b614Dlrhrf/P8zVuptz59z", + "WVktrxH09frfAAAA//826IWZNiEAAA==", } // 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 1b1496d..900110f 100644 --- a/libs/cli-kontrol-api/api/golang/types/types.gen.go +++ b/libs/cli-kontrol-api/api/golang/types/types.gen.go @@ -36,15 +36,15 @@ type Edge struct { // Flow defines model for Flow. type Flow struct { - FlowId string `json:"flow-id"` - FlowUrls []string `json:"flow-urls"` - IsBaseline *bool `json:"is-baseline,omitempty"` + FlowId string `json:"flowId"` + FlowUrls []string `json:"flowUrls"` + IsBaseline *bool `json:"isBaseline,omitempty"` } // FlowSpec defines model for FlowSpec. type FlowSpec = []struct { - ImageLocator string `json:"image-locator"` - ServiceName string `json:"service-name"` + ImageLocator string `json:"imageLocator"` + ServiceName string `json:"serviceName"` } // IngressConfig defines model for IngressConfig. @@ -54,9 +54,9 @@ type IngressConfig struct { // MainClusterConfig defines model for MainClusterConfig. type MainClusterConfig struct { - IngressConfigs *[]IngressConfig `json:"ingress-configs,omitempty"` + IngressConfigs *[]IngressConfig `json:"ingressConfigs,omitempty"` Namespace *string `json:"namespace,omitempty"` - ServiceConfigs *[]ServiceConfig `json:"service-configs,omitempty"` + ServiceConfigs *[]ServiceConfig `json:"serviceConfigs,omitempty"` } // Node defines model for Node. @@ -94,7 +94,7 @@ type ServiceConfig struct { type Template struct { Description *string `json:"description,omitempty"` Name string `json:"name"` - TemplateId string `json:"template-id"` + TemplateId string `json:"templateId"` } // TemplateConfig defines model for TemplateConfig. @@ -112,13 +112,13 @@ type TemplateSpec struct { Arguments *map[string]interface{} `json:"arguments,omitempty"` // TemplateName name of the template - TemplateName string `json:"template_name"` + TemplateName string `json:"templateName"` } -// FlowId defines model for flow-id. +// FlowId defines model for flowId. type FlowId = string -// TemplateName defines model for template-name. +// TemplateName defines model for templateName. type TemplateName = string // Uuid defines model for uuid. @@ -139,13 +139,13 @@ type NotFound struct { Id string `json:"id"` // ResourceType Resource type - ResourceType string `json:"resource-type"` + ResourceType string `json:"resourceType"` } // PostTenantUuidFlowCreateJSONBody defines parameters for PostTenantUuidFlowCreate. type PostTenantUuidFlowCreateJSONBody struct { - FlowSpec FlowSpec `json:"flow_spec"` - TemplateSpec *TemplateSpec `json:"template_spec,omitempty"` + FlowSpec FlowSpec `json:"flowSpec"` + TemplateSpec *TemplateSpec `json:"templateSpec,omitempty"` } // PostTenantUuidDeployJSONRequestBody defines body for PostTenantUuidDeploy for application/json ContentType. 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 5c74267..c274ce8 100644 --- a/libs/cli-kontrol-api/api/typescript/client/types.d.ts +++ b/libs/cli-kontrol-api/api/typescript/client/types.d.ts @@ -29,8 +29,8 @@ export interface paths { requestBody: { content: { "application/json": { - flow_spec: components["schemas"]["FlowSpec"]; - template_spec?: components["schemas"]["TemplateSpec"]; + flowSpec: components["schemas"]["FlowSpec"]; + templateSpec?: components["schemas"]["TemplateSpec"]; }; }; }; @@ -65,12 +65,12 @@ export interface paths { }; }; }; - "/tenant/{uuid}/flow/{flow-id}": { + "/tenant/{uuid}/flow/{flowId}": { delete: { parameters: { path: { uuid: components["parameters"]["uuid"]; - "flow-id": components["parameters"]["flow-id"]; + flowId: components["parameters"]["flowId"]; }; }; responses: { @@ -171,12 +171,12 @@ export interface paths { }; }; }; - "/tenant/{uuid}/templates/{template-name}": { + "/tenant/{uuid}/templates/{templateName}": { delete: { parameters: { path: { uuid: components["parameters"]["uuid"]; - "template-name": components["parameters"]["template-name"]; + templateName: components["parameters"]["templateName"]; }; }; responses: { @@ -219,24 +219,24 @@ export type webhooks = Record; export interface components { schemas: { MainClusterConfig: { - "service-configs"?: components["schemas"]["ServiceConfig"][]; - "ingress-configs"?: components["schemas"]["IngressConfig"][]; + serviceConfigs?: components["schemas"]["ServiceConfig"][]; + ingressConfigs?: components["schemas"]["IngressConfig"][]; namespace?: string; }; Flow: { - "flow-id": string; - "flow-urls": string[]; - "is-baseline"?: boolean; + flowId: string; + flowUrls: string[]; + isBaseline?: boolean; }; FlowSpec: { /** @example backend-a:latest */ - "image-locator": string; + imageLocator: string; /** @example backend-service-a */ - "service-name": string; + serviceName: string; }[]; TemplateSpec: { /** @description name of the template */ - template_name: string; + templateName: string; arguments?: { [key: string]: unknown; }; @@ -283,7 +283,7 @@ export interface components { description?: string; }; Template: { - "template-id": string; + templateId: string; name: string; description?: string; }; @@ -308,7 +308,7 @@ export interface components { content: { "application/json": { /** @description Resource type */ - "resource-type": string; + resourceType: string; /** @description Resource ID */ id: string; }; @@ -319,9 +319,9 @@ export interface components { /** @description UUID of the resource */ uuid: string; /** @description Flow identifier */ - "flow-id": string; + flowId: string; /** @description name of the template */ - "template-name": string; + templateName: string; }; requestBodies: never; headers: never; diff --git a/libs/cli-kontrol-api/specs/api.yaml b/libs/cli-kontrol-api/specs/api.yaml index 7386f08..f106641 100644 --- a/libs/cli-kontrol-api/specs/api.yaml +++ b/libs/cli-kontrol-api/specs/api.yaml @@ -30,12 +30,12 @@ paths: schema: type: object properties: - flow_spec: + flowSpec: $ref: "#/components/schemas/FlowSpec" - template_spec: + templateSpec: $ref: "#/components/schemas/TemplateSpec" required: - - flow_spec + - flowSpec responses: "500": $ref: "#/components/responses/Error" @@ -66,11 +66,11 @@ paths: items: $ref: "#/components/schemas/Flow" - /tenant/{uuid}/flow/{flow-id}: + /tenant/{uuid}/flow/{flowId}: delete: parameters: - $ref: "#/components/parameters/uuid" - - $ref: "#/components/parameters/flow-id" + - $ref: "#/components/parameters/flowId" responses: "500": $ref: "#/components/responses/Error" @@ -159,11 +159,11 @@ paths: items: $ref: "#/components/schemas/Template" - /tenant/{uuid}/templates/{template-name}: + /tenant/{uuid}/templates/{templateName}: delete: parameters: - $ref: "#/components/parameters/uuid" - - $ref: "#/components/parameters/template-name" + - $ref: "#/components/parameters/templateName" responses: "500": $ref: "#/components/responses/Error" @@ -218,14 +218,14 @@ components: schema: type: object properties: - resource-type: + resourceType: type: string description: Resource type id: type: string description: Resource ID required: - - resource-type + - resourceType - id parameters: uuid: @@ -236,8 +236,8 @@ components: schema: type: string - flow-id: - name: flow-id + flowId: + name: flowId in: path required: true description: Flow identifier @@ -245,8 +245,8 @@ components: type: string - template-name: - name: template-name + templateName: + name: templateName in: path required: true description: name of the template @@ -257,11 +257,11 @@ components: MainClusterConfig: type: object properties: - service-configs: + serviceConfigs: type: array items: $ref: "#/components/schemas/ServiceConfig" - ingress-configs: + ingressConfigs: type: array items: $ref: "#/components/schemas/IngressConfig" @@ -271,44 +271,44 @@ components: Flow: type: object properties: - flow-id: + flowId: type: string - flow-urls: + flowUrls: type: array items: type: string - is-baseline: + isBaseline: type: boolean required: - - flow-id - - flow-urls + - flowId + - flowUrls FlowSpec: type: array items: type: object properties: - image-locator: + imageLocator: type: string example: backend-a:latest - service-name: + serviceName: type: string example: backend-service-a required: - - image-locator - - service-name + - imageLocator + - serviceName TemplateSpec: type: object properties: - template_name: + templateName: type: string description: name of the template arguments: type: object additionalProperties: true required: - - template_name + - templateName Node: type: object @@ -418,14 +418,14 @@ components: Template: type: object properties: - template-id: + templateId: type: string name: type: string description: type: string required: - - template-id + - templateId - name IngressConfig: