0
일부 매개 변수를 JSON 본문에서 선택적으로 사용하고자합니다. 나는 phpdocs을 만들어 null로 매개 변수를 설정 한 :Restler 3를 사용하여 신체에서 선택적 매개 변수를 만드는 방법은 무엇입니까?
/**
* Create a new text
*
* @param int $product_id product id
* @param int $template_id {@from body} template id
* @param string $language {@from body} the language of the text
* @param string $name {@from body} product name
*
* @url POST {product_id}/texts
*/
public function postText($product_id, $template_id, $market_id = null)
{ }
을하지만 Restler 나 제공 :
{
"error": {
"code": 400,
"message": "Bad Request: market_id is missing."
}
}
어떻게 지정합니까에게 매개 변수 옵션이 될 수 있습니까?