7 Repos
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 ist ein Tool zur statischen Analyse und ein Boilerplate-Generator für Go, der automatisch strukturierte Test-Suiten aus dem Quellcode erstellt. Es fungiert als Framework für tabellengesteuerte Tests (table-driven tests) und übernimmt die Typauflösung für Funktionen und Methoden, einschließlich der Abbildung von generischen Typ-Constraints auf konkrete Implementierungstypen. Das Tool integriert Large Language Models, um realistische Eingabewerte und Edge-Cases basierend auf der Logik der Funktionen zu synthetisieren. Es nutzt ein template-basiertes Generierungssystem, wodurch Struktur und Format des resultierenden Testcodes über externe Templates und Parameter angepasst werden können. Das Projekt bietet CLI-Utilities für rekursives Scannen von Paketen und die Verarbeitung von Verzeichnisbäumen. Es enthält Mechanismen zur Scope-Kontrolle, um die Funktionsauswahl mittels regulärer Ausdrücke und Sichtbarkeitsmodifikatoren zu filtern.
Provides mechanisms to modify the structure and format of generated test code using custom templates.
xo ist ein Tool zur Generierung typsicherer Go-Modelle und Code zur Abfrageausführung aus SQL-Datenschemata und -Abfragen. Es fungiert als Multi-Dialekt-SQL-Tool, das PostgreSQL, MySQL, SQLite, Oracle und Microsoft SQL Server unterstützt, um idiomatischen Quellcode zu erzeugen. Das Projekt verwendet ein Template-basiertes Generierungssystem, das es ermöglicht, die Struktur und Logik des generierten Datenbank-Quellcodes über anpassbare Text-Templates zu definieren. Es enthält zudem einen Datenbank-Schema-Visualisierer, der Tabellenbeziehungen und Definitionen analysiert, um visuelle Diagramme und strukturierte Dokumentationen zu erstellen. Die Funktionen des Tools decken die automatisierte SQL-Codegenerierung und die Erstellung spezialisierter Datenbankmodelle ab. Es bietet Utilities zum Mapping benutzerdefinierter SQL-Abfragen auf Go-Funktionen und zur Generierung von Schema-Skripten zur Dokumentation von Datenbankmigrationen.
Supports the use of text templates to modify the structure and logic of generated code.
dbtpl ist ein Datenbankmodell-Generator und Schema-Introspektor, der typsicheren Quellcode und Datenmodelle aus SQL-Datenbankschemata erzeugt. Er fungiert als Kommandozeilentool, das SQL-Typen auf Go-Structs und Ausführungsfunktionen abbildet, während es ein Template-basiertes System zur Erstellung benutzerdefinierter Quellcodes und Schemadefinitionen bereitstellt. Das Tool unterstützt mehrere Datenbank-Engines, darunter PostgreSQL, MySQL, SQLite, Oracle und SQL Server. Es zeichnet sich dadurch aus, dass Benutzer benutzerdefinierte Ausgabeformate über Text-Templates definieren können und die Möglichkeit besteht, kompatible Modelldefinitionen für das Django-Webframework zu generieren. Seine Funktionen erstrecken sich auf die Erstellung von SQL-Skripten für Datenbankmigrationen und -spiegelungen sowie den Export von Schemadarstellungen in JSON- oder YAML-Formaten. Zusätzlich kann es Dot-Dateien generieren, um Datenbankbeziehungen und Strukturdiagramme zu visualisieren.
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.