Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: ephemeral parameters must be optional#141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 1 commit intocoder:mainfrommtojek:6828-conflict-required-ephemeral
Jul 18, 2023

Conversation

mtojek
Copy link
Member

Related:coder/coder#6828

This PR introduces another constraint for ephemeral parameters:

  • ephemeral parameters can't be marked as required, so they must have thedefault property defined.

@mtojekmtojek self-assigned thisJul 18, 2023
@mtojekmtojek marked this pull request as ready for reviewJuly 18, 2023 08:32
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM!

}

if!parameter.Optional&&parameter.Ephemeral {
returndiag.Errorf("ephemeral parameter requires the default property")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sanity check: do parameters have an optional field or is it inferred by setting default, and is that the only way to do it? (I always stop to ask when I see the check and message say something different.)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

do parameters have an optional field

No.

is it inferred by setting default

Yes 👍

is that the only way to do it

Yes 👍

@mtojekmtojek merged commit1882c77 intocoder:mainJul 18, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 18, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mafredrimafredrimafredri approved these changes

@johnstcnjohnstcnAwaiting requested review from johnstcn

Assignees

@mtojekmtojek

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mtojek@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp