serverless/test/fixtures/configSchemaExtensionsError/test-plugin-with-complex-event-without-object-definition.js
Frédéric Barthelet e32b771425
fix(Config Schema): Fix defineFunctionEventProperties
Fix support for multiple event types

(PR #8486)
2020-11-09 12:16:19 +01:00

31 lines
716 B
JavaScript

'use strict';
class TestPluginWithComplexEventWithoutObjectDefinitionError {
constructor(serverless) {
serverless.configSchemaHandler.defineProvider('someProvider', {
function: {
properties: {
handler: { type: 'string' },
},
},
functionEvents: {
existingComplexEvent: {
anyOf: [{ type: 'string' }, { type: 'integer' }],
},
},
});
serverless.configSchemaHandler.defineFunctionEventProperties(
'someProvider',
'existingComplexEvent',
{
properties: {
someProperty: { type: 'string' },
},
}
);
}
}
module.exports = TestPluginWithComplexEventWithoutObjectDefinitionError;