doushi9856 2019-03-25 20:09
浏览 2603
已采纳

Swagger注释和OpenAPI v3.0中“Produces”的注释是什么?

On OpenAPI v2.0 and Swagger PHP the annotation for Produces was:

 /**
 * @SWG\Get(
 *      path="/posts",
 *      operationId="getPosts",
 *      tags={"Authentication"},
 *      produces="application/json"
 *      summary="Returns the posts",
 *      description="Returns the posts",
 *      @SWG\Response(
 *          response=200,
 *          description="Successful operation"
 *      ),
 * )
 */

But On OpenAPI v3.0 and Swagger PHP I cannot find on how to annotate the produces on the documentation it states the it is now an attribute of the response @OA\Response but I can not find an example I already try just putting "content" = "application/json" but it doesn't work.

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 有ASP .NET MVC做的小说阅读网站吗?
      • ¥20 beeline客户端支持ipv6地址连接hive服务
      • ¥15 香农解码的代码问题,无法输出解码结果
      • ¥15 Python操作注册表
      • ¥45 入门级别的一段VUE前端拍照像后端发送请求的代码,帮排错
      • ¥15 anaconda打开spyder后一直闪退,不知道怎么办
      • ¥15 解决迷宫问题中无法运行的问题
      • ¥15 关于aspnetcore中使用mqttnet库的entire
      • ¥15 关于#python#的问题,请各位专家解答!
      • ¥100 关于远控软件的两个问题