From 5cd090419f8aab63183e11a086d3ef121900a848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Mon, 6 May 2024 14:13:31 +0000 Subject: [PATCH] wip: adding docs workflow --- .github/workflows/docs.yml | 40 +++++++++++ api/api.yml | 24 ++++++- internal/api/services/api.go | 10 --- internal/api/services/systems.go | 14 ++++ pkg/apis/client.gen.go | 89 +++++++++++++++++++++++- pkg/apis/errors.go | 10 ++- pkg/apis/models.gen.go | 112 +++++++++++++++---------------- pkg/apis/server.gen.go | 96 +++++++++++++++++++++++++- 8 files changed, 320 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..4d7114be --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,40 @@ +# .github/workflows/docs.yml + +name: Docs + +on: + workflow_call: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "14" + - run: npx @redocly/cli build-docs api/api.yml --o docs/index.html + - uses: actions/upload-artifact@v2 + if: github.ref == 'refs/heads/main' + with: + path: docs + + deploy: + if: github.ref == 'refs/heads/main' + permissions: + pages: write + id-token: write + runs-on: ubuntu-latest + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/download-artifact@v2 + with: + name: docs + - uses: actions/deploy-pages@v4 + id: deployment diff --git a/api/api.yml b/api/api.yml index bd7e4f86..6ce4a851 100644 --- a/api/api.yml +++ b/api/api.yml @@ -889,6 +889,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Operator" + "401": + $ref: "#/components/responses/Unauthorized" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/InternalError" put: summary: Updates the operator for a system operationId: updateSystemOperator @@ -897,12 +905,18 @@ paths: requestBody: $ref: "#/components/requestBodies/UpdateSystemOperator" responses: - "200": + "201": description: Successful content: application/json: schema: $ref: "#/components/schemas/Operator" + "401": + $ref: "#/components/responses/Unauthorized" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" delete: summary: Deletes the operator for a system operationId: deleteSystemOperator @@ -911,6 +925,12 @@ paths: responses: "204": description: Successful + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/InternalError" components: parameters: @@ -1097,7 +1117,7 @@ components: type: string claims: $ref: "#/components/schemas/JWTAccountClaims" - + # Body for creating an operator account user CreateOperatorAccountUser: content: application/json: diff --git a/internal/api/services/api.go b/internal/api/services/api.go index f79f78b8..a5c2025a 100644 --- a/internal/api/services/api.go +++ b/internal/api/services/api.go @@ -38,16 +38,6 @@ func (a *ApiHandlers) GetSystem(ctx context.Context, req openapi.GetSystemReques return openapi.GetSystem200JSONResponse(openapi.System{Id: &system.ID, Name: system.Name, Description: utils.StrPtr(system.Description), Operator: &openapi.Operator{Id: system.OperatorID}}), nil } -// GetSystemOperator ... -func (a *ApiHandlers) GetSystemOperator(ctx context.Context, req openapi.GetSystemOperatorRequestObject) (openapi.GetSystemOperatorResponseObject, error) { - system, err := a.systems.GetSystem(ctx, req.SystemId) - if err != nil { - return nil, err - } - - return openapi.GetSystemOperator200JSONResponse(openapi.Operator{Id: utils.PtrUUID(system.Operator.ID), Name: system.Operator.Name}), nil -} - // DeleteSystem ... func (a *ApiHandlers) DeleteSystem(ctx context.Context, req openapi.DeleteSystemRequestObject) (openapi.DeleteSystemResponseObject, error) { err := a.systems.DeleteSystem(ctx, req.SystemId) diff --git a/internal/api/services/systems.go b/internal/api/services/systems.go index 7aec842d..72ea12b0 100644 --- a/internal/api/services/systems.go +++ b/internal/api/services/systems.go @@ -70,3 +70,17 @@ func (a *ApiHandlers) CreateSystem(ctx context.Context, req openapi.CreateSystem return openapi.CreateSystem201JSONResponse(res), nil } + +// GetSystemOperator ... +func (a *ApiHandlers) GetSystemOperator(ctx context.Context, req openapi.GetSystemOperatorRequestObject) (openapi.GetSystemOperatorResponseObject, error) { + system, err := a.systems.GetSystem(ctx, req.SystemId) + if err != nil { + return nil, err + } + + if system.OperatorID == nil { + return openapi.GetSystemOperator404JSONResponse(openapi.GetSystemOperator404JSONResponse{openapi.NotFoundJSONResponse(openapi.ErrorNotFound("no operator found"))}), nil + } + + return openapi.GetSystemOperator200JSONResponse(openapi.Operator{Id: utils.PtrUUID(system.Operator.ID), Name: system.Operator.Name}), nil +} diff --git a/pkg/apis/client.gen.go b/pkg/apis/client.gen.go index f988f2ee..5b5764fa 100644 --- a/pkg/apis/client.gen.go +++ b/pkg/apis/client.gen.go @@ -4184,6 +4184,9 @@ func (r UpdateSystemResponse) StatusCode() int { type DeleteSystemOperatorResponse struct { Body []byte HTTPResponse *http.Response + JSON401 *Unauthorized + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -4206,6 +4209,10 @@ type GetSystemOperatorResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Operator + JSON400 *BadRequest + JSON401 *Unauthorized + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -4227,7 +4234,10 @@ func (r GetSystemOperatorResponse) StatusCode() int { type UpdateSystemOperatorResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Operator + JSON201 *Operator + JSON400 *BadRequest + JSON401 *Unauthorized + JSON404 *NotFound } // Status returns HTTPResponse.Status @@ -5948,6 +5958,30 @@ func ParseDeleteSystemOperatorResponse(rsp *http.Response) (*DeleteSystemOperato HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } @@ -5972,6 +6006,34 @@ func ParseGetSystemOperatorResponse(rsp *http.Response) (*GetSystemOperatorRespo } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + 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 == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } return response, nil @@ -5991,12 +6053,33 @@ func ParseUpdateSystemOperatorResponse(rsp *http.Response) (*UpdateSystemOperato } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: var dest Operator if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + 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 == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest } diff --git a/pkg/apis/errors.go b/pkg/apis/errors.go index 8733fad6..faf9c19e 100644 --- a/pkg/apis/errors.go +++ b/pkg/apis/errors.go @@ -10,10 +10,18 @@ func (e Error) Error() error { return fmt.Errorf("code: %d, message: %s", e.Code, e.Message) } -// Unimplemented is a struct that implements the StrictServerInterface interface +// NotImplemented is a helper function to create a new Error with a 501 status code. func NotImplemented(message string, args ...interface{}) Error { return Error{ Code: http.StatusNotImplemented, Message: fmt.Sprintf(message, args...), } } + +// ErrorNotFound is a helper function to create a new Error with a 404 status code. +func ErrorNotFound(message string, args ...interface{}) Error { + return Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf(message, args...), + } +} diff --git a/pkg/apis/models.gen.go b/pkg/apis/models.gen.go index 120ef4e6..90c64bf0 100644 --- a/pkg/apis/models.gen.go +++ b/pkg/apis/models.gen.go @@ -495,62 +495,62 @@ type UpdateUserJSONRequestBody = User // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xdWXPbtvb/Khj0/0hbcpLO9K+n6yZtxmkn8cROc+cmngxEHkloKIAFQNu6Gn33O1i4", - "kyKp3a3fbBHLD2fHwSG4xD6fR5wBUxKPljgigsxBgTD/Ed/nMVNXgf4nAOkLGinKGR7h2xkgGiA+QWoG", - "yDVEiiMBSlC4h3PsYapbRkTNsIcZmQMe5Yb0sIC/YiogwCMlYvCw9GcwJ3quCRdzovAIxzHVLdUi0p2l", - "EpRN8Wrl4angcdQOzDTrACsZbjtQIZ1Tda1JWI+LxfMxCKnBUQVz6YDFgqWw/opBLDJcZkScRxHAhMSh", - "wqMXQw/PySOdx3M8+lH/Q5n95yLFRpmCKQgDjk8mEtrRFcDJ7zRCY5hwAUgqIhRlU/27z8MQfGVILEDG",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vnFfgbqQSrj6lm78y5OgNxvVDFCO+tauWsXd", + "lqlppNmDnQeOuPbFyKPEZu1c6713Pdym9Wkfevr70E2POPvuObc3AnvZP/LcMXSbSdvHEk5wM5gnSYdE", + "5t+QKmlisYkwWi1kVgjrBKc4+ntz65keJNT6xydoThiZQuBKiuUl9mqsdFJfe6b2Lyv33a35qxqzGmom", + "BsyBaNss3iWl3Rvu2rK17m2jll2ZtMlWLa1drxAmJ8CDZXIfW4dTrpRk/bQ9vfFtZ0bcXTbXela1B8DD", + "A3D3XCpVvOwNpLaexauIat1QmalrvM9u+Lr74pbCHWdHFpwGn1akcr0lGORfY+liEjYuONrCNBxOMYbb", + "iXditgo3eNrtnUx9yHoLthf6HqfqrgMxc9e6nQ+X09RLI4tb7dmuuLzRMX8JwrHqcs9CXGpN6xreayur", + "kleUGjM09iWmf3y1vCXDbvMjlvj9q+SVY0kSQZsXxNo2FqbRxtuK5B20vWmfnWDNlmJDtetpcF8M/7+9", + "Q3at5oYmegcV2MVNlbLMLQlEquCDpb1KusNmyolJP213F1UfLFo6LM2btdiRsqTB6a8PDbk+IB02iTtm", + "xHDvmnouUfA+BKFgtDua8yTNmZOGqsJ2q+LXLNm4gj+Rmaejk/Ot3u/sABoLyZvMUGNJ8J6+V7Dc39dL", + "zqRSuyPTBubbKevtwmvbZH8W4amqrdflSQc3I05GOpy92k/2rCl367TJsKs8iLztK1da5lhd0vRqn9Nt", + "dKhSZuTGvsCZlcHSfZqpy/lLaQ0nYm6Sb0vt7ninTOT2IP5cCDI8pEC3HfyvofOaZOUJk/pIVuo0mJo7", + "42nia1fT1F7Yv1kl/1O888+t4u8U1mxU231KUU1SeX0m9fs9Q5ZqzX57jnObqv092YvmCuDN4pV82Xxz", + "iHIeFDitlxDWBiInS9BDmpUj8isLOMrvjZRsSbVYsj6zmlU/PiVWT74ms60k3fGyMSNin7dmVXMXHtbK", + "zh/pPYd7U4xkitajmBM5JCkejJQYkBQmm7eEYiGAKeRonFx6fH17U6inNd9AwlY6+s1qeloVLn/Q6hFC", + "HunlINsKe9h8UMbcBDkaDELuk3DGpRr9NPxpOCARHTxeGS10uGo+sysBEQHIHAJRqbSUPCZFGZQzUyWc", + "XhRpJtWYm4ZJvh+saUWUqzhG7ubE3FCuYKFlJBsdV0Zi+ZHspqptJFfBl1RAjxc1mFKl77w8/VMs9a6x", + "foXtYwk6naZrtMNBYD6yDSyw11aab27XjO+6ahP0vwAAAP//Ks7LcrF9AAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/pkg/apis/server.gen.go b/pkg/apis/server.gen.go index af8f77b9..2effb732 100644 --- a/pkg/apis/server.gen.go +++ b/pkg/apis/server.gen.go @@ -2254,6 +2254,33 @@ func (response DeleteSystemOperator204Response) VisitDeleteSystemOperatorRespons return nil } +type DeleteSystemOperator401JSONResponse struct{ UnauthorizedJSONResponse } + +func (response DeleteSystemOperator401JSONResponse) VisitDeleteSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(401) + + return ctx.JSON(&response) +} + +type DeleteSystemOperator404JSONResponse struct{ NotFoundJSONResponse } + +func (response DeleteSystemOperator404JSONResponse) VisitDeleteSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(404) + + return ctx.JSON(&response) +} + +type DeleteSystemOperator500JSONResponse struct{ InternalErrorJSONResponse } + +func (response DeleteSystemOperator500JSONResponse) VisitDeleteSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(500) + + return ctx.JSON(&response) +} + type GetSystemOperatorRequestObject struct { SystemId SystemId `json:"systemId"` } @@ -2271,6 +2298,42 @@ func (response GetSystemOperator200JSONResponse) VisitGetSystemOperatorResponse( return ctx.JSON(&response) } +type GetSystemOperator400JSONResponse struct{ BadRequestJSONResponse } + +func (response GetSystemOperator400JSONResponse) VisitGetSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(400) + + return ctx.JSON(&response) +} + +type GetSystemOperator401JSONResponse struct{ UnauthorizedJSONResponse } + +func (response GetSystemOperator401JSONResponse) VisitGetSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(401) + + return ctx.JSON(&response) +} + +type GetSystemOperator404JSONResponse struct{ NotFoundJSONResponse } + +func (response GetSystemOperator404JSONResponse) VisitGetSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(404) + + return ctx.JSON(&response) +} + +type GetSystemOperator500JSONResponse struct{ InternalErrorJSONResponse } + +func (response GetSystemOperator500JSONResponse) VisitGetSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(500) + + return ctx.JSON(&response) +} + type UpdateSystemOperatorRequestObject struct { SystemId SystemId `json:"systemId"` Body *UpdateSystemOperatorJSONRequestBody @@ -2280,11 +2343,38 @@ type UpdateSystemOperatorResponseObject interface { VisitUpdateSystemOperatorResponse(ctx *fiber.Ctx) error } -type UpdateSystemOperator200JSONResponse Operator +type UpdateSystemOperator201JSONResponse Operator -func (response UpdateSystemOperator200JSONResponse) VisitUpdateSystemOperatorResponse(ctx *fiber.Ctx) error { +func (response UpdateSystemOperator201JSONResponse) VisitUpdateSystemOperatorResponse(ctx *fiber.Ctx) error { ctx.Response().Header.Set("Content-Type", "application/json") - ctx.Status(200) + ctx.Status(201) + + return ctx.JSON(&response) +} + +type UpdateSystemOperator400JSONResponse struct{ BadRequestJSONResponse } + +func (response UpdateSystemOperator400JSONResponse) VisitUpdateSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(400) + + return ctx.JSON(&response) +} + +type UpdateSystemOperator401JSONResponse struct{ UnauthorizedJSONResponse } + +func (response UpdateSystemOperator401JSONResponse) VisitUpdateSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(401) + + return ctx.JSON(&response) +} + +type UpdateSystemOperator404JSONResponse struct{ NotFoundJSONResponse } + +func (response UpdateSystemOperator404JSONResponse) VisitUpdateSystemOperatorResponse(ctx *fiber.Ctx) error { + ctx.Response().Header.Set("Content-Type", "application/json") + ctx.Status(404) return ctx.JSON(&response) }