1

我正在使用代码接收并运行多组示例数据。我正在发送多个接受标头,其中之一是"*/*".

所以示例代码是:

   /**
     * My description of the test
     *
     * GET a/path/i/am/testing
     *
     * @example ["*/*", 200]
     * @example ["application/json", 200]
     * @example ["text/html", 200]
     *
     */

我尝试过双引号内的单引号,我尝试过单引号内的双引号,我尝试过连接每个片段,我尝试过反斜杠,我尝试过 Unicode。PHP 认为 splat 正在与 docblock 对话。我错过了什么?提前致谢!

4

1 回答 1

0

尝试 {@*} 而不是 */

 * @example ["{@*}*", 200]
should be interpreted as
* @example ["*/*", 200]
于 2020-01-10T21:36:56.907 回答