{"repo":"varletjs/api-farmer","free":true,"listed":false,"github":"https://github.com/varletjs/api-farmer","clone":"git clone https://github.com/varletjs/api-farmer.git","description":"API module generation tool based on Openapi3/Swagger2.","language":"TypeScript","stars":46,"topics":["api-generator","cli","ejs","nodejs","openapi","swagger","typescript","javascript"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"api-farmer Intro API module generation tool based on Openapi3/Swagger2 . Features - 🌐 &nbsp; Supports generating all API modules from OpenAPI3/Swagger2 schemas - 📦 &nbsp; Supports generating ts/js modules - 🛠️ &nbsp; Comprehensive ts type generation - ✏️ &nbsp; Supports custom ejs templates for tailored content generation - 🔄 &nbsp; Allows using a transformer to modify all variables in templates for fine-grained customization - 💻 &nbsp; Supports both cli and node.js api - 📋 &nbsp; Includes built-in presets for axle and axios templates Quick Start 1. Installation 2. Setup 3. Run Command [!TIP] The generated content does not include the integration of the request client. Some Examples Some simple usage examples can be found here Custom code generation templates Create api-farmer.ejs in the project root, which will replace the preset template. The template format can refer to the preset template listed below: - Axle - Axios And see the bottom of the document for template variable definitions. Transformer API You can use the Transformer API to further define template variables, which will override the default transformation rules. name Transformer The name transformer is a convenience option that derives both fn and type from a single function. When set, fn is the return value, and type is automatically capitalized from fn . This avoids writing duplicate logic for fn and type . [!NOTE] If name is set, fn and type transformers will be ignored. Configuration Options Template ","default_branch":null,"files":null,"tree":[],"storefront":"/r/varletjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/varletjs/api-farmer/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."}