-
Notifications
You must be signed in to change notification settings - Fork 5
/
schemas.js
70 lines (69 loc) · 2.15 KB
/
schemas.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const plugin = exports.plugin = {
'$id': 'http://express-gateway.io/schemas/plugins/lambda.json',
type: 'object',
properties: {
invocationType: {
title: 'Invocation Type',
description: 'AWS Lambda invocation type',
type: 'string',
enum: ['RequestResponse', 'Event', 'DryRun'],
//default: 'RequestResponse'
},
logType: {
title: 'Log Type',
description: 'AWS Lambda log type',
type: 'string',
enum: ['None', 'Tail'],
//default: 'None'
},
unhandledStatus: {
title: 'Unhandled Status',
description: 'When the Lambda function returns with an unhandled error, usually due to an absence of available resources, this status code will be returned to the client',
type: 'integer',
minimum: 100,
maximum: 599,
//default: 500
},
useCustomIntegration: {
title: 'Use Custom Integration',
description: 'Use Custom Integration Mode for AWS Lambda',
type: 'boolean',
//default: false
},
maxJSONParseLength: {
title: 'Maximum JSON Parse Length',
description: 'Maximum number of bytes to allow for parsing responses as JSON in an attempt to guess the MIME type',
type: 'integer',
//default: (5 * 1.049e+6) // 5MiB
}
}
};
exports.policy = {
'$id': 'http://express-gateway.io/schemas/policies/lambda-proxy.json',
type: 'object',
properties: Object.assign({}, plugin.properties, {
functionName: {
title: 'Function Name',
description: 'The name of the AWS Lambda function to execute',
type: 'string',
},
qualifier: {
title: 'Qualifier',
description: 'An AWS Lambda function version or alias name',
type: 'string'
},
ignorePath: {
title: 'Ignore Path',
description: 'Don\'t forward to the incoming request\'s URL path (Proxy Integration mode only)',
type: 'boolean',
//default: false
},
stripPath: {
title: 'Strip Path',
description: 'Strip the API Endpoint path prefix from the incoming request\'s URL path (Proxy Integration mode only)',
type: 'boolean',
//default: false
},
}),
required: ['functionName']
};