Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

$ref to Common OpenAPI Subset Files

未关闭
#91 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, openapi
领域
api

调研方向

首先检查 OpenAPIContract::from 和现有的 additionalContractFiles 处理逻辑。跟踪引用文件的验证方式,然后确定如何在不削弱完整 contract 验证的情况下接受常见的 OpenAPI 子集文件。完成的标准是:可以成功引用 headers 或 parameters 等可复用文件,同时现有的 contract 验证保持不变。

由索引模型根据 Issue 内容生成。

描述

enhancement
Read me

Read this first before creating an issue:

  • do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.
  • you shall create a feature request only when it is general purpose enough.
  • make sure that the feature is not already
Describe the feature

In the previous vertx openapi/json schema solution it was possible to make a $ref to a file that contained a common piece of OpenAPI information that is reused by multiple OpenAPI files. For example, a TotalCount header or a limit query parameter could be defined in a common file. The one big detail about these files is that they are not valid according to the json schema spec because they might look something like this:

name: limit
in: query
required: false
description: The limit for the returned page
schema:
  type: integer
  format: int32
  minimum: 0
Use cases

When I was updating to the newish openapi/json schema solution in Vertx I passed these common openapi files into the additionalContractFiles argument for OpenAPIContract::from. Of course these files failed the validation for obvious reasons, but I bring it up because it's a loss in functionality between the old and new solution.

Maybe this is as simple as adding another additionalContractFiles argument that is for referenced files that follow the OpenAPI spec. Haven't looked into it that far, but it would be a nice to have feature for sure.

Contribution

Who should implement this feature ? are you volunteering for implementing this feature or
do you know that is able and willing implement this feature ?

主要语言
Java
星标
15
派生
19
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-vertx/vertx-openapi 的其他 Issue

查看 eclipse-vertx/vertx-openapi 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。