added response object

This commit is contained in:
Kofo Okesola 2025-08-21 22:56:42 +01:00
parent 1419341e64
commit 0c635f7140
2 changed files with 13 additions and 4 deletions

View File

@ -108,10 +108,17 @@ type ActionConfig struct {
}
type ResponseConfig struct {
Code int `json:"code" yaml:"code"`
Template string `json:"template" yaml:"template"`
Type string `json:"type" yaml:"type"`
ShouldStream bool `json:"shouldStream" yaml:"shouldStream"`
Code int `json:"code" yaml:"code"`
Template string `json:"template" yaml:"template"`
Type string `json:"type" yaml:"type"`
ShouldStream bool `json:"shouldStream" yaml:"shouldStream"`
BuilderType string `json:"builderType" yaml:"builderType"`
Object ResponseObject `json:"responseObject" yaml:"responseObject"`
}
type ResponseObject struct {
Value string `json:"value" yaml:"value"`
Fields map[string]ResponseObject `json:"fields" yaml:"fields"`
}
type DatasourceConfig struct {

View File

@ -2,6 +2,8 @@ package apiconfig
import "git.servflow.io/servflow/definitions/proto"
// TODO add check for nil mcp
func ProtoConfigToAPIConfig(configs []*proto.WorkflowConfig) []*APIConfig {
cfgs := make([]*APIConfig, 0)
for i := range configs {