Skip to content

Conversation

@ctmay4
Copy link
Member

@ctmay4 ctmay4 commented Jul 1, 2025

Closes #117

Schema inputs currently only support default for setting inputs to a static value when not supplied by the caller. This pull request adds a new field called default_table to the input entity.

When staging a case:

  • If default is supplied, it is used and default_table is ignored.
  • Otherwise if default_table is specified as a table identifier then the table will be matched using the current context of supplied values. If there is a match and the input key has a VALUE in the list list of matched endpoints, the default value will be set. If a match is not found, an error will be added to the execution.

Tables created to be used as a default_table must:

  • have an endpoint that maps to the input key it is being used with
  • have a fall-through condition so that there is always a match (otherwise errors will be produced during the run); the fall-through can be a blank value if desired

@ctmay4 ctmay4 self-assigned this Jul 1, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 2, 2025

@ctmay4 ctmay4 merged commit 4dd8ea5 into master Jul 3, 2025
4 checks passed
@ctmay4 ctmay4 deleted the default_table branch July 3, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Defaults based on table matches

2 participants