Skip to content

Commit

Permalink
support omit in request struct
Browse files Browse the repository at this point in the history
  • Loading branch information
penglin2 committed Aug 14, 2024
1 parent 1c8574b commit cf7591b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const (
)

type Request struct {
Header RequestHeader `json:"header"`
Header RequestHeader `json:"header,omitempty"`
Parameter map[string]interface{} `json:"parameter,omitempty"`
Payload map[string]interface{} `json:"payload"`
Payload map[string]interface{} `json:"payload,omitempty"`
}

type TextPayload struct {
Expand Down Expand Up @@ -126,7 +126,7 @@ type Header struct {
}

type AIaaSRequest struct {
Common map[string]interface{} `json:"common"`
Business map[string]interface{} `json:"business"`
Data map[string]interface{} `json:"data"`
Common map[string]interface{} `json:"common,omitempty"`
Business map[string]interface{} `json:"business,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
}

0 comments on commit cf7591b

Please sign in to comment.