File tree Expand file tree Collapse file tree 1 file changed +27
-26
lines changed
docs/core_concepts/13_json_schema_and_parsing Expand file tree Collapse file tree 1 file changed +27
-26
lines changed Original file line number Diff line number Diff line change @@ -52,32 +52,33 @@ Scripts in Windmill have input parameters defined by a JSON Schema, where each p
52
52
53
53
In Python:
54
54
55
- | Python | JSON Schema |
56
- | ---------- | -------------------------------- |
57
- | ` str ` | ` string ` |
58
- | ` float ` | ` number ` |
59
- | ` str ` | ` string ` |
60
- | ` float ` | ` number ` |
61
- | ` int ` | ` integer ` |
62
- | ` bool ` | ` boolean ` |
63
- | ` dict ` | ` object ` |
64
- | ` list ` | ` any[] ` |
65
- | ` bytes ` | ` string, encodingFormat: base64 ` |
66
- | ` datetime ` | ` str, format: date-time ` |
67
- | ` _ ` | ` any ` |
68
-
69
- In Deno:
70
-
71
- | Deno | JSON Schema |
72
- | -------------------- | ----------- |
73
- | ` string ` | ` string ` |
74
- | ` object ` | ` object ` |
75
- | ` boolean ` | ` boolean ` |
76
- | ` bigint ` | ` int ` |
77
- | ` number ` | ` number ` |
78
- | ` string[] ` | ` string[] ` |
79
- | ` ("foo" \| "bar")[] ` | ` enum[] ` |
80
- | ... | ... |
55
+ | Python | JSON Schema |
56
+ | ------------------- | -------------------------------- |
57
+ | ` str ` | ` string ` |
58
+ | ` float ` | ` number ` |
59
+ | ` Literal["a", "b"] ` | ` string ` with enums: "a", "b" |
60
+ | ` int ` | ` integer ` |
61
+ | ` bool ` | ` boolean ` |
62
+ | ` dict ` | ` object ` |
63
+ | ` list ` | ` any[] ` |
64
+ | ` List[str] ` | ` string[] ` |
65
+ | ` bytes ` | ` string, encodingFormat: base64 ` |
66
+ | ` datetime ` | ` str, format: date-time ` |
67
+ | ` _ ` | ` any ` |
68
+
69
+ In Deno/Bun/REST:
70
+
71
+ | Deno | JSON Schema |
72
+ | -------------------- | ----------------------------- |
73
+ | ` string ` | ` string ` |
74
+ | ` "a" \| "b" ` | ` string ` with enums: "a", "b" |
75
+ | ` object ` | ` object ` |
76
+ | ` boolean ` | ` boolean ` |
77
+ | ` bigint ` | ` int ` |
78
+ | ` number ` | ` number ` |
79
+ | ` string[] ` | ` string[] ` |
80
+ | ` ("foo" \| "bar")[] ` | ` enum[] ` |
81
+ | ... | ... |
81
82
82
83
However in Deno there also some special types that are specific to Windmill.
83
84
They are as follows:
You can’t perform that action at this time.
0 commit comments