-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: rm omitempty in resource fields #1505
bugfix: rm omitempty in resource fields #1505
Conversation
5fc2632
to
8f254e7
Compare
It will be better to find a way to generate no |
And please make CI passed, @allencloud . |
@@ -270,10 +270,6 @@ func (s *Server) updateContainer(ctx context.Context, rw http.ResponseWriter, re | |||
if err := json.NewDecoder(req.Body).Decode(config); err != nil { | |||
return httputils.NewHTTPError(err, http.StatusBadRequest) | |||
} | |||
// validate request body | |||
if err := config.Validate(strfmt.NewFormats()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the request body validation in update, then I think it will pass the CI. @Ace-Tang @HusterWan
Codecov Report
@@ Coverage Diff @@
## master #1505 +/- ##
==========================================
- Coverage 41.59% 41.58% -0.02%
==========================================
Files 267 267
Lines 17366 17364 -2
==========================================
- Hits 7223 7220 -3
- Misses 9251 9253 +2
+ Partials 892 891 -1
|
@allencloud @Ace-Tang You can see: go-swagger/go-swagger#1189, we use swagger version is 0.12.0, and I cherry-pick this pr to 0.12.0 version, and it use |
ping @allencloud |
Hi @allencloud , Please resolve conflicts, and lgtm |
Signed-off-by: Allen Sun <allensun.shl@alibaba-inc.com>
57c1da6
to
2b8a144
Compare
Signed-off-by: Allen Sun <allensun.shl@alibaba-inc.com>
2b8a144
to
f3e9cc3
Compare
Signed-off-by: Allen Sun allensun.shl@alibaba-inc.com
Ⅰ. Describe what this PR did
In #1491, @Ace-Tang mentioned that we should not omit zero-value fields in api data transfer.
This pull request removes
omitempty
for fields inResources
.But this seems not supported in swagger
Ⅱ. Does this pull request fix one issue?
fix #1491
Ⅲ. Describe how you did it
Add required parameters in swagger.
Ⅳ. Describe how to verify it
none
Ⅴ. Special notes for reviews