0.8.1 Platform Modularization & Artifact Extraction#16
Merged
Conversation
…for 0.8.x evolution This commit introduces the initial architecture decision document for the OpenAPI Generics Platform evolution line (0.8.x). The document defines the long-term platform vision and boundaries: - contract-aware response envelope semantics across server publication and client generation - deterministic OpenAPI schema composition strategy - thin generated wrapper model (no DTO envelope duplication) - SAFE generator orchestration model (pre-generator lifecycle preparation) - clear scope limitation to supported shapes: ServiceResponse<T> and ServiceResponse<Page<T>> It also formalizes the future modular structure: - openapi-generics-client-parent - openapi-generics-java-engine - openapi-generics-client-starter - openapi-generics-server-starter This marks the transition from template-level experimentation towards a platform-oriented architecture direction. No functional runtime changes are introduced in this commit.
… wrapper injection
- add deterministic pipeline (discovery → introspection → schema generation → enrichment) - register base schemas (ServiceResponse, ServiceResponseVoid, Meta, Sort) - generate wrapper schemas via allOf composition - derive schema names from API contract (single source of truth) - add vendor extensions for wrapper and container semantics - introduce fail-fast contract validation OpenAPI is treated as a projection of the API contract.
…chitecture - replace multiple OpenApiCustomizers with single orchestrated pipeline - introduce OpenApiPipelineOrchestrator as single execution entry point - separate concerns into discovery, introspection, processing, and validation stages - remove implicit Spring ordering in favor of explicit deterministic flow - enforce fail-fast contract validation - align OpenAPI generation with contract-as-authority model
- separate wrapper creation vs extension application - make wrapper factory single source of truth - remove redundant extension calls in processor - fix Schema generics usage (avoid raw type warnings) - enforce required(meta) via setRequired - keep data optional (contract-aligned) - ensure deterministic wrapper generation - validate end-to-end with customer-service - add BOM and verify integration
…rmatting - updated architecture and internals docs - removed unused enforceWrapperExtensions method - applied Google Java Format
- docs: clarify api-contract as source of truth (OpenAPI = projection) - build: replace overwrite with changeDetection=always
- add openapi-generics-java-codegen parent - implement template extraction and patching - wire customer-service-client to new pipeline - add x-ignore-model vendor extension for generation control
…t model artifacts • Added GenericAwareJavaCodegen with x-ignore-model support (mark → filter → global prune) • Replaced BaseSchemaIgnoreMarker with SchemaGenerationControlMarker • Automatically ignores dynamic container schemas (e.g. PageCustomerDto) via x-data-container + x-data-item • Removed .openapi-generator-ignore and Spotless-based cleanup • Fixed invalid imports by resolving them at codegen level • Added warning auto-config when Springdoc is missing (prevents silent failure) • Introduced internal platform BOM for version alignment • Verified end-to-end integration (customer-service + client) Result: • No duplicate model generation • Deterministic output • OpenAPI = projection, Java contract = authority
…re (0.8.x) - rewrite server-side-adoption.md (minimal, zero-config, contract-first) - rewrite client-side-adoption.md (thin-wrapper, no duplication model) - simplify adoption hub (onboarding-first structure) - fix misleading guidance around response wrappers (payload vs envelope) - align terminology across server, client, and platform docs - update samples documentation to reflect canonical usage - remove outdated lifecycle-heavy explanations Result: - consistent mental model across all docs - clearer onboarding path (60s quick start → rules → mental model) - strict alignment with contract = authority, OpenAPI = projection
- introduce 2-minute Quick Start aligned with lifecycle flow - reposition sections for better architectural storytelling - refine messaging: contract-first, generics-aware boundaries - improve TOC structure and navigation anchors docs: minor fixes and renames across architecture documents
- move tagline into hero section - remove unnecessary divider - refine spacing and visual hierarchy
…les module separation)
…o blueprint-platform namespace - groupId: io.github.bsayli → io.github.blueprint-platform - refactor all packages to io.github.blueprintplatform.* - update modules, aggregator, and documentation
…chitecture - unify client/server adoption guides - clarify generation pipeline and boundaries - improve samples (customer-service, customer-service-client) - standardize terminology and remove ambiguity - update compatibility and badges no functional changes
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Summary
This PR introduces a system-level architectural redesign that transforms the project from a sample-driven reference implementation into a modular, publishable, contract-driven platform.
This is not a cosmetic refactor.
It establishes:
The previous approach relied on:
.openapi-generator-ignorecleanupThese patterns have been removed entirely and replaced with explicit, enforceable architecture.
🧱 Architectural Shift
Before
Contract was implicit (
api-contract)OpenAPI generation was distributed and non-deterministic
Wrapper schemas were injected via customizers scattered across modules
Client generation required:
Samples and core logic were tightly coupled
After
openapi-generics-contract📦 Platform Modules
The system is now structured as:
openapi-generics-contract— canonical response model (authority)openapi-generics-platform-bom— dependency alignmentopenapi-generics-server-starter— OpenAPI projection (Spring Boot integration)openapi-generics-java-codegen— contract-aware generatoropenapi-generics-java-codegen-parent— build-time orchestrationThis establishes clear ownership boundaries:
⚙️ Server-Side Redesign (Projection)
OpenAPI generation is now executed via a single orchestrated pipeline:
Key changes:
Introduced
OpenApiPipelineOrchestratorEliminated multiple
OpenApiCustomizerchains and ordering issuesSeparated concerns into explicit components:
ResponseTypeDiscoveryStrategy)ResponseTypeIntrospector)WrapperSchemaProcessor)OpenApiContractGuard)Guarantees
🧩 Contract Formalization
The response model is now owned by a dedicated artifact:
Key elements:
ServiceResponse<T>Page<T>Meta,SortVendor Extensions (now first-class DSL)
Contract semantics are expressed via a flat, deterministic extension model:
x-api-wrapperx-api-wrapper-datatypex-data-containerx-data-itemx-ignore-modelCritical Change
x-ignore-modelreplaces all generator-ignore hacks:This removes the need for:
.openapi-generator-ignore🔧 Client Generation Redesign
Client generation is now contract-aware, not template-hacked.
Before
After
x-ignore-modelGenerator Behavior
Custom generator:
java-generics-contractResult:
🏗️ Build & Tooling Simplification
Introduced
openapi-generics-java-codegen-parentRemoved
.openapi-generator-ignorePage*.java, etc.)Build is now:
🧪 Samples Extraction
Moved to:
Examples:
customer-servicecustomer-service-clientRole change:
🧠 Outcome / Impact
What this enables
Observable Changes
Root build no longer includes samples
Consumers depend on:
openapi-generics-server-starteropenapi-generics-java-codegen-parentGenerated clients are thin wrappers over
ServiceResponse<T>🔐 Contract Impact
Impact: yes (formalization, not semantic change)
openapi-generics-contractNo changes to:
🌍 Multi‑Language Considerations
java-generics-contractImplications:
❌ Removed Patterns (Intentional)
.openapi-generator-ignorebased cleanupThese were replaced with explicit architecture and ownership.
✅ Checklist
🧾 Metadata
Type:
refactorRelated Issue: closes #7 (deferred)
Target Release:
v0.8.1💡 Notes for Reviewers
Focus on:
contracts are defined at generation time — not corrected downstream