UNPKG

somod-schema

Version:

Schema to validate yaml files in somod modules

35 lines (34 loc) 886 B
export var customResourceTypePattern = "^Custom::[A-Z][a-zA-Z0-9]{0,63}$"; export var customResource = { type: "object", required: ["Type", "Properties"], anyOf: [ { type: "object", required: ["SOMOD::Extend"] }, { type: "object", properties: { Properties: { type: "object", required: ["ServiceToken"] } } } ], errorMessage: { anyOf: "When not extended, Properties must have ServiceToken" }, properties: { Type: { type: "string", pattern: customResourceTypePattern }, Properties: { type: "object", properties: { ServiceToken: { $ref: "#/definitions/somodRef" } } } } };