Code breaks when trying to convert to an enum
- 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
Assessment
This issue has not been assessed yet.