Add support for OpenAPI spec 3.2
维护者通常 9 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- java, openapi, spring-boot
调研方向
Start by reading how springdoc generates api-docs and handles OpenAPI specification versions, then compare its current 3.1 support with the requested 3.2 behavior. Done means springdoc can generate api-docs using version 3.2.x and represent the XML element with attributes and text content as described.
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
My problem is that I want to describe an XML schema and generate examples that have an element with attributes and a text-type child element:
<request>
<signature version="2.0">123abc</signature>
</request>
The result when translating the DAO with JAXB
@Schema
@XmlRootElement(name = "request")
public class Request {
@XmlElement(name = "signature")
public Signature signature;
public class Signature {
@Schema(example = "2.0")
@XmlElement(name = "version")
public String version;
@Schema(example = "123abc")
@XmlValue
public String value;
}
but rendering it with springdoc 2.8.17 and OpenAPI 3.1 gives me the api-docs:
<request>
<signature version="2.0">
<value>123abc</value>
</signature>
</request>
Describe the solution you'd like
The lack of support for this stems from OpenAPI not supporting this as of spec 3.1. There was an issue filed for OpenAPI-Specification https://github.com/OAI/OpenAPI-Specification/issues/630. It was implemented in https://github.com/OAI/OpenAPI-Specification/pull/4592 and released in https://github.com/OAI/OpenAPI-Specification/releases/tag/3.2.0.
So I'd like springdoc to add support for api-docs version 3.2.x.
Describe alternatives you've considered
My alternative for now is to hard-code the example into my api-docs and accept the wrong looking schema until newer OpenAPI spec versions.
- 主要语言
- Java
- 星标
- 3.7k
- 派生
- 605
- 平均合并
- 9 天 11 小时
- 30 天内合并 PR
- 14
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
springdoc/springdoc-openapi 的其他 Issue
-
enhancement upstream
难度 3/5 1-2 天 新手友好度 55/100
springdoc/springdoc-openapi#3309 · 4 条评论 · 1 个 reaction ·
维护者通常 9 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
springdoc/springdoc-openapi#3404 · 1 条评论 ·
维护者通常 9 天内回复
查看 springdoc/springdoc-openapi 的全部 Issue
相似的 Issue
-
vaadin-map
难度 2/5 1-3 小时 新手友好度 70/100
vaadin/flow-components#10586 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
wpilibsuite/SystemcoreTesting#446 ·
维护者通常 1 天内回复
-
frontend quality-assurance
难度 2/5 1-3 小时 新手友好度 64/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#212 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
eip-work/kuboard-press#700 ·
-
Mend: dependency security vulnerability
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复