Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kubitre committed May 22, 2022
1 parent 604e91b commit e99c9af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
18 changes: 13 additions & 5 deletions response/api_error.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
package response

// swagger:model ApiError
type ApiError struct {
Code string `json:"code"`
Message string `json:"message,omitempty"`
Target string `json:"target,omitempty"`
// Code operation
// in: string
Code string `json:"code"`
// Error description
Message string `json:"message,omitempty"`
// API Target
Target string `json:"target,omitempty"`
// Anything data
Context interface{} `json:"context,omitempty"`
TraceId string `json:"traceId,omitempty"`
Errors []ApiError `json:"errors,omitempty"`
// TraceID
TraceId string `json:"traceId,omitempty"`
// Additional Errors
Errors []ApiError `json:"errors,omitempty"`
}

func (e ApiError) Error() string {
Expand Down
1 change: 1 addition & 0 deletions response/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type ApiResponse struct {
Target string // service name
}

// swagger:model EntityCreated
type EntityCreated struct {
ID string `json:"id"`
}
Expand Down

0 comments on commit e99c9af

Please sign in to comment.