Enumerations.FHIRVersion used to have a toString() method that called toCode() for its return value.
This commit restores this behaviour by switching to toCode explicitly to avoid the underscore error produced in the current FHIR build, where TypesUtilities.wildcards() still expected the original underscore-less value:
Exception in thread "main" java.lang.Error: underscore
at org.hl7.fhir.r5.utils.TypesUtilities.wildcards(TypesUtilities.java:101)
at org.hl7.fhir.r5.utils.TypesUtilities.wildcardTypes(TypesUtilities.java:87)
at org.hl7.fhir.definitions.generators.specification.ProfileGenerator.defineElement(ProfileGenerator.java:1695)
at org.hl7.fhir.definitions.generators.specification.ProfileGenerator.defineElement(ProfileGenerator.java:1807)
at org.hl7.fhir.definitions.generators.specification.ProfileGenerator.generate(ProfileGenerator.java:782)
at org.hl7.fhir.definitions.parsers.SourceParser.genTypeProfile(SourceParser.java:1128)
at org.hl7.fhir.definitions.parsers.SourceParser.loadCompositeType(SourceParser.java:1159)
at org.hl7.fhir.definitions.parsers.SourceParser.parse(SourceParser.java:242)
at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:671)
at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:482)
Enumerations.FHIRVersion used to have a toString() method that called toCode() for its return value.
This commit restores this behaviour by switching to toCode explicitly to avoid the underscore error produced in the current FHIR build, where
TypesUtilities.wildcards()
still expected the original underscore-less value: