Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] input_parameters does not utilize default #332

Open
JVenberg opened this issue Jun 22, 2024 · 1 comment
Open

[BUG] input_parameters does not utilize default #332

JVenberg opened this issue Jun 22, 2024 · 1 comment
Labels
backend Slack backend issue bug Something isn't working

Comments

@JVenberg
Copy link

JVenberg commented Jun 22, 2024

The deno-slack versions

"deno-slack-hub/": "https://deno.land/x/[email protected]/",
"deno-slack-sdk/": "https://deno.land/x/[email protected]/",
"deno-slack-api/": "https://deno.land/x/[email protected]/"

Deno runtime version

deno 1.44.4 (release, x86_64-unknown-linux-gnu)
v8 12.6.228.9
typescript 5.4.5

OS info
#22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024

Describe the bug

The default for parameters in input_parameters is not used

Steps to reproduce

#workflows/example.ts
export const ExampleWorkflow = DefineWorkflow({
  ...
  input_parameters: {
    properties: {
      duration: {
        type: Schema.types.integer,
        default: 30,
      },
    },
  },
});
ExampleWorkflow.addStep(
  Schema.slack.functions.SendMessage,
  {
    channel_id: <Channel>,
    message: `${ExampleWorkflow.inputs.duration}`,
  }
);

Expected result

Outputs message: "30"

Actual result

parameter_validation_failed - Null value for non-nullable parameter `message`

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@JVenberg JVenberg changed the title [BUG] input_parameters does not utilize default [BUG] input_parameters does not utilize default Jun 22, 2024
@filmaj filmaj added bug Something isn't working backend Slack backend issue labels Jun 24, 2024
@filmaj
Copy link
Contributor

filmaj commented Jun 24, 2024

Yup, seems like a legit problem. I will raise this internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Slack backend issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants