Overview
The Connector Generator follows a multi-stage pipeline to transform API documentation into working connector code. Each stage builds upon the results of the previous stages, with all state tracked in a session.Stage 1: Session Creation
Every workflow begins by creating a session to track all processing state.Store the
sessionId - you’ll use it in all subsequent API calls throughout the workflow.Stage 2: Documentation Acquisition
You have two options for providing API documentation to the system:- Option A: Upload Documentation
- Option B: Discovery + Scraping
Upload OpenAPI/Swagger files directly:When to use:
- You have existing OpenAPI/Swagger specifications
- Documentation is available as downloadable files
- You want the fastest processing time
Stage 3: Schema Extraction (Digester)
Once documentation is loaded, extract structured schema information:Extract Object Classes
Identify and extract all object types (resources) from the documentation:Object Classes
Object Classes
Business entities like User, Account, Order with their properties and types
Attributes
Attributes
Field definitions including data types, required/optional status, and constraints
Relationships
Relationships
Connections between objects (foreign keys, references, hierarchies)
Operations
Operations
Available CRUD operations and custom endpoints for each object
Monitor Extraction Progress
The digester processes documentation through multiple sub-stages:Retrieve Extracted Schema
Access the extracted schema from session data:Stage 4: Code Generation
Generate connector code from the extracted schema:Code Generation Options
List of object class names to include. If not specified, generates code for all extracted objects.
Custom name for the generated connector. Defaults to applicationName.
Whether to generate test files alongside the connector code.
Monitor Generation Progress
Stage 5: Retrieve Generated Code
Download the complete connector code:Complete Workflow Example
Here’s a complete example workflow using cURL:Job Dependencies
Understanding job dependencies is crucial for workflow orchestration:Workflow Optimization
Result Caching
The system automatically caches job results to avoid redundant processing:- Documentation processing: Reuses processed chunks from previous uploads of the same content
- Schema extraction: Reuses identified object classes if documentation hasn’t changed
- Code generation: Reuses generated code structures for unchanged schemas
Parallel Processing
Some stages support parallel execution:- Multiple documentation files can be uploaded simultaneously
- Schema extraction for different object classes runs in parallel
- Code generation for multiple object classes is parallelized
Error Recovery
If a job fails:- Check error details from the job status endpoint
- Review session state to identify which stage failed
- Fix the issue (e.g., provide better instructions, adjust parameters)
- Retry from the failed stage - no need to restart the entire workflow
Best Practices
Monitor Job Progress
Monitor Job Progress
Poll job status endpoints every 5-10 seconds during processing. Jobs may take several minutes depending on documentation size and complexity.
Provide Clear Instructions
Provide Clear Instructions
When using the digester, provide clear
instructionsForSorter and instructionsForFilter to guide the extraction process. Specific instructions yield better results.Validate Intermediate Results
Validate Intermediate Results
Check the extracted schema before proceeding to code generation. Review
objectClasses in the session data to ensure all expected objects were found.Use Appropriate maxIterations
Use Appropriate maxIterations
For scraping, start with conservative
maxIterations (10-20). Increase only if coverage is insufficient. Higher values increase processing time and costs.Clean Up Sessions
Clean Up Sessions
Delete sessions after downloading generated code to free storage. Sessions can accumulate significant data.
Related Concepts
Sessions
Understand session management and data structure
Job Status
Learn about job lifecycle and progress tracking