[REQ/PROPOSAL/OFFER TO IMPLEMENT] - Native OpenAPI Overlay Support
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 22/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java, openapi
- 领域
- api, build-system
调研方向
The payload names no source files. Start by reading how the generator loads and parses the input spec before code generation, since overlays must be applied at that point, and how the CLI, Gradle and Maven plugins pass the spec in. The author wants maintainers to agree on the integration approach (for example the overlay-jvm dependency) before any code is written, so check for a reply first. Done means one or more overlay files are applied before parsing, with tests across the CLI and build plugins.
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
Customizing OpenAPI specifications for code generation currently requires modifying the original spec, using generator-specific configuration options, or introducing external preprocessing steps.
This is particularly relevant when dealing with imperfect or non-compliant OpenAPI specifications that cannot be modified at their source.
Additionally, some generators already provide complex configuration options to inject vendor extensions without modifying the original specification. A standardized overlay mechanism could reduce the need to implement and maintain such generator-specific workarounds.
Describe the solution you'd like
Support the OpenAPI Overlay Specification natively, allowing one or more overlay files to be passed alongside the original specification.
Overlays should be applied before parsing and code generation, with support across CLI, Gradle, and Maven integrations.
This would enable users to:
- Inject vendor extensions: Add
x-implements,x-class-extra-annotation, orx-spring-paginatedwithout modifying the source specification. - Customize schemas: Add missing properties, change property types, rename properties, or adjust
requiredconstraints. - Work around problematic specifications: Fix incorrect schema definitions, missing metadata, or other issues in externally maintained OpenAPI documents.
- Customize operations: Add annotations, modify parameters, or exclude certain endpoints from generation.
- Apply cross-cutting customizations: Use JSONPath expressions to apply common metadata or modifications across multiple schemas or operations.
It could also reduce the maintenance burden on OpenAPI Generator by providing a standardized alternative to generator-specific configuration options such as schemaImplements or typeInfoDefaultImpls, where equivalent vendor extensions already exist.
Describe alternatives you've considered
External preprocessing using tools such as Redocly CLI or custom build tasks.
Additional context
overlay-jvm could be a suitable implementation dependency because it:
- Is written in Java and can integrate directly into the existing generator pipeline.
- Provides a simple API for applying overlays to OpenAPI documents.
- Supports JSON/YAML and standards-based JSONPath expressions.
- Implements OpenAPI Overlay Specification 1.1.0.
- Avoids introducing external tools or runtimes into the generation workflow.
Its focused scope could make integration relatively straightforward, although compatibility with newer Overlay Specification versions would need consideration.
I'd be willing to work on implementing this feature and submit a PR, provided the maintainers are open to the approach. Feedback on the proposed integration and preferred architecture would be appreciated before proceeding.
But of course sticking to custom pre-processing step also works. It just seems like such a natural fit, hence the proposal.
- 主要语言
- Java
- 星标
- 26.9k
- 派生
- 7.8k
- 平均合并
- 2 天 23 分钟
- 30 天内合并 PR
- 177
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenAPITools/openapi-generator 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
OpenAPITools/openapi-generator#25768 ·
维护者通常 1 天内回复
-
Enhancement: Feature
难度 2/5 1-3 小时 新手友好度 70/100
OpenAPITools/openapi-generator#25753 ·
维护者通常 1 天内回复
-
[BUG][RUBY-NEXTGEN] A non-String value in a pattern-constrained attribute raises NoMethodError可能已有人在做 @Inf1mum 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
OpenAPITools/openapi-generator#25724 · 1 条评论 ·
维护者通常 1 天内回复
-
[BUG][RUBY-NEXTGEN] Response#to_hash is advertised and raises when the data is an Array可能已有人在做 @Inf1mum 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
OpenAPITools/openapi-generator#25723 · 1 条评论 ·
维护者通常 1 天内回复
-
[BUG][RUBY-NEXTGEN] A JSON string response raises ApiError because the body is parsed twice可能已有人在做 @Inf1mum 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
OpenAPITools/openapi-generator#25719 · 1 条评论 ·
维护者通常 1 天内回复
查看 OpenAPITools/openapi-generator 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
eclipse-tradista/tradista#371 ·
维护者通常 1 天内回复
-
critical
难度 2/5 1-3 小时 新手友好度 68/100
mars-sim/mars-sim#2199 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
projeto-ong-amar/projeto-ong-amar-backend#26 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
primefaces/primefaces#15568 ·
维护者通常 1 天内回复
-
崩溃日志只按 CRLF 分行未关闭
难度 2/5 1-3 小时 新手友好度 72/100
PCL-Community/PCL-CE#3872 ·
维护者通常 1 天内回复