Skip to content

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

Merged
zirkelc merged 1 commit intoserverless-operations:masterfrom
BANCS-Norway:fix-471-apikeys-objects
Mar 26, 2026
Merged

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

Conversation

@VirtueMe
Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Collaborator Author

VirtueMe commented Mar 23, 2026

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

@zirkelc zirkelc merged commit 14d8eed into serverless-operations:master Mar 26, 2026
3 checks passed
@VirtueMe VirtueMe deleted the fix-471-apikeys-objects branch March 26, 2026 14:34
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