Add a mustache based generator and java template (PR port)#27
Conversation
9e3c14b to
584c6e0
Compare
| saveName: string; | ||
| }; | ||
|
|
||
| export const PRIMITIVE_TYPES = [ |
There was a problem hiding this comment.
is this list complete? is there a way to make this more central in the whole poject? might be relevant for type-schema as well, doesn't it?
There was a problem hiding this comment.
Yes. It is a full list of primitive types from R5/R6.
| field: T; | ||
| }; | ||
|
|
||
| export class NameGenerator { |
There was a problem hiding this comment.
the whole NameGenerator might be pulled up and become more like a central pillar for the whole project, doesn't it?
There was a problem hiding this comment.
Not sure. For me, it will be much simpler just to define a language-specific function like tsModuleName and tsModuleFileName in the TS generator than to provide a configurable class for all of them.
There was a problem hiding this comment.
From our perspective, we wouldn’t expect to write any code to configure or use the generator. The key distinction for us is whether setup requires anything beyond simple syntax highlighting. While we’re not the only company and expectations may differ elsewhere, it’s likely that many organizations share this view. Requiring users to work with code or more complex configuration could make the setup feel less accessible for a broader audience.
Of course, it’s ultimately your decision — we’re just providing our input.
0720e64 to
17d0ac9
Compare
2c302b0 to
89f23a1
Compare
89f23a1 to
0b2fe19
Compare
…ooks, debugging options, and schema-driven rendering configurations. Provide example mustache templates to generate basic java types. Ensure `ListElementInformationMixin` compliance in ListElementInformationMixinProvider. Add utility rendering support in Mustache generator and implement `HttpClient` template for Java. Refactor Mustache generator to unify resource and complex type view models, enhance template support, and eliminate unused `titleCase`. Refactor Mustache generator to support parent-child relationships for complex types and resources. Enhance schema handling with URI-based references, add child type support to ViewModel generation, and update templates accordingly. Add `@JsonTypeName` for improved polymorphic support in nested type templates Add filtering support to Mustache generator with `FilterType`, enabling whitelists/blacklists for resources and complex types. Refactor Mustache templates to unify resource and complex type handling by introducing `inner_resource_or_complex_type`. Update config.json, enhance polymorphic support, and add builder pattern support. Enhance builder pattern in Mustache templates by introducing `ReentrantLock` for thread safety, refining `ArrayList` initialization, and adding default constructors to builders and resource classes. Update type-handling annotations and improve polymorphic support. Introduce advanced builder pattern and feature support in Mustache templates. 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`. Refactor Mustache Java templates to improve type handling and introduce date/time getter support. Update `config.json` mappings and streamline field getter logic using reusable templates. Enhance Mustache Java templates with stricter `JsonAutoDetect` visibility for serialization control, refine `List.copyOf` logic for optional arrays, and update `ResourceTest` to include nested input serialization. Refactor Mustache Java templates to enhance builder methods with improved support for array handling and input validation. Update imports for `Arrays` and adjust `ResourceTest` to refine task input serialization. Enhance Mustache Java templates with improved support for `builder` feature. 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. Refactor Mustache Java templates to replace `builder()` with `toBuilder()` in `wither` methods for consistency and improved reusability. Update Mustache Java templates to enhance `toBuilder()` generation with conditional handling for child elements. Update Mustache Java templates to add configurable `ResourceTest` generation and improve `type` handling in `config.json`. Refactor Mustache Java templates to define `ResourceName` constants in resource classes, streamline `resourceClass` handling in `resource_names.mustache`, and update `config.json` paths for improved resource organization. Enhance Mustache Java templates to add reusable extension filtering methods and integrate them into relevant resource and complex type templates. Refactor Mustache Java templates to streamline `builder` handling by removing `wither` methods, introducing `final` modifiers for `toBuilder()` methods, and updating `config.json`. Enhance `ResourceTest` to include extension handling and additional validation. Refactor Mustache Java templates to improve builder method generation 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. Update `ResourceTest` to refine description handling, add assertion for description equality, and adjust import order. Refactor Mustache Java templates to enhance builder methods with support for primitive array elements, improve field getter handling, and streamline serialization logic. Refactor Mustache Java templates and `config.json` to introduce `Primitive` 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. Refactor Mustache Java templates and `config.json` to introduce `Utils` 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`. Enhance Mustache Java templates to add `CodeableConcept` behavior with `findFirstCodingBySystem` and `findCodingsBySystem` methods, refine `toBuilder()` handling, and integrate reusable behavior for complex types. Make `findFirstCodingBySystem`, `findCodingsBySystem`, `findFirstExtensionByURL`, and `findExtensionsByURL` methods final in Mustache Java templates for improved immutability. Add `toString` support to Mustache Java templates by updating `config.json` and integrating reusable `ToStringHelper` utility in `utils.mustache`. Include feature usage in relevant templates. Add `toString` implementation to Mustache Java templates using `ToStringHelper`. Update `ResourceTest` with additional `toString` assertions and refine `utils.mustache` helper methods. Extend `toString` template in Mustache Java to include primitive fields. Configure Eclipse-based formatter for Mustache Java templates and update spotless plugin in `pom.xml`. Refactor templates to enhance null-safety annotations and streamline field declaration style. Add reference handling in Mustache Java templates and `config.json`. Enhance `ResourceTest` with additional assertions and update `ResourceName` with utility methods for improved resource referencing. Refactor `toString` implementation in Mustache Java templates to use `Collectors.joining`, improving code readability and reducing iteration logic. Remove Eclipse-based formatter configuration and switch to Google Java Format in `pom.xml`. Update templates for streamlined annotation usage and add `toReference` method for resource references. Refactor Mustache Java templates to remove redundant `final` modifiers, enhance clarity in private methods, and simplify `toString` implementation for improved readability. Add dependency handling in Mustache Java templates and `config.json`. Update `ViewModelFactory` to collect and process resource and complex type dependencies. Refactor Mustache Java templates to organize into `model` directory structure. 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. Remove `client-spring` module and its `pom.xml` from Mustache Java templates. Update parent `pom.xml` to reflect module removal.
0b2fe19 to
2751cd7
Compare
2751cd7 to
6e13979
Compare
Original PR:
Here: