diff --git a/lib/plugins/aws/package/compile/events/stream/index.js b/lib/plugins/aws/package/compile/events/stream/index.js index 38db6250821..463d88be03b 100644 --- a/lib/plugins/aws/package/compile/events/stream/index.js +++ b/lib/plugins/aws/package/compile/events/stream/index.js @@ -17,7 +17,8 @@ class AwsCompileStreamEvents { { type: 'object', properties: { - arn: { $ref: '#/definitions/awsArn' }, + // arn constraints are listed in oneOf property of this schema + arn: {}, type: { enum: ['dynamodb', 'kinesis'] }, batchSize: { type: 'integer', minimum: 1, maximum: 10000 }, parallelizationFactor: { type: 'integer', minimum: 1, maximum: 10 }, @@ -42,22 +43,23 @@ class AwsCompileStreamEvents { { type: 'object', properties: { - arn: { $ref: '#/definitions/awsArn' }, + // arn constraints are listed in oneOf property of this schema + arn: {}, type: { enum: ['sns', 'sqs'] }, }, additionalProperties: false, - required: ['arn'], oneOf: [ { properties: { arn: { $ref: '#/definitions/awsCfFunction' }, }, - required: ['type'], + required: ['arn', 'type'], }, { properties: { arn: { $ref: '#/definitions/awsArnString' }, }, + required: ['arn'], }, ], }, @@ -69,18 +71,18 @@ class AwsCompileStreamEvents { }, }, additionalProperties: false, - required: ['arn'], oneOf: [ { properties: { arn: { $ref: '#/definitions/awsCfFunction' }, }, - required: ['type'], + required: ['arn', 'type'], }, { properties: { arn: { $ref: '#/definitions/awsArnString' }, }, + required: ['arn'], }, ], },