Skip to content

Conversation

fx
Copy link

@fx fx commented Jun 11, 2025

👋 Needed this to accept arrays to pass a list(string) to a parameter in my template.

  • Modified WorkspaceParametersSchema to accept string or string[] values
  • Updated CoderClient.createWorkspace to handle array parameters by serializing them as JSON strings
  • Added test case for array parameters in action.test.ts
  • Updated README with example of using array parameters
  • Added undici dependency for the build

(Claude wrote it, but I did read it, and it does work 😁.)

- Modified WorkspaceParametersSchema to accept string or string[] values
- Updated CoderClient.createWorkspace to handle array parameters by serializing them as JSON strings
- Added test case for array parameters in action.test.ts
- Updated README with example of using array parameters
- Added undici dependency for the build

This change allows users to pass array values in the parameters YAML,
which is useful for Coder templates that accept JSON-encoded arrays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant