How apideck-libraries/portman works
Main Components Overview
The system architecture should be divided into these primary components:
[OpenAPI Input] --> [Portman Core] --> [Postman Output]
• [Services]
• [Testing & Validation]
Detailed Component Breakdown
a) Input Processing Layer:
• OpenAPI Parser (src/oas/*)
• File/URL Input Handlers
• Configuration Readers (src/lib/getConfig.ts)
b) Core Processing Layer (src/application/):
• Test Suite Generator
• Collection Writer
• Variable Manager
• Request Modifier
• Fuzzing Engine
c) Service Layer (src/services/):
• OpenAPI to Postman Conversion Service
• Postman API Service
• Dynamic Variable Generator
• Repository Service
d) Output Processing Layer:
• Collection Writer
• Newman Runner
• Postman Sync Service
Key Interactions to Highlight
[Configuration]
• ↓
[Input Handler] → [OpenAPI Parser]
• ↓
[Core Processing] → [Test Generation]
• ↓
[Variable Management] → [Request Modification]
• ↓
[Collection Writer] → [Postman/Newman Output]
Specific elements
a) Input Sources:
• OpenAPI Specification (local/remote)
• Configuration Files
• Environment Variables
b) Processing Components:
• Contract Test Generator
• Variation Test Generator
• Fuzzing Engine
• Variable Assignment System
• Request Modifier
c) Output Destinations:
• Postman Collection
• Newman Test Runner
• Postman Cloud Sync
Flow Control
Main processing flow:
[Input] → [Parsing] → [Processing] → [Test Generation] → [Output]
• ↑ ↑ ↑ ↑ ↑
• [Configuration Management]──────┘ |
• ↑ |
• [External Services]←──────────────────┘
Integration Points
Integration with:
• Postman API
• Newman Test Runner
• CI/CD Systems
• Environment Variables
• File System