diff --git a/apps/webservice/src/app/api/v1/openapi.ts b/apps/webservice/src/app/api/v1/openapi.ts index 2b2821b2..a2775207 100644 --- a/apps/webservice/src/app/api/v1/openapi.ts +++ b/apps/webservice/src/app/api/v1/openapi.ts @@ -45,6 +45,7 @@ export const openapi: Swagger.SwaggerV3 = { config: { type: "object", additionalProperties: true }, deploymentId: { type: "string", format: "uuid" }, createdAt: { type: "string", format: "date-time" }, + metadata: { type: "object", additionalProperties: true }, }, required: [ "id", diff --git a/apps/webservice/src/app/api/v1/releases/openapi.ts b/apps/webservice/src/app/api/v1/releases/openapi.ts index 3373fe49..74f88cfc 100644 --- a/apps/webservice/src/app/api/v1/releases/openapi.ts +++ b/apps/webservice/src/app/api/v1/releases/openapi.ts @@ -24,8 +24,7 @@ export const openapi: Swagger.SwaggerV3 = { name: { type: "string" }, config: { type: "object", additionalProperties: true }, metadata: { - type: "object", - additionalProperties: { type: "string" }, + $ref: "#/components/schemas/Release/properties/metadata", }, }, required: ["version", "deploymentId"], @@ -44,10 +43,7 @@ export const openapi: Swagger.SwaggerV3 = { id: { type: "string" }, version: { type: "string" }, metadata: { - type: "object", - additionalProperties: { - type: "string", - }, + $ref: "#/components/schemas/Release/properties/metadata", }, }, }, diff --git a/integrations/github-get-job-inputs/src/index.ts b/integrations/github-get-job-inputs/src/index.ts index c530a980..f73ce683 100644 --- a/integrations/github-get-job-inputs/src/index.ts +++ b/integrations/github-get-job-inputs/src/index.ts @@ -78,6 +78,7 @@ async function run() { setOutputAndLog("release_id", release?.id); setOutputAndLog("release_version", release?.version); setOutputsRecursively("release_config", release?.config); + setOutputsRecursively("release_metadata", release?.metadata); if (approval?.approver != null) { setOutputAndLog("approval_approver_id", approval.approver.id); diff --git a/openapi.v1.json b/openapi.v1.json index 8e41dd9e..498c2e41 100644 --- a/openapi.v1.json +++ b/openapi.v1.json @@ -1341,10 +1341,7 @@ "additionalProperties": true }, "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "$ref": "#/components/schemas/Release/properties/metadata" } }, "required": [ @@ -1370,10 +1367,7 @@ "type": "string" }, "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "$ref": "#/components/schemas/Release/properties/metadata" } } } @@ -2356,6 +2350,10 @@ "createdAt": { "type": "string", "format": "date-time" + }, + "metadata": { + "type": "object", + "additionalProperties": true } }, "required": [ diff --git a/packages/node-sdk/src/schema.ts b/packages/node-sdk/src/schema.ts index 79dc3810..e11ab2b1 100644 --- a/packages/node-sdk/src/schema.ts +++ b/packages/node-sdk/src/schema.ts @@ -382,6 +382,9 @@ export interface components { deploymentId: string; /** Format: date-time */ createdAt: string; + metadata?: { + [key: string]: unknown; + }; }; Environment: { /** Format: uuid */ @@ -1249,9 +1252,7 @@ export interface operations { config?: { [key: string]: unknown; }; - metadata?: { - [key: string]: string; - }; + metadata?: components["schemas"]["Release"]["metadata"]; }; }; }; @@ -1265,9 +1266,7 @@ export interface operations { "application/json": { id?: string; version?: string; - metadata?: { - [key: string]: string; - }; + metadata?: components["schemas"]["Release"]["metadata"]; }; }; };