OpenAPI Overview
Yelix provides built-in support for generating OpenAPI documentation for your APIs. This feature allows you to automatically create and maintain API documentation based on your route definitions.
deno add jsr:@yelix/hono jsr:@yelix/zod-validator npm:zodWhat is OpenAPI?
Section titled “What is OpenAPI?”OpenAPI (formerly Swagger) is a specification for describing RESTful APIs. Yelix automatically generates OpenAPI 3.1 specifications from your route definitions, making it easy to:
- Document your API automatically as you build it
- Generate client libraries for your API consumers
- Test your API using interactive documentation tools
- Share API specifications with your team
Key Features
Section titled “Key Features”The OpenAPI integration in Yelix includes:
- Automatic Documentation: Generate OpenAPI specs from your routes
- Zod Schema Integration: Convert Zod schemas to OpenAPI schemas automatically
- Request Validation: Validate requests using Zod with automatic schema generation
- Response Documentation: Document response structures with type safety
- Security Schemas: Define authentication methods
- Server Configuration: Configure multiple server environments
Getting Started
Section titled “Getting Started”To get started with OpenAPI in Yelix:
- Getting Started - Initialize your app with OpenAPI
- Configuration - Configure servers and security
- Documenting Endpoints - Document your API routes
- Response Schemas - Define response structures
- Examples - See complete working examples