File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -141,20 +141,23 @@ class ServerlessStepFunctions {
141141 . then ( this . display ) ,
142142 } ;
143143
144- const stepFunctionsSchema = {
145- type : 'object' ,
146- properties : {
147- stateMachines : { type : 'object' } ,
148- validate : { type : 'boolean' } ,
149- noOutput : { type : 'boolean' } ,
150- activities : { type : 'array' } ,
151- } ,
152- required : [ 'stateMachines' ] ,
153- } ;
154- this . serverless . configSchemaHandler . defineTopLevelProperty (
155- 'stepFunctions' ,
156- stepFunctionsSchema ,
157- ) ;
144+ // relevant since sls v1.78.0
145+ if ( this . serverless . configSchemaHandler ) {
146+ const stepFunctionsSchema = {
147+ type : 'object' ,
148+ properties : {
149+ stateMachines : { type : 'object' } ,
150+ validate : { type : 'boolean' } ,
151+ noOutput : { type : 'boolean' } ,
152+ activities : { type : 'array' } ,
153+ } ,
154+ required : [ 'stateMachines' ] ,
155+ } ;
156+ this . serverless . configSchemaHandler . defineTopLevelProperty (
157+ 'stepFunctions' ,
158+ stepFunctionsSchema ,
159+ ) ;
160+ }
158161 }
159162
160163 invoke ( ) {
You can’t perform that action at this time.
0 commit comments