Skip to content

fix(apiGateway): support object form for apiKeys entries#699

Open
VirtueMe wants to merge 1 commit intoserverless-operations:masterfrom
BANCS-Norway:fix-471-apikeys-objects
Open

fix(apiGateway): support object form for apiKeys entries#699
VirtueMe wants to merge 1 commit intoserverless-operations:masterfrom
BANCS-Norway:fix-471-apikeys-objects

Conversation

@VirtueMe
Copy link
Contributor

Summary

Fixes #471.

  • apiKeys entries can now be objects with name and optionally value properties, matching the Serverless Framework's own support for this format
  • String entries continue to work as before
  • Non-string/non-object entries (e.g. numbers) still throw an error

Test plan

  • New tests for object with name + value, and object with name only
  • Existing string and error-case tests still pass
  • All 448 tests pass

🤖 Generated with Claude Code

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/serverless-operations/serverless-step-functions@699

commit: b153933

@zirkelc
Copy link
Collaborator

zirkelc commented Mar 23, 2026

Please add to README

Resolves serverless-operations#471. The Serverless Framework allows apiKeys entries to be objects
with name/value properties, but this plugin threw "API Keys must be strings"
for any non-string entry. Now accepts objects with at least a name property
and maps value to the CloudFormation Value property when provided.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@VirtueMe VirtueMe force-pushed the fix-471-apikeys-objects branch from ab6b812 to b153933 Compare March 23, 2026 08:30
@VirtueMe
Copy link
Contributor Author

VirtueMe commented Mar 23, 2026

Added the missing README section documenting the object form (name/value) for apiKeys entries with an example.

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.

Failing to package when API keys is an array of objects - version 3.2.0

2 participants