From 6e87f7f92f34466dfcc138b685aa035199c5a9fd Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Mon, 10 Feb 2025 10:41:53 -0800 Subject: [PATCH 1/8] Move request body discriminator for container tasks into separate file - also rename taskActions -> tasks (cleaner) --- .../ContainerStartAction.yml | 0 .../ContainerStopAction.yml | 0 .../containers/tasks/ContainerTask.yml | 17 +++++ .../ReconfigureContainer.yml | 0 .../ReconfigureVolumes.yml | 0 .../{taskActions => tasks}/Reimage.yml | 0 .../{taskActions => tasks}/Scale.yml | 0 package-lock.json | 65 ++----------------- platform/paths/containers/tasks.yml | 17 +---- 9 files changed, 24 insertions(+), 75 deletions(-) rename components/schemas/containers/{taskActions => tasks}/ContainerStartAction.yml (100%) rename components/schemas/containers/{taskActions => tasks}/ContainerStopAction.yml (100%) create mode 100644 components/schemas/containers/tasks/ContainerTask.yml rename components/schemas/containers/{taskActions => tasks}/ReconfigureContainer.yml (100%) rename components/schemas/containers/{taskActions => tasks}/ReconfigureVolumes.yml (100%) rename components/schemas/containers/{taskActions => tasks}/Reimage.yml (100%) rename components/schemas/containers/{taskActions => tasks}/Scale.yml (100%) diff --git a/components/schemas/containers/taskActions/ContainerStartAction.yml b/components/schemas/containers/tasks/ContainerStartAction.yml similarity index 100% rename from components/schemas/containers/taskActions/ContainerStartAction.yml rename to components/schemas/containers/tasks/ContainerStartAction.yml diff --git a/components/schemas/containers/taskActions/ContainerStopAction.yml b/components/schemas/containers/tasks/ContainerStopAction.yml similarity index 100% rename from components/schemas/containers/taskActions/ContainerStopAction.yml rename to components/schemas/containers/tasks/ContainerStopAction.yml diff --git a/components/schemas/containers/tasks/ContainerTask.yml b/components/schemas/containers/tasks/ContainerTask.yml new file mode 100644 index 00000000..91764743 --- /dev/null +++ b/components/schemas/containers/tasks/ContainerTask.yml @@ -0,0 +1,17 @@ +title: ContainerTask +discriminator: + propertyName: action + mapping: + start: ContainerStartAction.yml + stop: ContainerStopAction.yml + reconfigure: ReconfigureContainer.yml + volumes.reconfigure: ReconfigureVolumes.yml + reimage: Reimage.yml + scale: Scale.yml +oneOf: + - $ref: ContainerStartAction.yml + - $ref: ContainerStopAction.yml + - $ref: ReconfigureContainer.yml + - $ref: ReconfigureVolumes.yml + - $ref: Reimage.yml + - $ref: Scale.yml diff --git a/components/schemas/containers/taskActions/ReconfigureContainer.yml b/components/schemas/containers/tasks/ReconfigureContainer.yml similarity index 100% rename from components/schemas/containers/taskActions/ReconfigureContainer.yml rename to components/schemas/containers/tasks/ReconfigureContainer.yml diff --git a/components/schemas/containers/taskActions/ReconfigureVolumes.yml b/components/schemas/containers/tasks/ReconfigureVolumes.yml similarity index 100% rename from components/schemas/containers/taskActions/ReconfigureVolumes.yml rename to components/schemas/containers/tasks/ReconfigureVolumes.yml diff --git a/components/schemas/containers/taskActions/Reimage.yml b/components/schemas/containers/tasks/Reimage.yml similarity index 100% rename from components/schemas/containers/taskActions/Reimage.yml rename to components/schemas/containers/tasks/Reimage.yml diff --git a/components/schemas/containers/taskActions/Scale.yml b/components/schemas/containers/tasks/Scale.yml similarity index 100% rename from components/schemas/containers/taskActions/Scale.yml rename to components/schemas/containers/tasks/Scale.yml diff --git a/package-lock.json b/package-lock.json index ca7b5471..a32bd31d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,9 +8,6 @@ "name": "@cycleplatform/api-spec", "version": "1.0.0", "license": "Apache-2.0", - "dependencies": { - "@apiture/openapi-down-convert": "github:avandecreme/openapi-down-convert#nullable_pr" - }, "devDependencies": { "@apidevtools/json-schema-ref-parser": "^11.5.4", "@redocly/cli": "1.11.0", @@ -36,19 +33,6 @@ "url": "https://github.com/sponsors/philsturgeon" } }, - "node_modules/@apiture/openapi-down-convert": { - "version": "0.13.2", - "resolved": "git+ssh://git@github.com/avandecreme/openapi-down-convert.git#654309786f68362a6ae7b03f0d76f7e24abcf9f1", - "license": "ISC", - "dependencies": { - "commander": "^9.4.1", - "js-yaml": "^4.1.0", - "typescript": "^4.8.4" - }, - "bin": { - "openapi-down-convert": "lib/src/cli.js" - } - }, "node_modules/@babel/runtime": { "version": "7.24.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", @@ -291,7 +275,8 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/asynckit": { "version": "0.4.0", @@ -440,15 +425,6 @@ "node": ">= 0.8" } }, - "node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || >=14" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -790,6 +766,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -1811,19 +1788,6 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", "dev": true }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", @@ -2007,15 +1971,6 @@ "js-yaml": "^4.1.0" } }, - "@apiture/openapi-down-convert": { - "version": "git+ssh://git@github.com/avandecreme/openapi-down-convert.git#654309786f68362a6ae7b03f0d76f7e24abcf9f1", - "from": "@apiture/openapi-down-convert@github:avandecreme/openapi-down-convert#nullable_pr", - "requires": { - "commander": "^9.4.1", - "js-yaml": "^4.1.0", - "typescript": "^4.8.4" - } - }, "@babel/runtime": { "version": "7.24.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", @@ -2221,7 +2176,8 @@ "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "asynckit": { "version": "0.4.0", @@ -2341,11 +2297,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==" - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2611,6 +2562,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "requires": { "argparse": "^2.0.1" } @@ -3352,11 +3304,6 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", "dev": true }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" - }, "uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", diff --git a/platform/paths/containers/tasks.yml b/platform/paths/containers/tasks.yml index 0615c9f2..e9bdedf8 100644 --- a/platform/paths/containers/tasks.yml +++ b/platform/paths/containers/tasks.yml @@ -25,22 +25,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - start: ../../../components/schemas/containers/taskActions/ContainerStartAction.yml - stop: ../../../components/schemas/containers/taskActions/ContainerStopAction.yml - reconfigure: ../../../components/schemas/containers/taskActions/ReconfigureContainer.yml - volumes.reconfigure: ../../../components/schemas/containers/taskActions/ReconfigureVolumes.yml - reimage: ../../../components/schemas/containers/taskActions/Reimage.yml - scale: ../../../components/schemas/containers/taskActions/Scale.yml - oneOf: - - $ref: ../../../components/schemas/containers/taskActions/ContainerStartAction.yml - - $ref: ../../../components/schemas/containers/taskActions/ContainerStopAction.yml - - $ref: ../../../components/schemas/containers/taskActions/ReconfigureContainer.yml - - $ref: ../../../components/schemas/containers/taskActions/ReconfigureVolumes.yml - - $ref: ../../../components/schemas/containers/taskActions/Reimage.yml - - $ref: ../../../components/schemas/containers/taskActions/Scale.yml + $ref: ../../../components/schemas/containers/tasks/ContainerTask.yml responses: 202: description: Returns a Job Descriptor. From a630f17b4c13d1e9130cd55f8b317561e203ffd6 Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Mon, 10 Feb 2025 13:09:07 -0800 Subject: [PATCH 2/8] stack build --- ...ner.yml => ContainerReconfigureAction.yml} | 4 +-- ... => ContainerReconfigureVolumesAction.yml} | 2 +- .../tasks/ContainerReimageAction.yml | 26 ++++++++++++++++++ .../containers/tasks/ContainerScaleAction.yml | 20 ++++++++++++++ .../containers/tasks/ContainerTask.yml | 16 +++++------ .../schemas/containers/tasks/Reimage.yml | 27 ------------------- components/schemas/containers/tasks/Scale.yml | 20 -------------- .../StackBuildDeployAction.yml} | 2 +- .../StackBuildGenerateAction.yml} | 0 .../stacks/builds/task/StackBuildTask.yml | 9 +++++++ platform/paths/stacks/builds/tasks.yml | 9 +------ 11 files changed, 68 insertions(+), 67 deletions(-) rename components/schemas/containers/tasks/{ReconfigureContainer.yml => ContainerReconfigureAction.yml} (70%) rename components/schemas/containers/tasks/{ReconfigureVolumes.yml => ContainerReconfigureVolumesAction.yml} (88%) create mode 100644 components/schemas/containers/tasks/ContainerReimageAction.yml create mode 100644 components/schemas/containers/tasks/ContainerScaleAction.yml delete mode 100644 components/schemas/containers/tasks/Reimage.yml delete mode 100644 components/schemas/containers/tasks/Scale.yml rename components/schemas/stacks/builds/{taskActions/DeployStackBuildAction.yml => task/StackBuildDeployAction.yml} (95%) rename components/schemas/stacks/builds/{taskActions/GenerateStackBuildAction.yml => task/StackBuildGenerateAction.yml} (100%) create mode 100644 components/schemas/stacks/builds/task/StackBuildTask.yml diff --git a/components/schemas/containers/tasks/ReconfigureContainer.yml b/components/schemas/containers/tasks/ContainerReconfigureAction.yml similarity index 70% rename from components/schemas/containers/tasks/ReconfigureContainer.yml rename to components/schemas/containers/tasks/ContainerReconfigureAction.yml index db36e8e9..f62393ed 100644 --- a/components/schemas/containers/tasks/ReconfigureContainer.yml +++ b/components/schemas/containers/tasks/ContainerReconfigureAction.yml @@ -1,4 +1,4 @@ -title: ReconfigureContainer +title: ContainerReconfigureAction type: object required: - action @@ -10,4 +10,4 @@ properties: - reconfigure description: The action to take. contents: - "$ref": "../config/Config.yml" \ No newline at end of file + "$ref": "../config/Config.yml" diff --git a/components/schemas/containers/tasks/ReconfigureVolumes.yml b/components/schemas/containers/tasks/ContainerReconfigureVolumesAction.yml similarity index 88% rename from components/schemas/containers/tasks/ReconfigureVolumes.yml rename to components/schemas/containers/tasks/ContainerReconfigureVolumesAction.yml index e8806f80..1a6859e4 100644 --- a/components/schemas/containers/tasks/ReconfigureVolumes.yml +++ b/components/schemas/containers/tasks/ContainerReconfigureVolumesAction.yml @@ -1,4 +1,4 @@ -title: ReconfigureVolumeTask +title: ContainerReconfigureVolumesAction type: object required: - action diff --git a/components/schemas/containers/tasks/ContainerReimageAction.yml b/components/schemas/containers/tasks/ContainerReimageAction.yml new file mode 100644 index 00000000..50b83d32 --- /dev/null +++ b/components/schemas/containers/tasks/ContainerReimageAction.yml @@ -0,0 +1,26 @@ +title: ContainerReimageAction +type: object +required: + - action + - contents +properties: + action: + type: string + enum: + - reimage + description: The action to take. + contents: + type: object + description: Additional information needed to complete the job. + required: + - image_id + properties: + image_id: + type: string + description: The ID of the image to use when reimaging. + allow_incompatible: + type: boolean + description: A boolean where true signifies the image being used to reimage does not have to have compatibility with the image being replaced. + overwrite_runtime_config: + type: boolean + description: A boolean where true signifies the user wishes to overwrite the current runtime configuration for the given container during the reimage process. diff --git a/components/schemas/containers/tasks/ContainerScaleAction.yml b/components/schemas/containers/tasks/ContainerScaleAction.yml new file mode 100644 index 00000000..7ef9a921 --- /dev/null +++ b/components/schemas/containers/tasks/ContainerScaleAction.yml @@ -0,0 +1,20 @@ +title: ContainerScaleAction +type: object +required: + - action + - contents +properties: + action: + type: string + description: The action to take. + enum: + - scale + contents: + type: object + description: Additional information needed to complete the job. + required: + - instances + properties: + instances: + type: integer + description: The number of desired instances to scale to. diff --git a/components/schemas/containers/tasks/ContainerTask.yml b/components/schemas/containers/tasks/ContainerTask.yml index 91764743..d1e5ed5b 100644 --- a/components/schemas/containers/tasks/ContainerTask.yml +++ b/components/schemas/containers/tasks/ContainerTask.yml @@ -4,14 +4,14 @@ discriminator: mapping: start: ContainerStartAction.yml stop: ContainerStopAction.yml - reconfigure: ReconfigureContainer.yml - volumes.reconfigure: ReconfigureVolumes.yml - reimage: Reimage.yml - scale: Scale.yml + reconfigure: ContainerReconfigureAction.yml + volumes.reconfigure: ContainerReconfigureVolumesAction.yml + reimage: ContainerReimageAction.yml + scale: ContainerScaleAction.yml oneOf: - $ref: ContainerStartAction.yml - $ref: ContainerStopAction.yml - - $ref: ReconfigureContainer.yml - - $ref: ReconfigureVolumes.yml - - $ref: Reimage.yml - - $ref: Scale.yml + - $ref: ContainerReconfigureAction.yml + - $ref: ContainerReconfigureVolumesAction.yml + - $ref: ContainerReimageAction.yml + - $ref: ContainerScaleAction.yml diff --git a/components/schemas/containers/tasks/Reimage.yml b/components/schemas/containers/tasks/Reimage.yml deleted file mode 100644 index 4a7929b8..00000000 --- a/components/schemas/containers/tasks/Reimage.yml +++ /dev/null @@ -1,27 +0,0 @@ -title: ReimageContainer -type: object -required: - - action - - contents -properties: - action: - type: string - enum: - - reimage - description: The action to take. - contents: - type: object - description: Additional information needed to complete the job. - required: - - image_id - properties: - image_id: - type: string - description: The ID of the image to use when reimaging. - allow_incompatible: - type: boolean - description: A boolean where true signifies the image being used to reimage does not have to have compatibility with the image being replaced. - overwrite_runtime_config: - type: boolean - description: A boolean where true signifies the user wishes to overwrite the current runtime configuration for the given container during the reimage process. - \ No newline at end of file diff --git a/components/schemas/containers/tasks/Scale.yml b/components/schemas/containers/tasks/Scale.yml deleted file mode 100644 index ded2a9ea..00000000 --- a/components/schemas/containers/tasks/Scale.yml +++ /dev/null @@ -1,20 +0,0 @@ -title: ScaleContainer -type: object -required: - - action - - contents -properties: - action: - type: string - description: The action to take. - enum: - - scale - contents: - type: object - description: Additional information needed to complete the job. - required: - - instances - properties: - instances: - type: integer - description: The number of desired instances to scale to. \ No newline at end of file diff --git a/components/schemas/stacks/builds/taskActions/DeployStackBuildAction.yml b/components/schemas/stacks/builds/task/StackBuildDeployAction.yml similarity index 95% rename from components/schemas/stacks/builds/taskActions/DeployStackBuildAction.yml rename to components/schemas/stacks/builds/task/StackBuildDeployAction.yml index 6ef84b67..a1c7a6ed 100644 --- a/components/schemas/stacks/builds/taskActions/DeployStackBuildAction.yml +++ b/components/schemas/stacks/builds/task/StackBuildDeployAction.yml @@ -1,4 +1,4 @@ -title: DeployStackBuild +title: StackBuildDeployAction type: object required: - action diff --git a/components/schemas/stacks/builds/taskActions/GenerateStackBuildAction.yml b/components/schemas/stacks/builds/task/StackBuildGenerateAction.yml similarity index 100% rename from components/schemas/stacks/builds/taskActions/GenerateStackBuildAction.yml rename to components/schemas/stacks/builds/task/StackBuildGenerateAction.yml diff --git a/components/schemas/stacks/builds/task/StackBuildTask.yml b/components/schemas/stacks/builds/task/StackBuildTask.yml new file mode 100644 index 00000000..12b1e22e --- /dev/null +++ b/components/schemas/stacks/builds/task/StackBuildTask.yml @@ -0,0 +1,9 @@ +title: StackBuildTask +discriminator: + propertyName: action + mapping: + generate: StackBuildGenerateAction.yml + deploy: StackBuildDeployAction.yml +oneOf: + - $ref: StackBuildGenerateAction.yml + - $ref: StackBuildDeployAction.yml diff --git a/platform/paths/stacks/builds/tasks.yml b/platform/paths/stacks/builds/tasks.yml index 82abfa50..f190ca4c 100644 --- a/platform/paths/stacks/builds/tasks.yml +++ b/platform/paths/stacks/builds/tasks.yml @@ -22,14 +22,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - generate: ../../../../components/schemas/stacks/builds/taskActions/GenerateStackBuildAction.yml - deploy: ../../../../components/schemas/stacks/builds/taskActions/DeployStackBuildAction.yml - oneOf: - - $ref: ../../../../components/schemas/stacks/builds/taskActions/GenerateStackBuildAction.yml - - $ref: ../../../../components/schemas/stacks/builds/taskActions/DeployStackBuildAction.yml + $ref: ../../../../components/schemas/stacks/builds/task/StackBuildTask.yml responses: 202: description: Returns a Job Descriptor. From 7a2a744e58e4db2af3de7694bc15884f4a1cb57a Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Mon, 10 Feb 2025 13:09:46 -0800 Subject: [PATCH 3/8] save --- .../containers/{tasks => task}/ContainerReconfigureAction.yml | 0 .../{tasks => task}/ContainerReconfigureVolumesAction.yml | 0 .../containers/{tasks => task}/ContainerReimageAction.yml | 0 .../schemas/containers/{tasks => task}/ContainerScaleAction.yml | 0 .../schemas/containers/{tasks => task}/ContainerStartAction.yml | 0 .../schemas/containers/{tasks => task}/ContainerStopAction.yml | 0 components/schemas/containers/{tasks => task}/ContainerTask.yml | 0 platform/paths/containers/tasks.yml | 2 +- 8 files changed, 1 insertion(+), 1 deletion(-) rename components/schemas/containers/{tasks => task}/ContainerReconfigureAction.yml (100%) rename components/schemas/containers/{tasks => task}/ContainerReconfigureVolumesAction.yml (100%) rename components/schemas/containers/{tasks => task}/ContainerReimageAction.yml (100%) rename components/schemas/containers/{tasks => task}/ContainerScaleAction.yml (100%) rename components/schemas/containers/{tasks => task}/ContainerStartAction.yml (100%) rename components/schemas/containers/{tasks => task}/ContainerStopAction.yml (100%) rename components/schemas/containers/{tasks => task}/ContainerTask.yml (100%) diff --git a/components/schemas/containers/tasks/ContainerReconfigureAction.yml b/components/schemas/containers/task/ContainerReconfigureAction.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerReconfigureAction.yml rename to components/schemas/containers/task/ContainerReconfigureAction.yml diff --git a/components/schemas/containers/tasks/ContainerReconfigureVolumesAction.yml b/components/schemas/containers/task/ContainerReconfigureVolumesAction.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerReconfigureVolumesAction.yml rename to components/schemas/containers/task/ContainerReconfigureVolumesAction.yml diff --git a/components/schemas/containers/tasks/ContainerReimageAction.yml b/components/schemas/containers/task/ContainerReimageAction.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerReimageAction.yml rename to components/schemas/containers/task/ContainerReimageAction.yml diff --git a/components/schemas/containers/tasks/ContainerScaleAction.yml b/components/schemas/containers/task/ContainerScaleAction.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerScaleAction.yml rename to components/schemas/containers/task/ContainerScaleAction.yml diff --git a/components/schemas/containers/tasks/ContainerStartAction.yml b/components/schemas/containers/task/ContainerStartAction.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerStartAction.yml rename to components/schemas/containers/task/ContainerStartAction.yml diff --git a/components/schemas/containers/tasks/ContainerStopAction.yml b/components/schemas/containers/task/ContainerStopAction.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerStopAction.yml rename to components/schemas/containers/task/ContainerStopAction.yml diff --git a/components/schemas/containers/tasks/ContainerTask.yml b/components/schemas/containers/task/ContainerTask.yml similarity index 100% rename from components/schemas/containers/tasks/ContainerTask.yml rename to components/schemas/containers/task/ContainerTask.yml diff --git a/platform/paths/containers/tasks.yml b/platform/paths/containers/tasks.yml index e9bdedf8..de8a64a5 100644 --- a/platform/paths/containers/tasks.yml +++ b/platform/paths/containers/tasks.yml @@ -25,7 +25,7 @@ post: content: application/json: schema: - $ref: ../../../components/schemas/containers/tasks/ContainerTask.yml + $ref: ../../../components/schemas/containers/task/ContainerTask.yml responses: 202: description: Returns a Job Descriptor. From 1822a92abd1127b6a0fdd327acf176c0eaed6408 Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Mon, 10 Feb 2025 13:31:22 -0800 Subject: [PATCH 4/8] continued work --- .../functions/task/FunctionTask.yml | 7 +++++++ .../FunctionTriggerAction.yml} | 2 +- .../InstanceExtendVolumeAction.yml} | 2 +- .../InstanceMigrateAction.yml} | 2 +- .../InstanceRevertMigrationAction.yml} | 2 +- .../instances/task/InstanceTask.yml | 11 ++++++++++ .../VpnReconfigureAction.yml} | 2 +- .../VpnResetAction.yml} | 2 +- .../services/vpn/task/VpnTask.yml | 8 ++++++++ .../EnvironmentInitializeAction.yml | 0 ...nvironmentReconfigureDeploymentsAction.yml | 0 .../EnvironmentStartAction.yml | 0 .../EnvironmentStopAction.yml | 0 .../environments/task/EnvironmentTask.yml | 13 ++++++++++++ .../taskActions/EnvironmentTasks.yml | 11 ---------- .../servers/taskActions/RestartServerTask.yml | 12 ----------- ...erverTask.yml => ServerEvacuateAction.yml} | 2 +- ...Task.yml => ServerEvacuateResetAction.yml} | 2 +- ...ml => ServerReconfigureFeaturesAction.yml} | 2 +- ...ml => ServerReconfigureSharedFsAction.yml} | 2 +- .../taskActions/ServerRestartAction.yml | 11 ++++++++++ ...ask.yml => ServerRestartComputeAction.yml} | 2 +- ... => ServerRestartComputeSpawnerAction.yml} | 2 +- .../servers/taskActions/ServerTask.yml | 19 ++++++++++++++++++ .../builds/task/StackBuildGenerateAction.yml | 20 +++++++++---------- .../instances/task/InstanceTask.yml | 9 +++++++++ .../StartInstanceAction.yml} | 5 ++--- .../StopInstanceAction.yml} | 2 +- internal/paths/conductor/tasks.yml | 9 +-------- platform/paths/containers/functions/tasks.yml | 7 +------ platform/paths/containers/instances/tasks.yml | 11 +--------- .../paths/environments/services/vpn/tasks.yml | 9 +-------- platform/paths/environments/tasks.yml | 13 +----------- .../paths/infrastructure/servers/tasks.yml | 19 +----------------- 34 files changed, 109 insertions(+), 111 deletions(-) create mode 100644 components/schemas/containers/functions/task/FunctionTask.yml rename components/schemas/containers/functions/{taskActions/trigger.yml => task/FunctionTriggerAction.yml} (94%) rename components/schemas/containers/instances/{taskActions/ExtendVolume.yml => task/InstanceExtendVolumeAction.yml} (95%) rename components/schemas/containers/instances/{taskActions/Migrate.yml => task/InstanceMigrateAction.yml} (96%) rename components/schemas/containers/instances/{taskActions/RevertMigration.yml => task/InstanceRevertMigrationAction.yml} (81%) create mode 100644 components/schemas/containers/instances/task/InstanceTask.yml rename components/schemas/environments/services/vpn/{taskActions/VpnReconfigureTask.yml => task/VpnReconfigureAction.yml} (98%) rename components/schemas/environments/services/vpn/{taskActions/VpnResetTask.yml => task/VpnResetAction.yml} (94%) create mode 100644 components/schemas/environments/services/vpn/task/VpnTask.yml rename components/schemas/environments/{taskActions => task}/EnvironmentInitializeAction.yml (100%) rename components/schemas/environments/{taskActions => task}/EnvironmentReconfigureDeploymentsAction.yml (100%) rename components/schemas/environments/{taskActions => task}/EnvironmentStartAction.yml (100%) rename components/schemas/environments/{taskActions => task}/EnvironmentStopAction.yml (100%) create mode 100644 components/schemas/environments/task/EnvironmentTask.yml delete mode 100644 components/schemas/environments/taskActions/EnvironmentTasks.yml delete mode 100644 components/schemas/infrastructure/servers/taskActions/RestartServerTask.yml rename components/schemas/infrastructure/servers/taskActions/{EvacuateServerTask.yml => ServerEvacuateAction.yml} (93%) rename components/schemas/infrastructure/servers/taskActions/{EvacuateServerResetTask.yml => ServerEvacuateResetAction.yml} (81%) rename components/schemas/infrastructure/servers/taskActions/{ReconfigureServerFeaturesTask.yml => ServerReconfigureFeaturesAction.yml} (96%) rename components/schemas/infrastructure/servers/taskActions/{ReconfigureSharedFsTask.yml => ServerReconfigureSharedFsAction.yml} (96%) create mode 100644 components/schemas/infrastructure/servers/taskActions/ServerRestartAction.yml rename components/schemas/infrastructure/servers/taskActions/{RestartComputeTask.yml => ServerRestartComputeAction.yml} (86%) rename components/schemas/infrastructure/servers/taskActions/{RestartComputeSpawnerTask.yml => ServerRestartComputeSpawnerAction.yml} (84%) create mode 100644 components/schemas/infrastructure/servers/taskActions/ServerTask.yml create mode 100644 internal/components/instances/task/InstanceTask.yml rename internal/components/instances/{tasks/StartInstanceTask.yml => task/StartInstanceAction.yml} (91%) rename internal/components/instances/{tasks/StopInstanceTask.yml => task/StopInstanceAction.yml} (94%) diff --git a/components/schemas/containers/functions/task/FunctionTask.yml b/components/schemas/containers/functions/task/FunctionTask.yml new file mode 100644 index 00000000..a6cbbdef --- /dev/null +++ b/components/schemas/containers/functions/task/FunctionTask.yml @@ -0,0 +1,7 @@ +title: FunctionTask +discriminator: + propertyName: action + mapping: + trigger: FunctionTriggerAction.yml +oneOf: + - $ref: FunctionTriggerAction.yml diff --git a/components/schemas/containers/functions/taskActions/trigger.yml b/components/schemas/containers/functions/task/FunctionTriggerAction.yml similarity index 94% rename from components/schemas/containers/functions/taskActions/trigger.yml rename to components/schemas/containers/functions/task/FunctionTriggerAction.yml index b3adefd8..b8a6f59e 100644 --- a/components/schemas/containers/functions/taskActions/trigger.yml +++ b/components/schemas/containers/functions/task/FunctionTriggerAction.yml @@ -1,4 +1,4 @@ -title: TriggerAction +title: FunctionTriggerAction type: object required: - action diff --git a/components/schemas/containers/instances/taskActions/ExtendVolume.yml b/components/schemas/containers/instances/task/InstanceExtendVolumeAction.yml similarity index 95% rename from components/schemas/containers/instances/taskActions/ExtendVolume.yml rename to components/schemas/containers/instances/task/InstanceExtendVolumeAction.yml index ee1cd9ab..09ced5b4 100644 --- a/components/schemas/containers/instances/taskActions/ExtendVolume.yml +++ b/components/schemas/containers/instances/task/InstanceExtendVolumeAction.yml @@ -1,4 +1,4 @@ -title: ExtendVolumeAction +title: InstanceExtendVolumeAction type: object required: - action diff --git a/components/schemas/containers/instances/taskActions/Migrate.yml b/components/schemas/containers/instances/task/InstanceMigrateAction.yml similarity index 96% rename from components/schemas/containers/instances/taskActions/Migrate.yml rename to components/schemas/containers/instances/task/InstanceMigrateAction.yml index a828210a..236d5eb4 100644 --- a/components/schemas/containers/instances/taskActions/Migrate.yml +++ b/components/schemas/containers/instances/task/InstanceMigrateAction.yml @@ -1,4 +1,4 @@ -title: MigrateAction +title: InstanceMigrateAction type: object required: - action diff --git a/components/schemas/containers/instances/taskActions/RevertMigration.yml b/components/schemas/containers/instances/task/InstanceRevertMigrationAction.yml similarity index 81% rename from components/schemas/containers/instances/taskActions/RevertMigration.yml rename to components/schemas/containers/instances/task/InstanceRevertMigrationAction.yml index 46030e0d..3b8f4717 100644 --- a/components/schemas/containers/instances/taskActions/RevertMigration.yml +++ b/components/schemas/containers/instances/task/InstanceRevertMigrationAction.yml @@ -1,4 +1,4 @@ -title: RevertMigrationAction +title: InstanceRevertMigrationAction type: object required: - action diff --git a/components/schemas/containers/instances/task/InstanceTask.yml b/components/schemas/containers/instances/task/InstanceTask.yml new file mode 100644 index 00000000..c261d55c --- /dev/null +++ b/components/schemas/containers/instances/task/InstanceTask.yml @@ -0,0 +1,11 @@ +title: InstanceTask +discriminator: + propertyName: action + mapping: + migration.start: InstanceMigrateAction.yml + migration.revert: InstanceRevertMigrationAction.yml + volume.extend: InstanceExtendVolumeAction.yml +oneOf: + - $ref: InstanceMigrateAction.yml + - $ref: InstanceRevertMigrationAction.yml + - $ref: InstanceExtendVolumeAction.yml diff --git a/components/schemas/environments/services/vpn/taskActions/VpnReconfigureTask.yml b/components/schemas/environments/services/vpn/task/VpnReconfigureAction.yml similarity index 98% rename from components/schemas/environments/services/vpn/taskActions/VpnReconfigureTask.yml rename to components/schemas/environments/services/vpn/task/VpnReconfigureAction.yml index 98e0c8eb..0c45a555 100644 --- a/components/schemas/environments/services/vpn/taskActions/VpnReconfigureTask.yml +++ b/components/schemas/environments/services/vpn/task/VpnReconfigureAction.yml @@ -1,4 +1,4 @@ -title: VpnReconfigureTask +title: VpnReconfigureAction type: object required: - action diff --git a/components/schemas/environments/services/vpn/taskActions/VpnResetTask.yml b/components/schemas/environments/services/vpn/task/VpnResetAction.yml similarity index 94% rename from components/schemas/environments/services/vpn/taskActions/VpnResetTask.yml rename to components/schemas/environments/services/vpn/task/VpnResetAction.yml index 6f44e3cc..9b3ac929 100644 --- a/components/schemas/environments/services/vpn/taskActions/VpnResetTask.yml +++ b/components/schemas/environments/services/vpn/task/VpnResetAction.yml @@ -1,4 +1,4 @@ -title: VpnResetTask +title: VpnResetAction description: This will reset the VPN certificates and restart the container. Should be done when the certificates expire, every 1000 days. Then, you will need to redownload the VPN config in order to connect. type: object required: diff --git a/components/schemas/environments/services/vpn/task/VpnTask.yml b/components/schemas/environments/services/vpn/task/VpnTask.yml new file mode 100644 index 00000000..331bc976 --- /dev/null +++ b/components/schemas/environments/services/vpn/task/VpnTask.yml @@ -0,0 +1,8 @@ +discriminator: + propertyName: action + mapping: + reset: VpnResetAction.yml + reconfigure: VpnReconfigureAction.yml +oneOf: + - $ref: VpnResetAction.yml + - $ref: VpnReconfigureAction.yml diff --git a/components/schemas/environments/taskActions/EnvironmentInitializeAction.yml b/components/schemas/environments/task/EnvironmentInitializeAction.yml similarity index 100% rename from components/schemas/environments/taskActions/EnvironmentInitializeAction.yml rename to components/schemas/environments/task/EnvironmentInitializeAction.yml diff --git a/components/schemas/environments/taskActions/EnvironmentReconfigureDeploymentsAction.yml b/components/schemas/environments/task/EnvironmentReconfigureDeploymentsAction.yml similarity index 100% rename from components/schemas/environments/taskActions/EnvironmentReconfigureDeploymentsAction.yml rename to components/schemas/environments/task/EnvironmentReconfigureDeploymentsAction.yml diff --git a/components/schemas/environments/taskActions/EnvironmentStartAction.yml b/components/schemas/environments/task/EnvironmentStartAction.yml similarity index 100% rename from components/schemas/environments/taskActions/EnvironmentStartAction.yml rename to components/schemas/environments/task/EnvironmentStartAction.yml diff --git a/components/schemas/environments/taskActions/EnvironmentStopAction.yml b/components/schemas/environments/task/EnvironmentStopAction.yml similarity index 100% rename from components/schemas/environments/taskActions/EnvironmentStopAction.yml rename to components/schemas/environments/task/EnvironmentStopAction.yml diff --git a/components/schemas/environments/task/EnvironmentTask.yml b/components/schemas/environments/task/EnvironmentTask.yml new file mode 100644 index 00000000..daaac18b --- /dev/null +++ b/components/schemas/environments/task/EnvironmentTask.yml @@ -0,0 +1,13 @@ +title: EnvironmentTask +discriminator: + propertyName: action + mapping: + start: EnvironmentStartAction.yml + stop: EnvironmentStopAction.yml + initialize: EnvironmentInitializeAction.yml + deployments.reconfigure: EnvironmentReconfigureDeploymentsAction.yml +oneOf: + - $ref: EnvironmentStartAction.yml + - $ref: EnvironmentStopAction.yml + - $ref: EnvironmentInitializeAction.yml + - $ref: EnvironmentReconfigureDeploymentsAction.yml diff --git a/components/schemas/environments/taskActions/EnvironmentTasks.yml b/components/schemas/environments/taskActions/EnvironmentTasks.yml deleted file mode 100644 index bb4e3b0b..00000000 --- a/components/schemas/environments/taskActions/EnvironmentTasks.yml +++ /dev/null @@ -1,11 +0,0 @@ -title: EnvironmentTasks -type: object -required: - - action -properties: - action: - type: string - enum: - - start - - stop - description: The name of the action to perform. diff --git a/components/schemas/infrastructure/servers/taskActions/RestartServerTask.yml b/components/schemas/infrastructure/servers/taskActions/RestartServerTask.yml deleted file mode 100644 index 5d7bf35a..00000000 --- a/components/schemas/infrastructure/servers/taskActions/RestartServerTask.yml +++ /dev/null @@ -1,12 +0,0 @@ -title: RestartServerTask -type: object -description: A job that restarts the server. -required: - - action -properties: - action: - type: string - description: The action to take. - enum: - - restart - diff --git a/components/schemas/infrastructure/servers/taskActions/EvacuateServerTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerEvacuateAction.yml similarity index 93% rename from components/schemas/infrastructure/servers/taskActions/EvacuateServerTask.yml rename to components/schemas/infrastructure/servers/taskActions/ServerEvacuateAction.yml index c0305550..353c6c28 100644 --- a/components/schemas/infrastructure/servers/taskActions/EvacuateServerTask.yml +++ b/components/schemas/infrastructure/servers/taskActions/ServerEvacuateAction.yml @@ -1,4 +1,4 @@ -title: EvacuateServerTask +title: ServerEvacuateAction type: object required: - action diff --git a/components/schemas/infrastructure/servers/taskActions/EvacuateServerResetTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerEvacuateResetAction.yml similarity index 81% rename from components/schemas/infrastructure/servers/taskActions/EvacuateServerResetTask.yml rename to components/schemas/infrastructure/servers/taskActions/ServerEvacuateResetAction.yml index f1c9f734..29e9691e 100644 --- a/components/schemas/infrastructure/servers/taskActions/EvacuateServerResetTask.yml +++ b/components/schemas/infrastructure/servers/taskActions/ServerEvacuateResetAction.yml @@ -1,4 +1,4 @@ -title: EvacuateServerResetTask +title: ServerEvacuateResetAction type: object required: - action diff --git a/components/schemas/infrastructure/servers/taskActions/ReconfigureServerFeaturesTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerReconfigureFeaturesAction.yml similarity index 96% rename from components/schemas/infrastructure/servers/taskActions/ReconfigureServerFeaturesTask.yml rename to components/schemas/infrastructure/servers/taskActions/ServerReconfigureFeaturesAction.yml index 265b1eb7..5a610977 100644 --- a/components/schemas/infrastructure/servers/taskActions/ReconfigureServerFeaturesTask.yml +++ b/components/schemas/infrastructure/servers/taskActions/ServerReconfigureFeaturesAction.yml @@ -1,4 +1,4 @@ -title: ReconfigureServerFeaturesTask +title: ServerReconfigureFeaturesAction type: object required: - action diff --git a/components/schemas/infrastructure/servers/taskActions/ReconfigureSharedFsTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerReconfigureSharedFsAction.yml similarity index 96% rename from components/schemas/infrastructure/servers/taskActions/ReconfigureSharedFsTask.yml rename to components/schemas/infrastructure/servers/taskActions/ServerReconfigureSharedFsAction.yml index 1e01a74d..b5fec1a5 100644 --- a/components/schemas/infrastructure/servers/taskActions/ReconfigureSharedFsTask.yml +++ b/components/schemas/infrastructure/servers/taskActions/ServerReconfigureSharedFsAction.yml @@ -1,4 +1,4 @@ -title: ReconfigureSharedFsTask +title: ServerReconfigureSharedFsAction type: object required: - action diff --git a/components/schemas/infrastructure/servers/taskActions/ServerRestartAction.yml b/components/schemas/infrastructure/servers/taskActions/ServerRestartAction.yml new file mode 100644 index 00000000..4e997c59 --- /dev/null +++ b/components/schemas/infrastructure/servers/taskActions/ServerRestartAction.yml @@ -0,0 +1,11 @@ +title: ServerRestartAction +type: object +description: A job that restarts the server. +required: + - action +properties: + action: + type: string + description: The action to take. + enum: + - restart diff --git a/components/schemas/infrastructure/servers/taskActions/RestartComputeTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerRestartComputeAction.yml similarity index 86% rename from components/schemas/infrastructure/servers/taskActions/RestartComputeTask.yml rename to components/schemas/infrastructure/servers/taskActions/ServerRestartComputeAction.yml index 92275f49..8070ad05 100644 --- a/components/schemas/infrastructure/servers/taskActions/RestartComputeTask.yml +++ b/components/schemas/infrastructure/servers/taskActions/ServerRestartComputeAction.yml @@ -1,4 +1,4 @@ -title: RestartComputeServiceTask +title: ServerRestartComputeAction type: object description: A job that restarts compute service on a given server. required: diff --git a/components/schemas/infrastructure/servers/taskActions/RestartComputeSpawnerTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerRestartComputeSpawnerAction.yml similarity index 84% rename from components/schemas/infrastructure/servers/taskActions/RestartComputeSpawnerTask.yml rename to components/schemas/infrastructure/servers/taskActions/ServerRestartComputeSpawnerAction.yml index 68d62aa4..e6dc9ee0 100644 --- a/components/schemas/infrastructure/servers/taskActions/RestartComputeSpawnerTask.yml +++ b/components/schemas/infrastructure/servers/taskActions/ServerRestartComputeSpawnerAction.yml @@ -1,4 +1,4 @@ -title: RestartComputeSpawnerTask +title: ServerRestartComputeSpawnerAction type: object description: A job that restarts compute service on a given server. required: diff --git a/components/schemas/infrastructure/servers/taskActions/ServerTask.yml b/components/schemas/infrastructure/servers/taskActions/ServerTask.yml new file mode 100644 index 00000000..21645644 --- /dev/null +++ b/components/schemas/infrastructure/servers/taskActions/ServerTask.yml @@ -0,0 +1,19 @@ +title: ServerTask +discriminator: + propertyName: action + mapping: + sharedfs.reconfigure: ServerReconfigureSharedFsAction.yml + features.reconfigure: ServerReconfigureFeaturesAction.yml + restart: ServerRestartAction.yml + compute.restart: ServerRestartComputeAction.yml + compute.spawner.restart: ServerRestartComputeSpawnerAction.yml + evacuation.start: ServerEvacuateAction.yml + evacuation.reset: ServerEvacuateResetAction.yml +oneOf: + - $ref: ServerReconfigureSharedFsAction.yml + - $ref: ServerReconfigureFeaturesAction.yml + - $ref: ServerRestartAction.yml + - $ref: ServerRestartComputeAction.yml + - $ref: ServerRestartComputeSpawnerAction.yml + - $ref: ServerEvacuateAction.yml + - $ref: ServerEvacuateResetAction.yml diff --git a/components/schemas/stacks/builds/task/StackBuildGenerateAction.yml b/components/schemas/stacks/builds/task/StackBuildGenerateAction.yml index a6c3290b..3d7cbc90 100644 --- a/components/schemas/stacks/builds/task/StackBuildGenerateAction.yml +++ b/components/schemas/stacks/builds/task/StackBuildGenerateAction.yml @@ -1,10 +1,10 @@ -title: GenerateStackBuild -type: object -required: - - action -properties: - action: - type: string - description: The job to do. - enum: - - generate \ No newline at end of file +title: StackBuildGenerateAction +type: object +required: + - action +properties: + action: + type: string + description: The job to do. + enum: + - generate diff --git a/internal/components/instances/task/InstanceTask.yml b/internal/components/instances/task/InstanceTask.yml new file mode 100644 index 00000000..b115c343 --- /dev/null +++ b/internal/components/instances/task/InstanceTask.yml @@ -0,0 +1,9 @@ +title: InstanceTask +discriminator: + propertyName: action + mapping: + container.instance.start: StartInstanceTask.yml + container.instance.stop: StopInstanceTask.yml +oneOf: + - $ref: StartInstanceTask.yml + - $ref: StopInstanceTask.yml diff --git a/internal/components/instances/tasks/StartInstanceTask.yml b/internal/components/instances/task/StartInstanceAction.yml similarity index 91% rename from internal/components/instances/tasks/StartInstanceTask.yml rename to internal/components/instances/task/StartInstanceAction.yml index c73f34e2..fc1823e3 100644 --- a/internal/components/instances/tasks/StartInstanceTask.yml +++ b/internal/components/instances/task/StartInstanceAction.yml @@ -1,4 +1,4 @@ -title: StartInstanceTask +title: StartInstanceAction description: Properties for creating a job to start an instance. type: object required: @@ -20,7 +20,6 @@ properties: container_id: $ref: ../../../../components/schemas/ID.yml function: - anyOf: + anyOf: - $ref: ../../../../components/schemas/containers/functions/FunctionInitOpts.yml - type: "null" - diff --git a/internal/components/instances/tasks/StopInstanceTask.yml b/internal/components/instances/task/StopInstanceAction.yml similarity index 94% rename from internal/components/instances/tasks/StopInstanceTask.yml rename to internal/components/instances/task/StopInstanceAction.yml index dc894490..51e5df9e 100644 --- a/internal/components/instances/tasks/StopInstanceTask.yml +++ b/internal/components/instances/task/StopInstanceAction.yml @@ -1,4 +1,4 @@ -title: StopInstanceTask +title: StopInstanceAction description: Properties for creating a job to stop an instance. type: object required: diff --git a/internal/paths/conductor/tasks.yml b/internal/paths/conductor/tasks.yml index f248ef3d..47425151 100644 --- a/internal/paths/conductor/tasks.yml +++ b/internal/paths/conductor/tasks.yml @@ -12,14 +12,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - container.instance.start: ../../components/instances/tasks/StartInstanceTask.yml - container.instance.stop: ../../components/instances/tasks/StopInstanceTask.yml - oneOf: - - $ref: ../../components/instances/tasks/StartInstanceTask.yml - - $ref: ../../components/instances/tasks/StopInstanceTask.yml + $ref: ../../components/instances/task/InstanceTask.yml responses: default: $ref: ../../../components/responses/errors/DefaultError.yml diff --git a/platform/paths/containers/functions/tasks.yml b/platform/paths/containers/functions/tasks.yml index 63e52a7c..95ee13d1 100644 --- a/platform/paths/containers/functions/tasks.yml +++ b/platform/paths/containers/functions/tasks.yml @@ -19,12 +19,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - trigger: ../../../../components/schemas/containers/functions/taskActions/trigger.yml - oneOf: - - $ref: ../../../../components/schemas/containers/functions/taskActions/trigger.yml + $ref: ../../../../components/schemas/containers/functions/task/FunctionTask.yml responses: 202: description: Returns a Job Descriptor. diff --git a/platform/paths/containers/instances/tasks.yml b/platform/paths/containers/instances/tasks.yml index 5dcf48b7..8d99f4a7 100644 --- a/platform/paths/containers/instances/tasks.yml +++ b/platform/paths/containers/instances/tasks.yml @@ -25,16 +25,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - migration.start: ../../../../components/schemas/containers/instances/taskActions/Migrate.yml - migration.revert: ../../../../components/schemas/containers/instances/taskActions/RevertMigration.yml - volume.extend: ../../../../components/schemas/containers/instances/taskActions/ExtendVolume.yml - oneOf: - - $ref: ../../../../components/schemas/containers/instances/taskActions/Migrate.yml - - $ref: ../../../../components/schemas/containers/instances/taskActions/RevertMigration.yml - - $ref: ../../../../components/schemas/containers/instances/taskActions/ExtendVolume.yml + $ref: ../../../../components/schemas/containers/instances/task/InstanceTask.yml responses: 202: description: Returns a Job Descriptor. diff --git a/platform/paths/environments/services/vpn/tasks.yml b/platform/paths/environments/services/vpn/tasks.yml index 4de6614d..2572e7cc 100644 --- a/platform/paths/environments/services/vpn/tasks.yml +++ b/platform/paths/environments/services/vpn/tasks.yml @@ -16,14 +16,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - reset: ../../../../../components/schemas/environments/services/vpn/taskActions/VpnResetTask.yml - reconfigure: ../../../../../components/schemas/environments/services/vpn/taskActions/VpnReconfigureTask.yml - oneOf: - - $ref: ../../../../../components/schemas/environments/services/vpn/taskActions/VpnResetTask.yml - - $ref: ../../../../../components/schemas/environments/services/vpn/taskActions/VpnReconfigureTask.yml + $ref: ../../../../../components/schemas/environments/services/vpn/task/VpnTask.yml responses: 202: description: Returns a Job Descriptor. diff --git a/platform/paths/environments/tasks.yml b/platform/paths/environments/tasks.yml index 001fb43e..eeb87db1 100644 --- a/platform/paths/environments/tasks.yml +++ b/platform/paths/environments/tasks.yml @@ -19,18 +19,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - start: ../../../components/schemas/environments/taskActions/EnvironmentStartAction.yml - stop: ../../../components/schemas/environments/taskActions/EnvironmentStopAction.yml - initialize: ../../../components/schemas/environments/taskActions/EnvironmentInitializeAction.yml - deployments.reconfigure: ../../../components/schemas/environments/taskActions/EnvironmentReconfigureDeploymentsAction.yml - oneOf: - - $ref: ../../../components/schemas/environments/taskActions/EnvironmentStartAction.yml - - $ref: ../../../components/schemas/environments/taskActions/EnvironmentStopAction.yml - - $ref: ../../../components/schemas/environments/taskActions/EnvironmentInitializeAction.yml - - $ref: ../../../components/schemas/environments/taskActions/EnvironmentReconfigureDeploymentsAction.yml + $ref: ../../../components/schemas/environments/task/EnvironmentTask.yml responses: 202: description: Returns a Job Descriptor. diff --git a/platform/paths/infrastructure/servers/tasks.yml b/platform/paths/infrastructure/servers/tasks.yml index cbb911a3..0525ef22 100644 --- a/platform/paths/infrastructure/servers/tasks.yml +++ b/platform/paths/infrastructure/servers/tasks.yml @@ -16,24 +16,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - sharedfs.reconfigure: ../../../../components/schemas/infrastructure/servers/taskActions/ReconfigureSharedFsTask.yml - features.reconfigure: ../../../../components/schemas/infrastructure/servers/taskActions/ReconfigureServerFeaturesTask.yml - restart: ../../../../components/schemas/infrastructure/servers/taskActions/RestartServerTask.yml - compute.restart: ../../../../components/schemas/infrastructure/servers/taskActions/RestartComputeTask.yml - compute.spawner.restart: ../../../../components/schemas/infrastructure/servers/taskActions/RestartComputeSpawnerTask.yml - evacuation.start: ../../../../components/schemas/infrastructure/servers/taskActions/EvacuateServerTask.yml - evacuation.reset: ../../../../components/schemas/infrastructure/servers/taskActions/EvacuateServerResetTask.yml - oneOf: - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/ReconfigureSharedFsTask.yml - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/ReconfigureServerFeaturesTask.yml - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/RestartServerTask.yml - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/RestartComputeTask.yml - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/RestartComputeSpawnerTask.yml - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/EvacuateServerTask.yml - - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/EvacuateServerResetTask.yml + $ref: ../../../../components/schemas/infrastructure/servers/taskActions/ServerTask.yml responses: 202: description: Returns a Job Descriptor. From 942f8091f19cd0c2b2bb19298449d1359cc8efaf Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Mon, 10 Feb 2025 13:47:26 -0800 Subject: [PATCH 5/8] refactor discriminated unions into own file --- .../ServerEvacuateAction.yml | 0 .../ServerEvacuateResetAction.yml | 0 .../ServerReconfigureFeaturesAction.yml | 0 .../ServerReconfigureSharedFsAction.yml | 0 .../ServerRestartAction.yml | 0 .../ServerRestartComputeAction.yml | 0 .../ServerRestartComputeSpawnerAction.yml | 0 .../{taskActions => task}/ServerTask.yml | 0 .../PipelineRerunAction.yml} | 2 +- .../schemas/pipelines/task/PipelineTask.yml | 9 +++++++++ .../PipelineTriggerAction.yml} | 0 .../VirtualMachineIpAllocateAction.yml} | 2 +- .../VirtualMachineIpUnallocateAction.yml} | 2 +- .../VirtualMachineReconfigureAction.yml} | 2 +- .../VirtualMachineRootPwChangeAction.yml} | 2 +- .../VirtualMachineStartAction.yml} | 4 ++-- .../VirtualMachineStopAction.yml} | 4 ++-- .../schemas/vms/task/VirtualMachineTask.yml | 17 +++++++++++++++++ platform/paths/infrastructure/servers/tasks.yml | 2 +- platform/paths/pipelines/tasks.yml | 9 +-------- platform/paths/virtual-machines/tasks.yml | 17 +---------------- 21 files changed, 38 insertions(+), 34 deletions(-) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerEvacuateAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerEvacuateResetAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerReconfigureFeaturesAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerReconfigureSharedFsAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerRestartAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerRestartComputeAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerRestartComputeSpawnerAction.yml (100%) rename components/schemas/infrastructure/servers/{taskActions => task}/ServerTask.yml (100%) rename components/schemas/pipelines/{taskActions/RerunPipelineAction.yml => task/PipelineRerunAction.yml} (90%) create mode 100644 components/schemas/pipelines/task/PipelineTask.yml rename components/schemas/pipelines/{taskActions/TriggerPipelineAction.yml => task/PipelineTriggerAction.yml} (100%) rename components/schemas/vms/{tasks/VirtualMachineIpAllocateTask.yml => task/VirtualMachineIpAllocateAction.yml} (89%) rename components/schemas/vms/{tasks/VirtualMachineIpUnallocateTask.yml => task/VirtualMachineIpUnallocateAction.yml} (89%) rename components/schemas/vms/{tasks/VirtualMachineReconfigureTask.yml => task/VirtualMachineReconfigureAction.yml} (84%) rename components/schemas/vms/{tasks/VirtualMachineRootPwChangeTask.yml => task/VirtualMachineRootPwChangeAction.yml} (89%) rename components/schemas/vms/{tasks/VirtualMachineStopTask.yml => task/VirtualMachineStartAction.yml} (63%) rename components/schemas/vms/{tasks/VirtualMachineStartTask.yml => task/VirtualMachineStopAction.yml} (64%) create mode 100644 components/schemas/vms/task/VirtualMachineTask.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerEvacuateAction.yml b/components/schemas/infrastructure/servers/task/ServerEvacuateAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerEvacuateAction.yml rename to components/schemas/infrastructure/servers/task/ServerEvacuateAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerEvacuateResetAction.yml b/components/schemas/infrastructure/servers/task/ServerEvacuateResetAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerEvacuateResetAction.yml rename to components/schemas/infrastructure/servers/task/ServerEvacuateResetAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerReconfigureFeaturesAction.yml b/components/schemas/infrastructure/servers/task/ServerReconfigureFeaturesAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerReconfigureFeaturesAction.yml rename to components/schemas/infrastructure/servers/task/ServerReconfigureFeaturesAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerReconfigureSharedFsAction.yml b/components/schemas/infrastructure/servers/task/ServerReconfigureSharedFsAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerReconfigureSharedFsAction.yml rename to components/schemas/infrastructure/servers/task/ServerReconfigureSharedFsAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerRestartAction.yml b/components/schemas/infrastructure/servers/task/ServerRestartAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerRestartAction.yml rename to components/schemas/infrastructure/servers/task/ServerRestartAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerRestartComputeAction.yml b/components/schemas/infrastructure/servers/task/ServerRestartComputeAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerRestartComputeAction.yml rename to components/schemas/infrastructure/servers/task/ServerRestartComputeAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerRestartComputeSpawnerAction.yml b/components/schemas/infrastructure/servers/task/ServerRestartComputeSpawnerAction.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerRestartComputeSpawnerAction.yml rename to components/schemas/infrastructure/servers/task/ServerRestartComputeSpawnerAction.yml diff --git a/components/schemas/infrastructure/servers/taskActions/ServerTask.yml b/components/schemas/infrastructure/servers/task/ServerTask.yml similarity index 100% rename from components/schemas/infrastructure/servers/taskActions/ServerTask.yml rename to components/schemas/infrastructure/servers/task/ServerTask.yml diff --git a/components/schemas/pipelines/taskActions/RerunPipelineAction.yml b/components/schemas/pipelines/task/PipelineRerunAction.yml similarity index 90% rename from components/schemas/pipelines/taskActions/RerunPipelineAction.yml rename to components/schemas/pipelines/task/PipelineRerunAction.yml index 895c2503..f44851ef 100644 --- a/components/schemas/pipelines/taskActions/RerunPipelineAction.yml +++ b/components/schemas/pipelines/task/PipelineRerunAction.yml @@ -1,4 +1,4 @@ -title: RerunPipelineAction +title: PipelineTriggerAction type: object required: - action diff --git a/components/schemas/pipelines/task/PipelineTask.yml b/components/schemas/pipelines/task/PipelineTask.yml new file mode 100644 index 00000000..13c4f888 --- /dev/null +++ b/components/schemas/pipelines/task/PipelineTask.yml @@ -0,0 +1,9 @@ +title: PipelineTask +discriminator: + propertyName: action + mapping: + trigger: PipelineTriggerAction.yml + rerun: PipelineRerunAction.yml +oneOf: + - $ref: PipelineTriggerAction.yml + - $ref: PipelineRerunAction.yml diff --git a/components/schemas/pipelines/taskActions/TriggerPipelineAction.yml b/components/schemas/pipelines/task/PipelineTriggerAction.yml similarity index 100% rename from components/schemas/pipelines/taskActions/TriggerPipelineAction.yml rename to components/schemas/pipelines/task/PipelineTriggerAction.yml diff --git a/components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml b/components/schemas/vms/task/VirtualMachineIpAllocateAction.yml similarity index 89% rename from components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml rename to components/schemas/vms/task/VirtualMachineIpAllocateAction.yml index 445ffd1b..7fc7a306 100644 --- a/components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml +++ b/components/schemas/vms/task/VirtualMachineIpAllocateAction.yml @@ -1,4 +1,4 @@ -title: VirtualMachineIpAllocateTask +title: VirtualMachineIpAllocateAction type: object required: - action diff --git a/components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml b/components/schemas/vms/task/VirtualMachineIpUnallocateAction.yml similarity index 89% rename from components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml rename to components/schemas/vms/task/VirtualMachineIpUnallocateAction.yml index acb3dc4f..317a9fad 100644 --- a/components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml +++ b/components/schemas/vms/task/VirtualMachineIpUnallocateAction.yml @@ -1,4 +1,4 @@ -title: VirtualMachineIpUnallocateTask +title: VirtualMachineIpUnallocateAction type: object required: - action diff --git a/components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml b/components/schemas/vms/task/VirtualMachineReconfigureAction.yml similarity index 84% rename from components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml rename to components/schemas/vms/task/VirtualMachineReconfigureAction.yml index c3ab325f..3fe1f9dd 100644 --- a/components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml +++ b/components/schemas/vms/task/VirtualMachineReconfigureAction.yml @@ -1,4 +1,4 @@ -title: VirtualMachineReconfigureTask +title: VirtualMachineReconfigureAction type: object required: - action diff --git a/components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml b/components/schemas/vms/task/VirtualMachineRootPwChangeAction.yml similarity index 89% rename from components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml rename to components/schemas/vms/task/VirtualMachineRootPwChangeAction.yml index ec17a555..7fea36e6 100644 --- a/components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml +++ b/components/schemas/vms/task/VirtualMachineRootPwChangeAction.yml @@ -1,4 +1,4 @@ -title: VirtualMachineRootPwChangeTask +title: VirtualMachineRootPwChangeAction type: object required: - action diff --git a/components/schemas/vms/tasks/VirtualMachineStopTask.yml b/components/schemas/vms/task/VirtualMachineStartAction.yml similarity index 63% rename from components/schemas/vms/tasks/VirtualMachineStopTask.yml rename to components/schemas/vms/task/VirtualMachineStartAction.yml index 83c8d1bf..89aaf6fc 100644 --- a/components/schemas/vms/tasks/VirtualMachineStopTask.yml +++ b/components/schemas/vms/task/VirtualMachineStartAction.yml @@ -1,4 +1,4 @@ -title: VirtualMachineStopTask +title: VirtualMachineStartAction type: object required: - action @@ -6,4 +6,4 @@ properties: action: type: string enum: - - stop \ No newline at end of file + - start diff --git a/components/schemas/vms/tasks/VirtualMachineStartTask.yml b/components/schemas/vms/task/VirtualMachineStopAction.yml similarity index 64% rename from components/schemas/vms/tasks/VirtualMachineStartTask.yml rename to components/schemas/vms/task/VirtualMachineStopAction.yml index 7b07827a..cf09c60f 100644 --- a/components/schemas/vms/tasks/VirtualMachineStartTask.yml +++ b/components/schemas/vms/task/VirtualMachineStopAction.yml @@ -1,4 +1,4 @@ -title: VirtualMachineStartTask +title: VirtualMachineStopAction type: object required: - action @@ -6,4 +6,4 @@ properties: action: type: string enum: - - start \ No newline at end of file + - stop diff --git a/components/schemas/vms/task/VirtualMachineTask.yml b/components/schemas/vms/task/VirtualMachineTask.yml new file mode 100644 index 00000000..b076fec4 --- /dev/null +++ b/components/schemas/vms/task/VirtualMachineTask.yml @@ -0,0 +1,17 @@ +title: VirtualMachineStopTask.yml +discriminator: + propertyName: action + mapping: + start: VirtualMachineStartAction.yml + stop: VirtualMachineStopAction.yml + reconfigure: VirtualMachineReconfigureAction.yml + rootpw.change: VirtualMachineRootPwChangeAction.yml + ip.allocate: VirtualMachineIpAllocateAction.yml + ip.unallocate: VirtualMachineIpUnallocateAction.yml +oneOf: + - $ref: VirtualMachineStartAction.yml + - $ref: VirtualMachineStopAction.yml + - $ref: VirtualMachineReconfigureAction.yml + - $ref: VirtualMachineRootPwChangeAction.yml + - $ref: VirtualMachineIpAllocateAction.yml + - $ref: VirtualMachineIpUnallocateAction.yml diff --git a/platform/paths/infrastructure/servers/tasks.yml b/platform/paths/infrastructure/servers/tasks.yml index 0525ef22..e45c8194 100644 --- a/platform/paths/infrastructure/servers/tasks.yml +++ b/platform/paths/infrastructure/servers/tasks.yml @@ -16,7 +16,7 @@ post: content: application/json: schema: - $ref: ../../../../components/schemas/infrastructure/servers/taskActions/ServerTask.yml + $ref: ../../../../components/schemas/infrastructure/servers/task/ServerTask.yml responses: 202: description: Returns a Job Descriptor. diff --git a/platform/paths/pipelines/tasks.yml b/platform/paths/pipelines/tasks.yml index c47e5a33..2669b409 100644 --- a/platform/paths/pipelines/tasks.yml +++ b/platform/paths/pipelines/tasks.yml @@ -16,14 +16,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - trigger: ../../../components/schemas/pipelines/taskActions/TriggerPipelineAction.yml - rerun: ../../../components/schemas/pipelines/taskActions/RerunPipelineAction.yml - oneOf: - - $ref: ../../../components/schemas/pipelines/taskActions/TriggerPipelineAction.yml - - $ref: ../../../components/schemas/pipelines/taskActions/RerunPipelineAction.yml + $ref: ../../../components/schemas/pipelines/task/PipelineTask.yml responses: 202: description: Returns a job descriptor. diff --git a/platform/paths/virtual-machines/tasks.yml b/platform/paths/virtual-machines/tasks.yml index 340e4216..a91b86cf 100644 --- a/platform/paths/virtual-machines/tasks.yml +++ b/platform/paths/virtual-machines/tasks.yml @@ -25,22 +25,7 @@ post: content: application/json: schema: - discriminator: - propertyName: action - mapping: - start: ../../../components/schemas/vms/tasks/VirtualMachineStartTask.yml - stop: ../../../components/schemas/vms/tasks/VirtualMachineStopTask.yml - reconfigure: ../../../components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml - rootpw.change: ../../../components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml - ip.allocate: ../../../components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml - ip.unallocate: ../../../components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml - oneOf: - - $ref: ../../../components/schemas/vms/tasks/VirtualMachineStartTask.yml - - $ref: ../../../components/schemas/vms/tasks/VirtualMachineStopTask.yml - - $ref: ../../../components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml - - $ref: ../../../components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml - - $ref: ../../../components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml - - $ref: ../../../components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml + $ref: ../../../components/schemas/vms/task/VirtualMachineTask.yml responses: 202: description: Returns a job descriptor. From 1b69d2c17ed27e37c816068bcb5d0b75fe77c64f Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Tue, 11 Feb 2025 07:50:59 -0800 Subject: [PATCH 6/8] fix build issue --- internal/components/instances/task/InstanceTask.yml | 8 ++++---- package.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/components/instances/task/InstanceTask.yml b/internal/components/instances/task/InstanceTask.yml index b115c343..eed1ae1c 100644 --- a/internal/components/instances/task/InstanceTask.yml +++ b/internal/components/instances/task/InstanceTask.yml @@ -2,8 +2,8 @@ title: InstanceTask discriminator: propertyName: action mapping: - container.instance.start: StartInstanceTask.yml - container.instance.stop: StopInstanceTask.yml + container.instance.start: StartInstanceAction.yml + container.instance.stop: StopInstanceAction.yml oneOf: - - $ref: StartInstanceTask.yml - - $ref: StopInstanceTask.yml + - $ref: StartInstanceAction.yml + - $ref: StopInstanceAction.yml diff --git a/package.json b/package.json index a8bbca46..13b3dd72 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "lint:platform": "npx @redocly/cli lint ./platform/api.yml", "lint:internal": "npx @redocly/cli lint ./internal/api.yml", "lint:scheduler": "npx @redocly/cli lint ./scheduler/api.yml", + "lint:ial": "npx @redocly/cli lint ./ial/api.yml", "build": "npm run build:platform && npm run build:internal", "build:platform": "npx @redocly/cli@1.11.0 bundle platform/api.yml --output dist/platform.yml", "build:internal": "npx @redocly/cli@1.11.0 bundle internal/api.yml --output dist/internal.yml", From 294a222af405eb1866154dd2e1f42f73f505a330 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:06:47 -0800 Subject: [PATCH 7/8] fix monitoring tier --- components/schemas/environments/EnvironmentFeatures.yml | 7 +------ platform/paths/environments/environment.yml | 8 ++------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/components/schemas/environments/EnvironmentFeatures.yml b/components/schemas/environments/EnvironmentFeatures.yml index 811a8098..3e170a18 100644 --- a/components/schemas/environments/EnvironmentFeatures.yml +++ b/components/schemas/environments/EnvironmentFeatures.yml @@ -16,9 +16,4 @@ properties: - tier properties: tier: - type: string - enum: - - limited - - basic - - premium - - enterprise + $ref: monitoring/MonitoringTier.yml diff --git a/platform/paths/environments/environment.yml b/platform/paths/environments/environment.yml index 769392dd..e3ca8625 100644 --- a/platform/paths/environments/environment.yml +++ b/platform/paths/environments/environment.yml @@ -112,12 +112,8 @@ patch: - tier properties: tier: - type: string - enum: - - limited - - standard - - premium - - enterprise + $ref: ../../../components/schemas/environments/monitoring/MonitoringTier.yml + responses: 200: description: Returns an Environment. From 0233aba3fb45527a36f1e69168a6682ce3de1454 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:21:40 -0800 Subject: [PATCH 8/8] undo mistake with nullable v1config --- .../services/loadbalancer/config/types/v1/V1LbType.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/schemas/environments/services/loadbalancer/config/types/v1/V1LbType.yml b/components/schemas/environments/services/loadbalancer/config/types/v1/V1LbType.yml index 45d2d962..7df2d6c5 100644 --- a/components/schemas/environments/services/loadbalancer/config/types/v1/V1LbType.yml +++ b/components/schemas/environments/services/loadbalancer/config/types/v1/V1LbType.yml @@ -17,9 +17,7 @@ properties: enum: - "v1" details: - anyOf: - - $ref: V1LbConfig.yml - - type: "null" + $ref: V1LbConfig.yml bind_host: description: | Binds the load balancer to the host server IP address.