Skip to content

fix(storefront): four requests shipped no body at all - #29

Merged
roncodes merged 1 commit into
mainfrom
fix/storefront-request-bodies
Aug 11, 2026
Merged

roncodes merged 1 commit into
mainfrom
fix/storefront-request-bodies

Conversation

@roncodes

Copy link
Copy Markdown
Member

Four Storefront requests carried content: "" — an entirely empty body — for endpoints that cannot work without one. Each failed on its own validation, and the published API reference showed no request body at all for them. That is a documentation gap as much as a contract failure.

Each body is now the minimum the controller actually requires:

request required
login-with-sms phone
verify-code identity + code
request-creation-code mode (email|sms) + identity
customers name + email + code

The values reuse variables the contract run already injects, so the seeded customer and its verification codes satisfy them (fleetbase/fleetbase#596).

Also: Create a review sent "content": "" and answered "The content field is required." It now carries real review text.

Verified each file parses and the rendered body is the intended JSON.

🤖 Generated with Claude Code

Authenticate a Customer via SMS, Verify a SMS code, the creation-code request and
Create a Customer all carried `content: ""`. Every one of them requires a body,
so each failed on its own validation — and the published API reference showed no
request body for endpoints that cannot work without one. That is a documentation
gap as much as a contract failure.

Each body is now the minimum the controller actually requires:

  login-with-sms          phone
  verify-code             identity + code
  request-creation-code   mode (email|sms) + identity
  customers               name + email + code

The values reuse the variables the contract run already injects, so the seeded
customer and its verification codes satisfy them.

Create a review sent "content": "" and answered "The content field is required."
It now carries real review text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roncodes
roncodes merged commit 212048d into main Aug 11, 2026
1 check passed
@roncodes
roncodes deleted the fix/storefront-request-bodies branch August 11, 2026 08:31
pull Bot pushed a commit to danielabelski/fleetbase that referenced this pull request Aug 11, 2026
The Storefront customer endpoints run the same flows as the FleetOps ones against
the same seeded User, but scope their codes under their own `for` values, so the
fleetops_* rows already seeded do not satisfy them. Three requests failed with
"Unable to verify code." / "Invalid verification code provided!".

Adds three rows, matched exactly as each controller looks them up:

  storefront_login            ::verifyCode      subject_uuid + code + for
  storefront_create_customer  ::create          code + for + meta->identity
  storefront_account_closure  ::confirmClosure  code + for + meta->identity

Reuses the existing $seedVerificationCode helper, so they share the same code
value and the same deterministic re-seeding on every run.

Pairs with fleetbase/postman#29, which gives those requests a body to send.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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