Skip to content

Commit

Permalink
fixes on rolloutController#create, dockerfile, and swagger
Browse files Browse the repository at this point in the history
- update golang version in dockerfile

- rollout#create returns empty id,

- swagger-response for delete should be empty
  • Loading branch information
DavudSafarli committed Jun 25, 2021
1 parent d066da2 commit 9e7f145
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.14-alpine as build
FROM golang:1.16.5-alpine as build
EXPOSE 8080

WORKDIR /src/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (ctrl ReleaseRolloutController) Create(w http.ResponseWriter, r *http.Reque
}

var resp CreateReleaseRolloutResponse
resp.Body.Rollout.ID = p.Rollout.ID
resp.Body.Rollout.FlagID = p.Rollout.FlagID
resp.Body.Rollout.EnvironmentID = p.Rollout.DeploymentEnvironmentID
resp.Body.Rollout.Plan = release.RolloutDefinitionView{Definition: p.Rollout.Plan}
Expand Down Expand Up @@ -308,12 +309,6 @@ type DeleteReleaseRolloutRequest struct {
// DeleteReleaseRolloutResponse
// swagger:response deleteReleaseRolloutResponse
type DeleteReleaseRolloutResponse struct {
// in: body
Body struct {
Rollout struct {
Plan interface{} `json:"plan"`
} `json:"rollout"`
}
}

/*
Expand Down
17 changes: 1 addition & 16 deletions external/interface/httpintf/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1044,22 +1044,7 @@
"description": "DeleteReleasePilotResponse"
},
"deleteReleaseRolloutResponse": {
"description": "DeleteReleaseRolloutResponse",
"schema": {
"type": "object",
"properties": {
"rollout": {
"type": "object",
"properties": {
"plan": {
"type": "object",
"x-go-name": "Plan"
}
},
"x-go-name": "Rollout"
}
}
}
"description": "DeleteReleaseRolloutResponse"
},
"errorResponse": {
"description": "ErrorResponse will contains a response about request that had some kind of problem.\nThe details will be included in the body.",
Expand Down

0 comments on commit 9e7f145

Please sign in to comment.