serverless/test/fixtures/programmatic/configSchemaExtensionsError/test-plugin-with-colliding-function-event.js
2021-04-09 16:10:21 +02:00

31 lines
751 B
JavaScript

'use strict';
class TestPluginWithCollidingFunctionEventError {
constructor(serverless) {
serverless.configSchemaHandler.defineProvider('someProvider', {
function: {
properties: {
handler: { type: 'string' },
},
},
functionEvents: {
existingEvent: {
type: 'object',
properties: { existingProp: { type: 'string' } },
},
},
});
serverless.configSchemaHandler.defineFunctionEvent('someProvider', 'existingEvent', {
type: 'object',
properties: {
someProperty: { type: 'string' },
},
required: ['someProperty'],
additionalProperties: false,
});
}
}
module.exports = TestPluginWithCollidingFunctionEventError;