-
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
[feature request] Post Request Body Validation rules #443
Comments
This is the work we mostly rely on swagger. @zhuangqh used to keep an eye on the development of swagger on this validation part. Could you sync something with us? This is a really huge part for PouchContainer to polish the api layer. |
I see. I'll track this matter continually. @allencloud |
The newest version of go-swagger has a lots fixes about validation. However, this version changed the behaviour to expand code. In short, the newly generated code is incompatible with the old one(v0.12). They are working to fix this problem and will release a new version after fix it. @allencloud |
Issue Description
For a HTTP request, if the method is POST, they may be a request body in it. Then pouch daemon side needs to validate these parameter. This issue is to track all the validation rules for this request body. In the issue, I only tracked fields which are in type of
string
,[]string
,map[string]interface{}
.We should make this validation rules clear, and add these restrictions in swagger.yml. After that, we generate struct codes and user generated validation funcs in APIxxx_bridge.go.
@rudyfly Please check the VolumeCreateConfig and NetworkCreateConfig;
@YaoZengzeng Please check whether CRI implementation side needs more restrictions;
@CodeJuan Please master this part, as in the future you will maintain all the API side of Pouch.
@sunyuan3 @Letty5411 Please get these validation aware and we will use these rules to test Pouch Daemon in the following steps.
Also /cc @skoo87 @yyb196 @Ace-Tang @zzchun @zeppp @ZouRui89
ContainerConfigWrapper
ContainerConfigWrapper.ContainerConfig
ContainerConfigWrapper.HostConfig
ContainerConfigWrapper.NetworkingConfig.EndpointSettings
ExecCreateConfig
This config has been covered in #453.
VolumeCreateConfig
This config has been covered in #452.
NetworkCreateConfig
NetworkCreateConfig.IPAM
NetworkCreateConfig.IPAM.IPAMConfig
The text was updated successfully, but these errors were encountered: