You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Quarkus v3.4.1+OpenApi v3.0.3如何用$ref复用查询参数模型?

问题:在Quarkus v3.4.1中通过$ref复用OpenAPI查询参数模型

环境

  • Quarkus v3.4.1
  • OpenApi v3.0.3

需求

希望通过$ref复用一个查询参数模型。

当前实现

"paths" : {
  "/s3/upload" : {
    "get" : {
      "parameters" : [ {
        "name" : "ids",
        "in" : "query",
        "schema" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      } ],
      "responses" : ...
      }
    },

期望实现

"paths" : {
  "/s3/upload" : {
    "get" : {
      "$ref" : "#/components/schemas/ParameterListValueObject",
      "responses" : ...
      }
    },

遇到的问题

尝试了多种注解写法,但都无法达到预期效果。

内容的提问来源于stack exchange,提问作者Krizsán Balazs

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 08:39:51