$ref to Common OpenAPI Subset Files
还没有人认领这个 Issue。
评估
调研方向
首先检查 OpenAPIContract::from 和现有的 additionalContractFiles 处理逻辑。跟踪引用文件的验证方式,然后确定如何在不削弱完整 contract 验证的情况下接受常见的 OpenAPI 子集文件。完成的标准是:可以成功引用 headers 或 parameters 等可复用文件,同时现有的 contract 验证保持不变。
由索引模型根据 Issue 内容生成。
描述
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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-vertx/vertx-openapi 的其他 Issue
-
bug
难度 3/5 1-2 天 新手友好度 55/100
eclipse-vertx/vertx-openapi#137 · 5 条评论 ·
-
enhancement help wanted
难度 4/5 3-5 天 新手友好度 45/100
eclipse-vertx/vertx-openapi#136 · 1 条评论 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 38/100
eclipse-vertx/vertx-openapi#122 · 4 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 48/100
eclipse-vertx/vertx-openapi#117 · 6 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
eclipse-vertx/vertx-openapi#93 · 1 条评论 ·
查看 eclipse-vertx/vertx-openapi 的全部 Issue
相似的 Issue
-
Bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
protobuf
难度 2/5 1-3 小时 新手友好度 84/100
FasterXML/jackson-dataformats-binary#874 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 62/100
HexaHexes/infinite-dungeon-spawn-safety#17 ·
维护者通常 1 天内回复