serverless/test/fixtures/programmatic/config-schema-extensions-error/test-plugin-with-colliding-function-event.js
2024-05-29 11:51:04 -04:00

35 lines
786 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