serverless/test/fixtures/programmatic/configSchemaExtensionsError/test-plugin-with-complex-event-without-object-definition.js
2021-04-09 16:10:21 +02: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;