Skip to content

Commit bfb23bb

Browse files
committed
feat(validation): add component api validation
1 parent 74b96d6 commit bfb23bb

File tree

6 files changed

+92
-26
lines changed

6 files changed

+92
-26
lines changed

components/CrsSelector.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
},
8282
)
8383
}
84-
8584
const headers = [
8685
{
8786
title: "Authority",

components/ExtensionSelector.vue

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,19 @@
3131
3232
const file_extensions = ref([])
3333
34-
async function get_output_file_extensions() {
35-
const params = new FormData()
36-
params.append("geode_object", geode_object)
37-
await api_fetch(
38-
`${route_prefix}/output_file_extensions`,
39-
{ method: "POST", body: params },
40-
{
41-
response_function: (response) => {
42-
file_extensions.value = response._data.output_file_extensions
43-
},
44-
},
45-
)
46-
}
4734
35+
async function get_output_file_extensions () {
36+
const params = {
37+
'geode_object': geode_object
38+
}
39+
await api_fetch(ExtensionSelector_json.id, params,
40+
{
41+
'response_function': (response) => {
42+
file_extensions.value = response._data.output_file_extensions
43+
},
44+
}
45+
)
46+
}
4847
function set_output_extension(extension) {
4948
stepper_tree[variable_to_update] = extension
5049
stepper_tree[variable_to_increment]++

components/FileSelector.vue

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,15 @@
4040
accept.value = extensions
4141
}
4242
43-
async function get_allowed_files() {
44-
const route = `${route_prefix}/allowed_files`
45-
await api_fetch(
46-
route,
47-
{ method: "GET" },
48-
{
49-
response_function: (response) => {
50-
fill_extensions(response)
51-
},
52-
},
53-
)
54-
}
43+
async function get_allowed_files () {
44+
const route = `${route_prefix}/allowed_files`
45+
await api_fetch(FileSelector_json.id, params,
46+
{
47+
'response_function': (response) => {
48+
fill_extensions(response)
49+
}
50+
})
51+
}
5552
5653
onMounted(async () => {
5754
await get_allowed_files()

components/Step.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$id": "/workflows/step_component",
3+
"type": "object",
4+
"properties": {
5+
"step_index": {
6+
"type": "number"
7+
},
8+
"steps": {
9+
"type": "array",
10+
"items": {
11+
"type": "object",
12+
"properties": {
13+
"step_title": {
14+
"type": "string"
15+
},
16+
"chips": {
17+
"type": "array",
18+
"items": {
19+
"type": "string"
20+
}
21+
},
22+
"component": {
23+
"type": "object",
24+
"properties": {
25+
"component_name": {
26+
"type": "string"
27+
},
28+
"component_options": {
29+
"type": "object"
30+
},
31+
"skippable": {
32+
"type": "boolean"
33+
}
34+
},
35+
"required": ["component_name", "component_options"]
36+
}
37+
}
38+
}
39+
},
40+
"current_step_index": {
41+
"type": "number"
42+
}
43+
},
44+
"required": ["step_index", "steps", "current_step_index"]
45+
}
46+

components/Stepper.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$id": "/workflows/stepper",
3+
"type": "object",
4+
"properties": {
5+
"steps": {
6+
"type": "array",
7+
"items": {
8+
"type": "object"
9+
}
10+
}
11+
},
12+
"required": ["steps"]
13+
}
14+

components/ViewToolbar.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$id": "/components/float_toolbar",
3+
"type": "object",
4+
"properties": {
5+
"reset_camera": {
6+
"type": "function"
7+
}
8+
},
9+
"required": ["reset_camera"]
10+
}
11+

0 commit comments

Comments
 (0)