Skip to content

Commit

Permalink
Simplify schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jede committed Sep 30, 2020
1 parent 05f4296 commit 4008c6c
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions lib/plugins/aws/package/compile/events/cloudFront/index.js
Expand Up @@ -84,36 +84,16 @@ class AwsCompileCloudFrontEvents {
type: 'object',
properties: {
AllowedMethods: {
oneOf: [
{
uniqueItems: true,
minItems: 2,
items: { enum: ['GET', 'HEAD'] },
},
{
uniqueItems: true,
minItems: 3,
items: { enum: ['GET', 'HEAD', 'OPTIONS'] },
},
{
uniqueItems: true,
minItems: 7,
items: { enum: ['GET', 'HEAD', 'OPTIONS', 'PUT', 'PATCH', 'POST', 'DELETE'] },
},
enum: [
['GET', 'HEAD'],
['GET', 'HEAD', 'OPTIONS'],
['GET', 'HEAD', 'OPTIONS', 'PUT', 'PATCH', 'POST', 'DELETE'],
],
},
CachedMethods: {
oneOf: [
{
uniqueItems: true,
minItems: 2,
items: { enum: ['GET', 'HEAD'] },
},
{
uniqueItems: true,
minItems: 3,
items: { enum: ['GET', 'HEAD', 'OPTIONS'] },
},
enum: [
['GET', 'HEAD'],
['GET', 'HEAD', 'OPTIONS'],
],
},
ForwardedValues: {
Expand Down

0 comments on commit 4008c6c

Please sign in to comment.