add to http request node convert tests

This commit is contained in:
takatost
2024-02-23 18:18:49 +08:00
parent 45621ba4d7
commit 0806b3163a
7 changed files with 210 additions and 9 deletions

View File

@ -400,10 +400,14 @@ class ApplicationManager:
config=val['config']
)
)
elif typ in [VariableEntity.Type.TEXT_INPUT.value, VariableEntity.Type.PARAGRAPH.value]:
elif typ in [
VariableEntity.Type.TEXT_INPUT.value,
VariableEntity.Type.PARAGRAPH.value,
VariableEntity.Type.NUMBER.value,
]:
properties['variables'].append(
VariableEntity(
type=VariableEntity.Type.TEXT_INPUT,
type=VariableEntity.Type.value_of(typ),
variable=variable[typ].get('variable'),
description=variable[typ].get('description'),
label=variable[typ].get('label'),

View File

@ -94,6 +94,7 @@ class VariableEntity(BaseModel):
TEXT_INPUT = 'text-input'
SELECT = 'select'
PARAGRAPH = 'paragraph'
NUMBER = 'number'
@classmethod
def value_of(cls, value: str) -> 'VariableEntity.Type':