Swagger SDK 生成的方法用法理解

问题描述

Swagger SDK 生成 PHP 方法,如以下代码所示:

public function oauth2TokenPostWithHttpInfo($grant_type,$username,$email,$password,$refresh_token,$client_id,$client_secret,$facebook_token,$google_token,$apple_token,$scope,$user_groups) {
// Generated code there
}

如果我只需要传递 $username,$password,$client_id,$className->oauth2TokenPostWithHttpInfo('username','password','client_id') 有没有办法只传递这些参数而不列出所有必需的参数?我无法删除 Swagger Editor 中的所有其他参数,因为在某些情况下也可能需要它。知道如何简化参数传递吗?这里有任何最佳实践或约定吗?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)