io.github.diz-uker.ig-codegen
0.2.16
See the version list below for details.
dotnet tool install --global io.github.diz-uker.ig-codegen --version 0.2.16
dotnet new tool-manifest
dotnet tool install --local io.github.diz-uker.ig-codegen --version 0.2.16
#tool dotnet:?package=io.github.diz-uker.ig-codegen&version=0.2.16
nuke :add-package io.github.diz-uker.ig-codegen --version 0.2.16
to-fhir
Collection of utilities for mapping FHIR resources.
This repository contains two artifacts:
to-fhir— the core library. Plain Java, no Spring Boot dependency.to-fhir-starter— a Spring Boot starter that auto-configuresFhirProperties(overridable viafhir.*properties) on top ofto-fhir.
Installation
Gradle
implementation "io.github.diz-uker:to-fhir:0.2.16"
// optional, for Spring Boot auto-configuration
implementation "io.github.diz-uker:to-fhir-starter:0.2.16"
Maven
<dependency>
<groupId>io.github.diz-uker</groupId>
<artifactId>to-fhir</artifactId>
<version>0.2.16</version>
</dependency>
<dependency>
<groupId>io.github.diz-uker</groupId>
<artifactId>to-fhir-starter</artifactId>
<version>0.2.16</version>
</dependency>
Development
Generating FHIR IG constants
The generated constant classes in fhir-ig-constants/src/main/java/ (Java) and
fhir-ig-constants-cs/src/ (C#) are produced from fhir-ig-constants/package.json
and must be re-generated whenever the package manifest or the codegen tools change.
1. Install FHIR packages
cd fhir-ig-constants && npm install
2a. Re-generate Java
./gradlew :fhir-ig-constants:generateIgConstants
Spotless formatting is applied automatically. Review the diff, then commit.
2b. Re-generate C#
dotnet msbuild fhir-ig-constants-cs -t:GenerateIgConstants
dotnet tool restore && dotnet csharpier format fhir-ig-constants-cs/src/
Review the diff, then commit. The fhir-ig-constants.yaml CI workflow fails if the
checked-in files are out of date or not formatted.
Alternatively, invoke the C# tool directly (useful if you want to point at a different packages directory):
dotnet run --project ig-codegen-cs/IgCodegen/IgCodegen.csproj -- \
fhir-ig-constants/package.json \
fhir-ig-constants/node_modules \
fhir-ig-constants-cs/src/
Snapshot testing
Auto-approve snapshot changes
Usually, approving a changed snapshots requires manually renaming or moving the
snapshot file from .received. to .approved..
If you are facing a lot of changed snapshots and are certain that your changes
are valid, you can automatically approve them:
APPROVAL_TESTS_USE_REPORTER=AutoApproveReporter ./gradlew test
Source: https://github.com/approvals/ApprovalTests.Java/issues/590.
You can also run this in a loop to approve indexed snapshots:
for i in {1..10};
do APPROVAL_TESTS_USE_REPORTER=AutoApproveReporter ./gradlew test;
done
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.