Skip to content

Commit

Permalink
fix: Add empty segments to streaming response (#473)
Browse files Browse the repository at this point in the history
Add empty segments to streaming response

This is needed for python SDK support
  • Loading branch information
mike-zorn authored Jan 29, 2025
1 parent 7d35b8f commit 9f0f407
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/dev_server/sdk/server_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ type ServerFlag struct {
type ServerFlags map[string]ServerFlag

type data struct {
Flags ServerFlags `json:"flags"`
Flags ServerFlags `json:"flags"`
Segments struct{} `json:"segments"` // We need to send an empty object over the wire for compatibility with some SDKs
}
type ServerAllPayload struct {
Path string `json:"path"`
Expand All @@ -46,7 +47,7 @@ type ServerAllPayload struct {
func ServerAllPayloadFromFlagsState(state model.FlagsState) ServerAllPayload {
return ServerAllPayload{
Path: "",
Data: data{ServerFlagsFromFlagsState(state)},
Data: data{Flags: ServerFlagsFromFlagsState(state)},
}
}

Expand Down

0 comments on commit 9f0f407

Please sign in to comment.