added response object

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

View File

@ -112,6 +112,12 @@ type ResponseConfig struct {
Template string `json:"template" yaml:"template"` Template string `json:"template" yaml:"template"`
Type string `json:"type" yaml:"type"` Type string `json:"type" yaml:"type"`
ShouldStream bool `json:"shouldStream" yaml:"shouldStream"` ShouldStream bool `json:"shouldStream" yaml:"shouldStream"`
Object ResponseObject `json:"responseObject" yaml:"responseObject"`
}
type ResponseObject struct {
Value string `json:"value" yaml:"value"`
Fields []ResponseObject `json:"fields" yaml:"fields"`
} }
type DatasourceConfig struct { type DatasourceConfig struct {

View File

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