Skip to content

refactor(secretsmanager): extract CreateSecretInput from create_secret#360

Merged
vieiralucas merged 1 commit intomainfrom
worktree-cleanup-secretsmanager-inputs
Apr 13, 2026
Merged

refactor(secretsmanager): extract CreateSecretInput from create_secret#360
vieiralucas merged 1 commit intomainfrom
worktree-cleanup-secretsmanager-inputs

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 13, 2026

Summary

create_secret inlined body parsing, field validation, and struct construction in ~140 lines. Extract a CreateSecretInput struct with a from_body() constructor that owns validation + field extraction, so create_secret is ~110 lines focused on idempotency, ARN construction, and version/secret assembly.

Test plan

  • cargo clippy -p fakecloud-secretsmanager --all-targets -- -D warnings
  • cargo test -p fakecloud-secretsmanager (39 passed)

Summary by cubic

Refactored create_secret in fakecloud-secretsmanager to extract request parsing and validation into a dedicated CreateSecretInput, making the handler shorter and clearer with no behavior changes.

  • Refactors
    • Added CreateSecretInput with from_body() to own field extraction, validation, base64 decoding, and tag parsing.
    • Updated create_secret to use the new input, focusing on idempotency checks, ARN construction, and version assembly.
    • No API changes; existing tests pass.

Written for commit 5a9107b. Summary will update on new commits.

create_secret inlined body parsing, field validation, and struct
construction in ~140 lines. Extract a CreateSecretInput struct with a
from_body() constructor that owns the validation + field extraction, so
create_secret is ~110 lines focused on idempotency, ARN construction,
and version/secret assembly.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@vieiralucas vieiralucas merged commit 1474402 into main Apr 13, 2026
22 checks passed
@vieiralucas vieiralucas deleted the worktree-cleanup-secretsmanager-inputs branch April 13, 2026 17:01
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