[REQ/PROPOSAL/OFFER TO IMPLEMENT] - Native OpenAPI Overlay Support
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- java, openapi
- Bereich
- api, build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 26.9k
- Forks
- 7.8k
- Ø Merge
- 2 T. 23 Min.
- Gemergte PRs (30 T.)
- 177
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenAPITools/openapi-generator
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
OpenAPITools/openapi-generator#25768 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Enhancement: Feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
OpenAPITools/openapi-generator#25753 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG][RUBY-NEXTGEN] A non-String value in a pattern-constrained attribute raises NoMethodErrorEvtl. vergeben @Inf1mum hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
OpenAPITools/openapi-generator#25724 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG][RUBY-NEXTGEN] Response#to_hash is advertised and raises when the data is an ArrayEvtl. vergeben @Inf1mum hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
OpenAPITools/openapi-generator#25723 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG][RUBY-NEXTGEN] A JSON string response raises ApiError because the body is parsed twiceEvtl. vergeben @Inf1mum hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
OpenAPITools/openapi-generator#25719 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in OpenAPITools/openapi-generator
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
eclipse-tradista/tradista#371 ·
Maintainer antworten meist innerhalb von 1 Tag
-
critical
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mars-sim/mars-sim#2199 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG-02] Endpoints /assistente/relatorio/*/preview retornam 404 ("Ver na tela" dos relatórios)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
projeto-ong-amar/projeto-ong-amar-backend#26 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
primefaces/primefaces#15568 ·
Maintainer antworten meist innerhalb von 1 Tag
-
崩溃日志只按 CRLF 分行Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
PCL-Community/PCL-CE#3872 ·
Maintainer antworten meist innerhalb von 1 Tag