-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Stabilize model naming and import mappings to ensure deterministic, consistent client generation across builds and services.
Details
Currently, the project produces clean and type-safe client models.
However, when multiple OpenAPI specs or dynamic vendor extensions (x-api-wrapper, x-page, etc.) are involved, client generation can lead to non-deterministic output — causing unnecessary file diffs or class renames between regenerations.
This can happen when:
- Package paths or generator configs differ between services.
modelNameSuffixormodelNamePrefixare omitted.import-mappingsortype-mappingschange across builds.- Vendor extensions are generated dynamically at runtime (e.g. via Springdoc).
Proposed Direction
- Lock naming conventions via consistent
modelNameSuffixandmodelNamePrefix. - Define stable
import-mappingsandtype-mappingsfor shared types. - Keep vendor extension ordering deterministic.
- Optionally, add a CI check to detect unexpected model count changes.
Benefits
- Deterministic client generation across builds and services.
- Cleaner diffs and more reliable version control.
- Improved multi-service consistency in large-scale ecosystems.
Originated from community feedback on r/microservices.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request