Added optional parameter parsing from OpenAPI

This commit is contained in:
frikky
2020-12-08 14:47:36 +01:00
parent 1f012e9665
commit ca45559b54
3 changed files with 61 additions and 3 deletions
+2 -2
View File
@@ -7099,7 +7099,7 @@ func runInit(ctx context.Context) {
// Fixing workflows to have real activeorg IDs
if len(activeOrgs) == 1 {
q := datastore.NewQuery("workflow")
q := datastore.NewQuery("workflow").Limit(35)
var workflows []Workflow
_, err = dbclient.GetAll(ctx, q, &workflows)
if err != nil {
@@ -7383,7 +7383,7 @@ func runInit(ctx context.Context) {
workflowLocation := os.Getenv("SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION")
if len(workflowLocation) > 0 {
log.Printf("Downloading WORKFLOWS from %s if no workflows - EXTRA workflows", workflowLocation)
q := datastore.NewQuery("workflow")
q := datastore.NewQuery("workflow").Limit(35)
var workflows []Workflow
_, err = dbclient.GetAll(ctx, q, &workflows)
if err != nil {
+6
View File
@@ -178,6 +178,7 @@ type WorkflowAppActionParameter struct {
Name string `json:"name" datastore:"name" yaml:"name"`
Example string `json:"example" datastore:"example" yaml:"example"`
Value string `json:"value" datastore:"value,noindex" yaml:"value,omitempty"`
ValueReplace []ValueReplace `json:"value_replace" datastore:"value_replace,noindex" yaml:"value_replace,omitempty"`
Multiline bool `json:"multiline" datastore:"multiline" yaml:"multiline"`
Options []string `json:"options" datastore:"options" yaml:"options"`
ActionField string `json:"action_field" datastore:"action_field" yaml:"actionfield,omitempty"`
@@ -189,6 +190,11 @@ type WorkflowAppActionParameter struct {
SkipMulticheck bool `json:"skip_multicheck" datastore:"skip_multicheck" yaml:"skip_multicheck"`
}
type ValueReplace struct {
Key string `json:"key" datastore:"key"`
Value string `json:"value" datastore:"value"`
}
type SchemaDefinition struct {
Type string `json:"type" datastore:"type"`
}