mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 08:07:03 +00:00
fix python type inference
This commit is contained in:
@@ -166,7 +166,7 @@
|
||||
<FieldHeader {label} {required} {type} {contentEncoding} {format} {itemsType} />
|
||||
{/if}
|
||||
{#if editableSchema}
|
||||
<div class="my-1 text-xs border-solid border border-gray-400">
|
||||
<div class="p-2 my-1 text-xs border-solid border border-gray-400">
|
||||
<span
|
||||
class="underline"
|
||||
on:click={() => {
|
||||
|
||||
@@ -34,7 +34,11 @@
|
||||
}
|
||||
|
||||
function resourceToValue() {
|
||||
value = `$res:${path}`
|
||||
if (path) {
|
||||
value = `$res:${path}`
|
||||
} else {
|
||||
value = undefined
|
||||
}
|
||||
}
|
||||
|
||||
function isResource() {
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
['None', 'none'],
|
||||
['File (base64)', 'base64'],
|
||||
['Enum', 'enum'],
|
||||
['Resource Path', 'resource'],
|
||||
['Format', 'format'],
|
||||
['Pattern', 'pattern']
|
||||
]}
|
||||
|
||||
@@ -67,7 +67,6 @@ function argSigToJsonSchemaType(
|
||||
oldS: SchemaProperty
|
||||
): void {
|
||||
|
||||
|
||||
const newS: SchemaProperty = { type: '', description: '' }
|
||||
if (t === 'int') {
|
||||
newS.type = 'integer'
|
||||
@@ -128,4 +127,7 @@ function argSigToJsonSchemaType(
|
||||
}
|
||||
}
|
||||
Object.assign(oldS, newS)
|
||||
if (oldS.format?.startsWith('resource-') && newS.type != 'object') {
|
||||
oldS.format = undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,8 +464,6 @@ export function setInputCat(
|
||||
return 'yaml'
|
||||
} else if (type == 'string' && contentEncoding == 'base64') {
|
||||
return 'base64'
|
||||
} else if (type == 'string' && format?.startsWith('resource')) {
|
||||
return 'resource-string'
|
||||
} else {
|
||||
return 'string'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user