7 repositorios
Overriding default code generation templates and injecting vendor extensions to tailor output.
Distinct from Code Generators: Distinct from Code Generators: focuses on customizing the generation process via templates and extensions, not just generating code from definitions.
Explore 7 awesome GitHub repositories matching data & databases · Template-Based Code Customizers. Refine with filters or upvote what's useful.
go-swagger is a toolkit for working with Swagger/OpenAPI 2.0 specifications in Go. It generates server, client, and CLI code from a specification document, and can also produce a specification by scanning annotated Go source code. The project includes a static validation engine that checks documents against the schema and project-specific rules, and a specification transformation pipeline that resolves, flattens, and merges documents. The toolkit generates both client and server code from the same specification, ensuring consistency in request and response handling. It also produces a command
Allows overriding default templates and injecting vendor extensions to customize generated code.
Mockery is a code generation tool that produces mock implementations from Go interfaces, designed to simplify unit testing by automating the creation of test doubles. It parses Go source files using abstract syntax tree analysis to extract interface method signatures, then generates complete mock struct types that implement those interfaces with configurable function fields for test injection. The tool distinguishes itself through its configuration and customization capabilities. Rather than embedding directives in source code annotations, Mockery reads generation settings from a YAML configu
Uses custom templates and template data to control the structure and behavior of generated mocks.
sqlboiler is a database-first ORM generator for Go that analyzes an existing database schema to produce strongly typed structures and query helpers. It functions as a schema-driven code generator, transforming database tables and relationships into executable Go source code. The project distinguishes itself through a type-safe query builder that uses chainable modifiers to construct SQL statements, eliminating the need for raw string concatenation. It utilizes customizable text templates to generate source code, allowing for the aliasing of schema entities and the creation of custom templates
Allows overriding base templates and applying column filters to control the structure of generated output.
gotests es una herramienta de análisis estático y generador de boilerplate para Go que crea automáticamente suites de pruebas estructuradas a partir del código fuente. Funciona como un framework de pruebas basado en tablas que gestiona la resolución de tipos para funciones y métodos, incluyendo el mapeo de restricciones de tipos genéricos a tipos de implementación concretos. La herramienta se integra con modelos de lenguaje (LLM) para sintetizar valores de entrada realistas y casos borde basados en la lógica de la función. Utiliza un sistema de generación basado en plantillas, lo que permite personalizar la estructura y el formato del código de prueba resultante mediante parámetros y plantillas externas. El proyecto proporciona utilidades de línea de comandos para el escaneo recursivo de paquetes y el procesamiento de árboles de directorios. Incluye mecanismos de control de alcance para filtrar la selección de funciones mediante expresiones regulares y modificadores de visibilidad.
Provides mechanisms to modify the structure and format of generated test code using custom templates.
xo is a tool for generating type-safe Go models and query execution code from SQL database schemas and queries. It functions as a multi-dialect SQL tool supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server to produce idiomatic source code. The project uses a template-based generation system, allowing the structure and logic of the generated database source code to be defined through customizable text templates. It also includes a database schema visualizer that analyzes table relationships and definitions to create visual diagrams and structured documentation. The tool's ca
Supports the use of text templates to modify the structure and logic of generated code.
dbtpl is a database model generator and schema introspector that produces type-safe source code and data models from SQL database schemas. It functions as a command line tool that maps SQL types to Go structs and execution functions, while providing a template-based system for creating custom source code and schema definitions. The tool supports multiple database engines, including PostgreSQL, MySQL, SQLite, Oracle, and SQL Server. It distinguishes itself by allowing users to define custom output formats through text templates and the ability to generate compatible model definitions for the D
The tool allows defining custom output formats by authoring or modifying base templates to match specific organizational requirements.
TypeScript generator is a build tool that parses backend class structures and REST endpoints in Java to generate corresponding TypeScript types and client services. It functions as both a static type definition generator and a Java REST client generator, translating compiled class properties, collections, and server-side endpoint definitions into equivalent frontend type definitions and client-side service classes. The tool builds an abstract syntax representation from scanned bytecode using reflection and compiles output through configurable module scoping, formatting declarations into globa
Controls how generated code structures outputs into global definitions, ambient modules, or standard files with declarations.