VS Code Extension for flAPI
The flAPI VS Code extension provides an integrated development experience with syntax highlighting, validation, and testingβall without leaving your editor.
Featuresβ
π¨ Syntax Highlightingβ
- YAML configuration files
- SQL templates with Mustache syntax
- Inline validation errors
β Real-Time Validationβ
- Endpoint configuration errors highlighted
- SQL syntax checking
- Connection verification
- Parameter validation
π Quick Actionsβ
- Validate endpoint (right-click)
- Expand template with test params
- Run query and preview results
- Generate OpenAPI docs
π IntelliSenseβ
- Auto-complete for configuration fields
- Parameter suggestions
- Connection name completion
- Mustache template helpers
Installationβ
Coming Soon
The VS Code extension is currently in development. Star our GitHub repository to get notified when it's released.
Manual Installation (Beta)β
# Clone the extension repository
git clone https://github.com/datazoode/flapi-vscode
cd flapi-vscode
# Install dependencies
npm install
# Build and package
npm run package
# Install in VS Code
code --install-extension flapi-*.vsix
Usageβ
Validate Endpointβ
- Open an endpoint YAML file (e.g.,
sqls/customers.yaml
) - Right-click in the editor
- Select "flAPI: Validate Endpoint"
- See validation results in the output panel
Test Templateβ
- Open a SQL template file (e.g.,
sqls/customers.sql
) - Right-click in the editor
- Select "flAPI: Expand Template"
- Enter test parameters in the input dialog
- See expanded SQL in a new tab
Preview Resultsβ
- Open an endpoint YAML file
- Click the "βΆ Run Query" code lens above the file
- Enter test parameters
- See query results in a table view
Configurationβ
Add to your VS Code settings (.vscode/settings.json
):
{
"flapi.configPath": "./flapi.yaml",
"flapi.validateOnSave": true,
"flapi.showQueryResults": true,
"flapi.maxResultRows": 100
}
Keyboard Shortcutsβ
Action | Shortcut (Mac) | Shortcut (Windows/Linux) |
---|---|---|
Validate Endpoint | β+K, β+V | Ctrl+K, Ctrl+V |
Expand Template | β+K, β+E | Ctrl+K, Ctrl+E |
Run Query | β+K, β+R | Ctrl+K, Ctrl+R |
Snippetsβ
The extension includes snippets for common patterns:
flapi-endpoint
: Scaffold a new endpointflapi-cache
: Add cache configurationflapi-auth
: Add authenticationflapi-validation
: Add parameter validators
Next Stepsβ
- CLI Overview: Learn about the command-line tools
- Configuration Service: Advanced configuration management
- Quickstart Guide: Build your first API
- Configuration Guide: Learn all options
- SQL Templating: Master Mustache syntax
- Build from Source: Compile and develop locally
- Contributing: Contribute to the extension
Want help setting up your development environment? Contact us.