FHIR / sushi

SUSHI (aka "SUSHI Unshortens Short Hand Inputs") is a reference implementation command-line interpreter/compiler for FHIR Shorthand (FSH).
Apache License 2.0
145 stars 44 forks source link

Recursion Bug for Extensions w/ Context Set to Self #1375

Closed cmoesel closed 11 months ago

cmoesel commented 1 year ago

Complex extensions may be recursive (e.g., contain a nested extension referring to themself). In this case, the extension should add itself to its Context:. If an author attempts to do this, however, SUSHI fails due to infinite recursion.

Example (on FSH Online):

Extension: Node
Context: Device, Node
Title: "Node"
Description: "A node in a file system"
* extension contains name 1..1 and isFolder 1..1 and Node named children 0..*
* extension[name].value[x] only string
* extension[isFolder].value[x] only boolean