Add basic workflow step saving to workflow update API

[MAILPOET-4420]
This commit is contained in:
Jan Jakes
2022-07-15 14:40:10 +02:00
committed by Veljko V
parent 55fb3f6c82
commit 7da2d2f7c8
4 changed files with 58 additions and 0 deletions

View File

@ -29,10 +29,19 @@ class WorkflowsPutEndpoint extends Endpoint {
}
public static function getRequestSchema(): array {
$step = Builder::object([
'id' => Builder::string()->required(),
'type' => Builder::string()->required(),
'key' => Builder::string()->required(),
'args' => Builder::object(),
'next_step_id' => Builder::string()->nullable(),
]);
return [
'id' => Builder::integer()->required(),
'name' => Builder::string()->minLength(1),
'status' => Builder::string(),
'steps' => Builder::object()->additionalProperties($step),
];
}