diff --git a/docs/schema/yaml/1.0.0.yaml b/docs/schema/yaml/1.0.0.yaml index b78e7de8..a7dc2371 100644 --- a/docs/schema/yaml/1.0.0.yaml +++ b/docs/schema/yaml/1.0.0.yaml @@ -777,4 +777,4 @@ services: # @param services.dev.agentSession.skills.branch (required) branch: '' # @param services.dev.agentSession.skills.path (required) - path: '' \ No newline at end of file + path: '' diff --git a/src/server/lib/jsonschema/schemas/1.0.0.json b/src/server/lib/jsonschema/schemas/1.0.0.json index 1e851ed4..77aa2e73 100644 --- a/src/server/lib/jsonschema/schemas/1.0.0.json +++ b/src/server/lib/jsonschema/schemas/1.0.0.json @@ -251,7 +251,7 @@ "minItems": 1, "items": { "type": "object", - "additionalProperties": true, + "additionalProperties": false, "properties": { "name": { "type": "string" @@ -1515,4 +1515,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/server/lib/yamlSchemas/schema_1_0_0/schema_1_0_0.ts b/src/server/lib/yamlSchemas/schema_1_0_0/schema_1_0_0.ts index 354776dc..93aee5df 100644 --- a/src/server/lib/yamlSchemas/schema_1_0_0/schema_1_0_0.ts +++ b/src/server/lib/yamlSchemas/schema_1_0_0/schema_1_0_0.ts @@ -133,8 +133,7 @@ const schema_1_0_0 = { minItems: 1, items: { type: 'object', - // Backward compatibility: ignore deprecated or repo-specific service keys at validation time. - additionalProperties: true, + additionalProperties: false, properties: { name: { type: 'string' }, appShort: { type: 'string' }, diff --git a/src/server/models/config/index.test.ts b/src/server/models/config/index.test.ts index 1647f733..54922372 100644 --- a/src/server/models/config/index.test.ts +++ b/src/server/models/config/index.test.ts @@ -453,36 +453,4 @@ describe('Yaml Service', () => { expect(YamlService.getDetatchAfterBuildPipeline(service)).toEqual(false); }); }); - - describe('schema compatibility', () => { - test('accepts deprecated kedaScaleToZero config as a no-op', () => { - const deprecatedKedaConfig = `--- - version: '1.0.0' - - services: - - name: 'legacy-service' - kedaScaleToZero: - enabled: true - minReplicaCount: 0 - maxReplicaCount: 5 - cooldownPeriod: 300 - pollingInterval: 30 - helm: - repository: 'example/legacy-service' - branchName: 'main' - deploymentMethod: 'native' - chart: - name: 'example-chart' - docker: - defaultTag: 'main' - app: - dockerfilePath: 'Dockerfile' - `; - - const parser = new YamlConfigParser(); - const config = parser.parseYamlConfigFromString(deprecatedKedaConfig); - - expect(() => new YamlConfigValidator().validate_1_0_0(config)).not.toThrow(); - }); - }); });