mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
added validator for rjsf, hook form via standard schema
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { Flow, LogTask, SubFlowTask, RenderTask, Task } from "../../src/flows";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { s } from "core/object/schema";
|
||||
|
||||
export class StringifyTask<Output extends string> extends Task<
|
||||
typeof StringifyTask.schema,
|
||||
@@ -8,11 +8,9 @@ export class StringifyTask<Output extends string> extends Task<
|
||||
> {
|
||||
type = "stringify";
|
||||
|
||||
static override schema = Type.Optional(
|
||||
Type.Object({
|
||||
input: Type.Optional(Type.String()),
|
||||
}),
|
||||
);
|
||||
static override schema = s.object({
|
||||
input: s.string().optional(),
|
||||
});
|
||||
|
||||
async execute() {
|
||||
return JSON.stringify(this.params.input) as Output;
|
||||
|
||||
Reference in New Issue
Block a user