-
Notifications
You must be signed in to change notification settings - Fork 0
API OpenAPI
GitHub Actions edited this page Jan 25, 2026
·
2 revisions
VelinScript kann automatisch OpenAPI Specifications aus deinem Code generieren.
# Mit velin-api-doc Tool
velin-api-doc generate -i main.velin -o api.json
# Mit Format-Optionen
velin-api-doc generate -i main.velin -o api.yaml --format yaml
velin-api-doc generate -i main.velin -o api.md --format markdown
# Mit Custom Titel und Version
velin-api-doc generate -i main.velin -o api.json --title "My API" --version "1.0.0"Dies generiert eine OpenAPI 3.0 Specification aus allen API-Endpoints in deinem VelinScript Code.
VelinScript:
@GET("/api/users/:id")
@Auth
fn getUser(id: string): User {
return db.find(User, id);
}
@POST("/api/users")
fn createUser(name: string, email: string): User {
// ...
}
Generierte OpenAPI Spec:
{
"openapi": "3.0.0",
"info": {
"title": "VelinScript API",
"version": "1.0.0"
},
"paths": {
"/api/users/{id}": {
"get": {
"operationId": "get_user",
"security": [{"bearerAuth": []}],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
}
}
}
}- Automatische Extraktion von HTTP Endpoints
- Security Decorators werden zu Security Requirements
- Parameter werden automatisch erkannt
- Request/Response Schemas werden generiert
- Type Information wird verwendet
Die generierte OpenAPI Spec kann verwendet werden für:
- API Documentation (Swagger UI, ReDoc)
- Client Code Generation
- API Testing
- API Gateway Configuration
- Compiler Architecture
- Pass-Verlauf
- Type Inference
- Code Ordering
- IR Representation
- Borrow Checker
- Code Generation
- Multi-Target Compilation
- Module Resolution
- Framework Integration
- Parallelization
- AI Compiler Passes
- Prompt Optimizer
- System Generation
- Basics
- APIs
- Security
- Database
- Validation
- Authentication
- ML/LLM
- Intelligence Features
- Type Inference
- ML Training
- Pattern Matching
- Closures
- Collections
- HTTP Client
- String Interpolation
- Debugger
- Vektor-Datenbanken
- CLI Reference
- API Keys Setup
- Advanced
- Backend
- Security Best Practices
- AI/ML
- Auto Imports
- Plugin Development