FHIR / FHIR/sushi

Warn when overwriting an array entry when no index is provided

Open
#1,086 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
188
Forks
64
Avg merge
8d 11h
Merged PRs (30d)
3

Description

If authors do not specify an index on array paths, SUSHI will add the values at the first index. However, if an author adds a value at a path with an index (using either numeric indices or soft indices) and then uses the same path without the indices, SUSHI will overwrite the previously defined values with the values at the non-indexed path that came later.

Simplified FSH Online example: https://fshschool.org/FSHOnline/#/share/38nnIU9

Zulip thread: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Validating.20extensions

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior in the linked simplified FSH Online example, then trace SUSHI's array-path assignment handling for indexed and non-indexed paths. Review the linked Zulip discussion for context. Done means a later path without an index warns instead of silently overwriting values previously assigned with numeric or soft indices.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.