From 25b5fea76af59e17bac0181f01dd234fdeae7eb8 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 10 May 2024 13:39:41 +0000 Subject: [PATCH] push swagger from signadot --- generate/swagger.json | 494 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 448 insertions(+), 46 deletions(-) diff --git a/generate/swagger.json b/generate/swagger.json index f945af1..ec1a2ae 100644 --- a/generate/swagger.json +++ b/generate/swagger.json @@ -68,6 +68,46 @@ }, "type": "object" }, + "JobArtifact": { + "properties": { + "lastModified": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "type": "object" + }, + "JobArtifactInfo": { + "properties": { + "checksumSHA256": { + "type": "string" + }, + "contentEncoding": { + "type": "string" + }, + "contentLength": { + "type": "integer" + }, + "contentType": { + "type": "string" + }, + "lastModified": { + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, "ResourceInfo": { "properties": { "cluster": { @@ -113,6 +153,9 @@ "createdAt": { "type": "string" }, + "defaults": { + "$ref": "#/definitions/defaults.CompositeDefaults" + }, "endpoints": { "items": { "$ref": "#/definitions/routeGroup.Endpoint" @@ -143,6 +186,9 @@ "createdAt": { "type": "string" }, + "defaults": { + "$ref": "#/definitions/defaults.CompositeDefaults" + }, "endpoints": { "items": { "$ref": "#/definitions/sandbox.Endpoint" @@ -177,56 +223,32 @@ }, "type": "object" }, - "local": { + "defaults.CompositeDefaults": { "properties": { - "from": { - "$ref": "#/definitions/local.From" - }, - "mappings": { + "cluster": { "items": { - "$ref": "#/definitions/local.PortMapping" + "$ref": "#/definitions/defaults.Default" }, "type": "array" - }, - "name": { - "type": "string" } }, "type": "object" }, - "local.From": { + "defaults.Default": { "properties": { - "kind": { - "description": "Kind of entity that we want to route to. One of (Service or Deployment or Rollout).", - "example": "Deployment", + "class": { "type": "string" }, - "name": { - "description": "Name of the entity within the Kubernetes cluster.", - "example": "my-frontend", + "createdAt": { "type": "string" }, - "namespace": { - "description": "Namespace within which the entity lives in the Kubernetes cluster.", - "example": "default", + "resourceKind": { "type": "string" - } - }, - "required": [ - "kind", - "name", - "namespace" - ], - "type": "object" - }, - "local.PortMapping": { - "properties": { - "port": { - "type": "integer" }, - "toLocal": { + "updatedAt": { "type": "string" - } + }, + "value": {} }, "type": "object" }, @@ -525,7 +547,7 @@ "sandbox.Customizations": { "properties": { "env": { - "description": "Env var modifications that will be applied to the forked workload", + "description": "Environment variable modifications that will be applied to the forked workload", "items": { "$ref": "#/definitions/sandbox.EnvVar" }, @@ -782,6 +804,10 @@ "reason": { "description": "Reason is a machine readable explanation of why\nthe sandbox is healthy or not.", "type": "string" + }, + "scheduledDeleteTime": { + "description": "ScheduledDeleteTime returns the formatted and computed ttl based on the Duration\nand OffsetFrom", + "type": "string" } }, "type": "object" @@ -838,17 +864,6 @@ "description": "Labels are used to specify metadata associated with the sandbox as key-value pairs.", "type": "object" }, - "local": { - "description": "Local Workloads", - "items": { - "$ref": "#/definitions/local" - }, - "type": "array" - }, - "localMachineID": { - "description": "Identifier of the machine from where a sandbox containing local workloads\nwas created or is intended to be ran", - "type": "string" - }, "resources": { "description": "Resources specifies each required resource to spin up the sandbox", "items": { @@ -888,6 +903,393 @@ "version": "2.0" }, "paths": { + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "List all artifacts for a given job attempt.", + "operationId": "list-job-attempt-artifacts", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/JobArtifact" + }, + "type": "array" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List job attempt artifacts", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/": { + "get": { + "consumes": [ + "application/json" + ], + "description": "Get info about a job attempt artifact", + "operationId": "info-job-attempt-artifact", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "string" + }, + { + "description": "Artifact Path", + "in": "query", + "name": "path", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/JobArtifactInfo" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Job attempt artifact info", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/download": { + "get": { + "consumes": [ + "application/json" + ], + "description": "Downloads an artifact for a given job attempt.", + "operationId": "download-job-attempt-artifact", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "string" + }, + { + "description": "Artifact Path", + "in": "query", + "name": "path", + "required": true, + "type": "string" + }, + { + "description": "Downloads the specified byte range of the artifact. Retrieving multiple ranges of data per request is not supported", + "in": "header", + "name": "Range", + "type": "string" + } + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "Artifact successfully downloaded", + "headers": { + "signadot-artifact-checksumSHA256": { + "description": "A base64-encoded, 256-bit SHA-256 digest of the artifact", + "type": "string" + }, + "signadot-artifact-last-modified": { + "description": "Date and time when the artifact was last modified", + "type": "string" + }, + "signadot-artifact-metadata": { + "description": "A json-encoded, map of the artifact metadata", + "type": "string" + } + }, + "schema": { + "type": "file" + } + }, + "206": { + "description": "Artifact range successfully downloaded", + "headers": { + "signadot-artifact-last-modified": { + "description": "Date and time when the artifact was last modified", + "type": "string" + }, + "signadot-artifact-metadata": { + "description": "A json-encoded, map of the artifact metadata", + "type": "string" + } + }, + "schema": { + "type": "file" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Download job attempt artifact", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/upload": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "description": "Uploads an artifact for a given job attempt.", + "operationId": "upload-job-attempt-artifact", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "string" + }, + { + "description": "Artifact Path", + "in": "query", + "name": "path", + "required": true, + "type": "string" + }, + { + "description": "Job Execution ID", + "in": "formData", + "name": "jobExecution", + "type": "string" + }, + { + "description": "A base64-encoded, 256-bit SHA-256 digest of the artifact", + "in": "formData", + "name": "checksumSHA256", + "type": "string" + }, + { + "description": "A json-encoded, map of metadata to store with the artifact", + "in": "formData", + "name": "metadata", + "type": "string" + }, + { + "description": "Artifact File", + "in": "formData", + "name": "artifact", + "required": true, + "type": "file" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/EmptyResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "413": { + "description": "Request Entity Too Large", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Upload job attempt artifact", + "tags": [ + "Artifacts" + ] + } + }, "/orgs/{orgName}/clusters/": { "get": { "consumes": [