Skip to content

Commit

Permalink
fix: stub (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
grutt authored Jun 26, 2024
1 parent 9c773d3 commit dc2b544
Show file tree
Hide file tree
Showing 6 changed files with 375 additions and 148 deletions.
2 changes: 2 additions & 0 deletions api-contracts/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ paths:
$ref: "./paths/metadata/metadata.yaml#/liveness"
/api/v1/meta:
$ref: "./paths/metadata/metadata.yaml#/metadata"
/api/v1/cloud/metadata:
$ref: "./paths/metadata/metadata.yaml#/cloudMetadata"
/api/v1/meta/integrations:
$ref: "./paths/metadata/metadata.yaml#/listIntegrations"
/api/v1/users/login:
Expand Down
22 changes: 22 additions & 0 deletions api-contracts/openapi/paths/metadata/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ metadata:
summary: Get metadata
tags:
- Metadata
cloudMetadata:
get:
description: Gets metadata for the Hatchet cloud instance
operationId: cloudMetadata::get
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Cloud unavailable
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
security: []
x-security-optional: true
summary: Get cloud metadata
tags:
- Metadata
listIntegrations:
get:
description: List all integrations
Expand Down
14 changes: 14 additions & 0 deletions api/v1/server/handlers/metadata/get_cloud.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package metadata

import (
"github.com/labstack/echo/v4"

"github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors"
"github.com/hatchet-dev/hatchet/api/v1/server/oas/gen"
)

func (u *MetadataService) CloudMetadataGet(ctx echo.Context, request gen.CloudMetadataGetRequestObject) (gen.CloudMetadataGetResponseObject, error) {
return gen.CloudMetadataGet200JSONResponse(
apierrors.NewAPIErrors("oss"),
), nil
}
Loading

0 comments on commit dc2b544

Please sign in to comment.