This repository was archived by the owner on Mar 18, 2026. It is now read-only.
Add a mustache based generator#39
Draft
JulianStitz wants to merge 38 commits intofhir-schema:mainfrom
Draft
Conversation
…ooks, debugging options, and schema-driven rendering configurations. Provide example mustache templates to generate basic java types.
…tionMixinProvider.
…tpClient` template for Java.
…odels, enhance template support, and eliminate unused `titleCase`.
… complex types and resources. Enhance schema handling with URI-based references, add child type support to ViewModel generation, and update templates accordingly.
…ng whitelists/blacklists for resources and complex types.
…ng by introducing `inner_resource_or_complex_type`. Update config.json, enhance polymorphic support, and add builder pattern support.
…ntLock` for thread safety, refining `ArrayList` initialization, and adding default constructors to builders and resource classes. Update type-handling annotations and improve polymorphic support.
…mplates. Add hashCode/equals, optional fields, wither methods, and improved polymorphic handling. Enhance ViewModel generation with detailed field/property flags and support for child/parent relationships. Update Maven config for spotless plugin and test dependencies. Add comprehensive `ResourceTest`.
…ce date/time getter support. Update `config.json` mappings and streamline field getter logic using reusable templates.
…lity for serialization control, refine `List.copyOf` logic for optional arrays, and update `ResourceTest` to include nested input serialization.
…oved support for array handling and input validation. Update imports for `Arrays` and adjust `ResourceTest` to refine task input serialization.
…eature. Refactor `config.json` and templates for `wither` integration. Update `ResourceTest` imports and task input handling. Refine Maven configuration to include `maven-source-plugin`. Optimize ViewModel generation with `NamedViewModel` ownership and streamlined primitive handling.
…er()` in `wither` methods for consistency and improved reusability.
…th conditional handling for child elements.
…eration and improve `type` handling in `config.json`.
…n resource classes, streamline `resourceClass` handling in `resource_names.mustache`, and update `config.json` paths for improved resource organization.
…ethods and integrate them into relevant resource and complex type templates.
…removing `wither` methods, introducing `final` modifiers for `toBuilder()` methods, and updating `config.json`. Enhance `ResourceTest` to include extension handling and additional validation.
… by introducing reusable element handling for primitives and adjusting `config.json`. Update `ResourceTest` with new JSON serialization and extension handling. Remove outdated templates and refine field getter logic.
…or description equality, and adjust import order.
…ort for primitive array elements, improve field getter handling, and streamline serialization logic.
…itive` type support, enhancing builder handling, serialization, and array element processing. Update `ResourceTest` to align with new primitive behaviors and add null safety checks for extension methods.
…s` class, adding equality methods for `OffsetDateTime` and lists, enhancing serialization and hash code handling. Update `ResourceTest` for `LocalDateTime` support and improve JSON serialization. Add `jackson-datatype-jsr310` dependency in `pom.xml`.
…h `findFirstCodingBySystem` and `findCodingsBySystem` methods, refine `toBuilder()` handling, and integrate reusable behavior for complex types.
…nsionByURL`, and `findExtensionsByURL` methods final in Mustache Java templates for improved immutability.
….json` and integrating reusable `ToStringHelper` utility in `utils.mustache`. Include feature usage in relevant templates.
…ingHelper`. Update `ResourceTest` with additional `toString` assertions and refine `utils.mustache` helper methods.
…ate spotless plugin in `pom.xml`. Refactor templates to enhance null-safety annotations and streamline field declaration style.
…Enhance `ResourceTest` with additional assertions and update `ResourceName` with utility methods for improved resource referencing.
…`Collectors.joining`, improving code readability and reducing iteration logic.
…a Format in `pom.xml`. Update templates for streamlined annotation usage and add `toReference` method for resource references.
…s, enhance clarity in private methods, and simplify `toString` implementation for improved readability.
… Update `ViewModelFactory` to collect and process resource and complex type dependencies.
…tructure. Update `config.json` paths and add separate `pom.xml` files for `model` and `client-spring` modules. Simplify `sdk-parent` configuration with module-based dependency management.
…mplates. Update parent `pom.xml` to reflect module removal.
Contributor
|
Hi @JulianStitz! I will start to migrate your PR to the https://github.com/atomic-ehr/codegen |
Contributor
|
@JulianStitz Here is a migrated PR: atomic-ehr/codegen#27 Please, take a look. |
Author
Thank you :) i submitted a review to your pr at the atomic repo. let's continue discussion there :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This merge introduces a Mustache-based code generator designed to further separate concerns and lower the barrier for contributions to the FHIR code generation process.
Motivation
The goal is to enable a flexible and transparent way of generating source code through template sets and a minimal configuration file.
This approach allows developers to easily create tailored code for specific use cases without requiring deep knowledge of the underlying generation infrastructure.
Key Idea
By decoupling the generation logic from the template definitions, this system empowers contributors to:
Outlook
It is also conceivable to migrate the existing generators for TypeScript, Python, and C# to this model in the future, unifying the generation approach across all supported languages.
Open Tasks