Skip to content

Commit 33d3f00

Browse files
Merge pull request #357 from TheEdgeOfRage/master
Add basic schema validation
2 parents 1f76bb5 + 9bda3fd commit 33d3f00

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,20 @@ class ServerlessStepFunctions {
140140
.then(this.getEndpointInfo)
141141
.then(this.display),
142142
};
143+
144+
const stepFunctionsSchema = {
145+
type: 'object',
146+
properties: {
147+
stateMachines: { type: 'object' },
148+
validate: { type: 'boolean' },
149+
noOutput: { type: 'boolean' },
150+
},
151+
required: ['stateMachines'],
152+
};
153+
this.serverless.configSchemaHandler.defineTopLevelProperty(
154+
'stepFunctions',
155+
stepFunctionsSchema,
156+
);
143157
}
144158

145159
invoke() {

0 commit comments

Comments
 (0)