How xantilon/lorenzperson works
Key Components to Include:
Client Layer
• Different client types (Swagger UI, REST clients)
• Version-specific endpoints (v1 and v2)
API Layer
• Controllers (v1 and v2 PersonController)
• API Versioning middleware
• Swagger/OpenAPI configuration
Service Layer
• Mapping Services (v1 and v2 PersonMappingService)
• DTOs structure for both versions
Data Layer
• In-memory database (LorenzContext)
• Entity models (Person)
Component Details
Client Layer:
• [Swagger UI] [REST Clients]
• ↓ ↓
API Layer:
• [API Versioning Middleware]
• ↙ ↘
• [v1 Endpoints] [v2 Endpoints]
Service Layer:
• [v1 DTOs ←→ v1 Mapping Service] [v2 DTOs ←→ v2 Mapping Service]
• ↓ ↓
Data Layer:
• [Person Entity Model]
• ↓
• [In-Memory Database]
Important Elements to Highlight
a. Version Handling:
• How v1 and v2 endpoints coexist
• Data filtering for v1 (excluding diverse gender)
• Demonstrate expanded data model access in v2
b. Data Flow:
• Bidirectional flows where applicable
c. Cross-Cutting Concerns:
• Swagger configuration
• Versioning middleware position
• Where DTOs transformation occurs
Risk points in data handling between versions
Keep the abstraction level focused on the architectural components while including enough detail to show the version-specific handling and data flow. This will help developers understand both the overall structure and the version-specific considerations of the system.
Remember to include a note about potential improvements, such as adding version tracking to entities as mentioned in the README's "mögliche Verbesserung" section.