Skip to content

is/will it be possible to have optional resource params? #12886

Answered by jeskew
jahead asked this question in Q&A
Discussion options

You must be logged in to vote

It should eventually be possible to have optional resource parameters, but there's still some work that needs to be done to design the user experience. Unlike in-template resources or scalar parameters, I think optional resource parameters have to account for three different states:

  1. A null value (e.g., an omitted value),
  2. A non-null value that corresponds to a skipped resource (i.e., a resource with a false condition), or
  3. A non-null value that corresponds to an active resource (one without a false condition).

We've put effort over the past year or so into the developer experience to make working with optional scalar parameters a more seamless experience, and there's been some discussion …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jahead
Comment options

@jeskew
Comment options

Answer selected by jahead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants