Skip to content

Commit 9f0f407

Browse files
author
Mike Zorn
authored
fix: Add empty segments to streaming response (#473)
Add empty segments to streaming response This is needed for python SDK support
1 parent 7d35b8f commit 9f0f407

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/dev_server/sdk/server_flags.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ type ServerFlag struct {
3636
type ServerFlags map[string]ServerFlag
3737

3838
type data struct {
39-
Flags ServerFlags `json:"flags"`
39+
Flags ServerFlags `json:"flags"`
40+
Segments struct{} `json:"segments"` // We need to send an empty object over the wire for compatibility with some SDKs
4041
}
4142
type ServerAllPayload struct {
4243
Path string `json:"path"`
@@ -46,7 +47,7 @@ type ServerAllPayload struct {
4647
func ServerAllPayloadFromFlagsState(state model.FlagsState) ServerAllPayload {
4748
return ServerAllPayload{
4849
Path: "",
49-
Data: data{ServerFlagsFromFlagsState(state)},
50+
Data: data{Flags: ServerFlagsFromFlagsState(state)},
5051
}
5152
}
5253

0 commit comments

Comments
 (0)