How heydarideveloper/swagger-typescript works
• How the Swagger JSON flows through the system
• Configuration input paths
• Output file generation paths
• Related components
• Optional feature relationships
Detailed Component Breakdown
Core Generator (Central component):
• src/
• generateApis.ts
• generateConstants.ts
• generateTypes.ts
• generator.ts
Mock System (Optional component):
• src/mock/
• compose.ts
• dataType.ts
• parse.ts
• response.ts
SignalR Support (Optional component):
• src/signalR/
• generator.ts
Specific elements
a. Configuration Flow:
• How swagger.config.json influences the generation process
• Where prettier configuration is applied
• How language selection (TypeScript/JavaScript) affects output
b. Processing Pipeline:
• Swagger/OpenAPI parsing
• Type generation
• API method generation
• Mock data generation (if enabled)
• Code formatting
c. Output Structure:
• Generated API methods
• Type definitions
• Configuration files
• Mock data files
Notes for Implementation
• Keep the main generation pipeline central
• Related components (e.g., mock generation system)
• Optional features
• Configuration points
• Error handling paths
Remember to maintain a balance between showing the high-level architecture and including important implementation details that affect the system's behavior, such as the methodName configuration and prefix handling.