FHIR / FHIR/fhir-codegen

Code breaks when trying to convert to an enum

Open
#175 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
154
Forks
57
Avg merge
1m
Merged PRs (30d)
1

Description

# Where
ConvertEnumValue at fhir-codegen-main\fhir-codegen-main\src\Microsoft.Health.Fhir.CodeGen\Language\Firely\CSharpFirelyCommon.cs

at
`
foreach (string bit in bits)
{
result += bit.Substring(0, 1).ToUpperInvariant();
result += bit.Substring(1);
}
`

# What
If the bit is empty, the code crashes.
Is it OK to have empty "bit"? Probably not. but it happens!
So, I think, assuming the bit is non empty, is too harsh.

# Example
For instance, try to run

"Firely ILHDP": {
"commandName": "Project",
"commandLineArgs": "generate FirelyNetIg -p il.hdp.fhir.r4#0.2.4 --auto-load-expansions --resolve-dependencies true --include-experimental",
"workingDirectory": "$(MSBuildProjectDirectory)"
},

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.