Blayer - API Code Generator
Generate API client code from Postman collections and OpenAPI specifications directly in Visual Studio Code.
Features
📋 Code Generator: Automatically generate TypeScript API client code from your Postman collections
- Generate domain-driven architecture files (types, states, service, store, hooks)
- Support for GET, POST, PUT, PATCH, DELETE methods
- Smart payload and state management
🧪 API Test Runner: Interactive HTTP request testing with response preview
- Test your APIs directly from VS Code
- Save and manage request collections
- Support for dynamic variables and authentication tokens
⚡ Smart Code Architecture: Generates code following Vue 3 + Pinia best practices
- Domain-driven state management
- Composable hooks pattern
- Full TypeScript support
Getting Started
Installation
- Install the extension from VS Code Marketplace
- Open the Blayer panel from the Activity Bar (or use command palette)
Using the Generator
Import Postman Collection
- Paste your Postman collection JSON or OpenAPI spec
- Select the HTTP method and resource
Configure Output
- Choose which files to generate (types, states, service, store, hooks)
- Customize naming conventions
Generate & Save
- Preview generated code
- Save files directly to your project
Using the Test Runner
Create Test Request
- Enter API endpoint and HTTP method
- Configure headers, parameters, and body
Execute & Debug
- Send request and view response
- Inspect status codes and response body
- Test APIs before integration
Extension Settings
This extension contributes the following settings:
blayer.testBaseUrl: Default base URL for API test requests
Requirements
- Visual Studio Code ^1.117.0
- No external dependencies required
Known Limitations
- Generator currently supports TypeScript/Vue 3 projects
- Postman collections must be valid JSON format
Contributing
Found a bug or want to contribute? Visit the GitHub repository
License
MIT License - See LICENSE file for details
Changelog
See CHANGELOG.md for release notes.
Enjoy coding with Blayer! 🚀
| |