yes, the same question For some of the APIs, in addition to 'BadRequest', 'Forbidden' is also required.
Thanks & Best Wishes, Tom Xing(邢舟) Emerging Technology Institute, IBM China Software Development Lab ---------------------- IBM China Software Development Laboratory (CSDL) Notes ID:Zhou Z Xing/China/IBM Phone :86-10-82450442 e-Mail :[email protected] Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang West Road, Haidian District, Beijing, P.R.China 100193 地址 :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193 From: haosdent <[email protected]> To: dev <[email protected]> Cc: Vinod Kone <[email protected]>, Abhishek Dasgupta <[email protected]>, Jay JN Guo/China/IBM@IBMCN, Zhou Z Xing/China/IBM@IBMCN, Qian AZ Zhang/China/IBM@IBMCN, Yong Feng <[email protected]>, Anand Mazumdar <[email protected]>, Shuai Lin <[email protected]> Date: 2016-06-07 上午 08:43 Subject: [HTTP API] Questions about v1 Operator API return value type Currently, almost our v1 Operator API return value type is v1::master::Response. Now we validation `Call` by `validation::master::call::validate(call, principal)` and return `BadRequest` if it could not pass. In some cases, we need to validate the `Call` with other parameters. For example, ``` Option<Error> validate = validation::operation::validate( operation.create(), slave->checkpointedResources, principal); ``` 1. Could we delegate this validation into the implementation of API? If delegate the validation to API, the return type would be `process::http::Response` because of `BadRequest` could not convert to `v1::master::Response`. 2. And for keep consistent, should we change existing RPC handlers' return type to `v1::master::Response` as well? -- Best Regards, Haosdent Huang
