{"repo":"casantosmu/tyex","free":true,"listed":false,"github":"https://github.com/casantosmu/tyex","clone":"git clone https://github.com/casantosmu/tyex.git","description":"Type-safe Express.js routes with automatic OpenAPI documentation generation.","language":"TypeScript","stars":26,"topics":["ajv","api","express","openapi","rest","schema","typebox","types","typescript","validation"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"tyex Type Safety Layer for Express APIs Runtime Validation • OpenAPI Docs • Full Type Inference Why tyex? Building Express APIs involves three tedious, duplicated tasks: - Type definitions for your request/response objects - Runtime validation to ensure incoming data is valid - API documentation for consumers to understand your endpoints Keeping these in sync is a maintenance nightmare. Instead of juggling multiple libraries and duplicating schemas, tyex lets you define everything once and get all three benefits automatically. Features - 🔄 Single source of truth for types, validation, and documentation - 🚀 No new frameworks to learn - it's just Express - 🔍 Full TypeScript inference for request params, query, and body - ✅ Runtime validation with automatic coercion (strings to numbers, etc.) - 📚 OpenAPI documentation auto-generated from your handlers - 🔌 Async handler support with proper error handling Installation Quick Start How It Works Define Routes with OpenAPI Schema The tyex.handler function wraps your Express handlers with two key benefits: 1. Type-checking - Your handler receives fully typed request objects 2. Runtime validation - Incoming requests are validated against your schema Generating OpenAPI Documentation Option 1: Using the Middleware The tyex.openapi() middleware provides a quick way to expose your documentation on a route. It generates the spec on the first request. Option 2: Programmatic Generation For more flexibility, you can generate the OpenAPI do","default_branch":null,"files":null,"tree":[],"storefront":"/r/casantosmu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/casantosmu/tyex/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}