fix infering schema for inlineeditor

This commit is contained in:
Ruben Fiszel
2023-01-09 18:46:59 +01:00
parent 43d1074a20
commit 3da446ece5
2 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -2986,7 +2986,7 @@ paths:
- $ref: "#/components/parameters/CreatedAfter"
- $ref: "#/components/parameters/Success"
- $ref: "#/components/parameters/JobKinds"
- $ref: "#/components/parameters/Suspend"
responses:
"200":
description: All available queued jobs
@@ -4419,6 +4419,12 @@ components:
in: query
schema:
type: boolean
Suspend:
name: suspend
description: filter on suspended jobs
in: query
schema:
type: boolean
After:
name: after
description: filter on created after (exclusive) timestamp
@@ -11,7 +11,7 @@
import Badge from '$lib/components/common/badge/Badge.svelte'
import { fly } from 'svelte/transition'
import Editor from '$lib/components/Editor.svelte'
import { scriptLangToEditorLang } from '$lib/utils'
import { emptySchema, scriptLangToEditorLang } from '$lib/utils'
import Tooltip from '$lib/components/Tooltip.svelte'
let inlineScriptEditorDrawer: InlineScriptEditorDrawer
@@ -42,11 +42,11 @@
}
onMount(async () => {
if (inlineScript) {
if (inlineScript && !inlineScript.schema) {
inlineScript.schema = await inferInlineScriptSchema(
inlineScript?.language,
inlineScript?.content,
inlineScript?.schema
emptySchema()
)
}
})