diff --git a/src/schemaValidation/schemas/manifest.schema.json b/src/schemaValidation/schemas/manifest.schema.json index 8c869721..dd2e8d6c 100644 --- a/src/schemaValidation/schemas/manifest.schema.json +++ b/src/schemaValidation/schemas/manifest.schema.json @@ -151,47 +151,32 @@ } }, "globalEnvs": { - "oneOf": [ - { - "type": "array", - "description": "Request the DAPPMANAGER to inject the selected global ENVs to this package's containers", - "items": { - "type": "object", - "properties": { - "envs": { - "type": "array", - "description": "The list of envs to inject to the defined services", - "items": { - "type": "string", - "examples": [ - "_DAPPNODE_GLOBAL_NO_NAT_LOOPBACK", - "_DAPPNODE_GLOBAL_PUBLIC_IP" - ] - }, - "services": { - "type": "array", - "description": "The services to inject the global ENVs to", - "items": { - "type": "string", - "examples": ["webserver", "backend", "service1"] - } - } + "type": "array", + "description": "Request the DAPPMANAGER to inject the selected global ENVs to this package's containers", + "items": { + "type": "object", + "properties": { + "envs": { + "type": "array", + "description": "The list of envs to inject to the defined services", + "items": { + "type": "string", + "examples": [ + "_DAPPNODE_GLOBAL_NO_NAT_LOOPBACK", + "_DAPPNODE_GLOBAL_PUBLIC_IP" + ] + }, + "services": { + "type": "array", + "description": "The services to inject the global ENVs to", + "items": { + "type": "string", + "examples": ["webserver", "backend", "service1"] } } } - }, - { - "type": "object", - "description": "Request the DAPPMANAGER to inject global ENVs to this package's containers", - "properties": { - "all": { - "type": "boolean", - "description": "Request the DAPPMANAGER to inject all available global ENVs", - "examples": ["true"] - } - } } - ] + } }, "architectures": { "type": "array", diff --git a/test/schemaValidation/validateSchema.test.ts b/test/schemaValidation/validateSchema.test.ts index c850dbf1..7630a5f1 100644 --- a/test/schemaValidation/validateSchema.test.ts +++ b/test/schemaValidation/validateSchema.test.ts @@ -11,7 +11,7 @@ import { cleanTestDir, testDir } from "../testUtils"; describe("schemaValidation", () => { describe("manifest", () => { - it("validateManifest globalEnvs as array of strings", () => { + it("validateManifest globalEnvs as array of objects", () => { const manifest: Manifest = { name: "", version: "1.0.0", @@ -36,22 +36,6 @@ describe("schemaValidation", () => { expect(() => validateManifestSchema(manifest)).to.not.throw(); }); - it("validateManifest globalEnvs as object", () => { - const manifest: Manifest = { - name: "", - version: "1.0.0", - description: "", - type: "dncore", - license: "1", - globalEnvs: { all: true }, - chain: { - driver: "ethereum" - } - }; - - expect(() => validateManifestSchema(manifest)).to.not.throw(); - }); - it("validateManifest chainDriver as string", () => { const manifest: Manifest = { name: "",