added response object
This commit is contained in:
parent
1419341e64
commit
4631eee074
|
@ -108,10 +108,16 @@ type ActionConfig struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResponseConfig struct {
|
type ResponseConfig struct {
|
||||||
Code int `json:"code" yaml:"code"`
|
Code int `json:"code" yaml:"code"`
|
||||||
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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue