Skip to content

feat(apigatewayv2): align path routing + JSON case with Smithy model#712

Merged
vieiralucas merged 1 commit intomainfrom
worktree-apigwv2-smithy-paths
Apr 23, 2026
Merged

feat(apigatewayv2): align path routing + JSON case with Smithy model#712
vieiralucas merged 1 commit intomainfrom
worktree-apigwv2-smithy-paths

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 23, 2026

Summary

  • Reroute apigatewayv2 paths to match the Smithy model (routing rules nest under /v2/domainnames/{name}/routingrules, sharing policies are /sharingpolicy, portal product pages are /productpages and /productrestendpointpages, DisablePortal is DELETE /v2/portals/{id}/publish).
  • Smithy serializes apigatewayv2 fields in camel-case (apiId, lastModified, …). Extras handlers emit Pascal-case; add a to_camel walker on every response and a body reader that merges Pascal-case duplicates of incoming camel-case fields, so handlers can stay Pascal-case-friendly.
  • Bumps baseline apigateway probe coverage from 76.1% -> 83.1% and overall variants from 98.9% -> 99.2%.

Test plan

  • cargo test -p fakecloud-conformance --test apigatewayv2 (7 passing)
  • cargo run -p fakecloud-conformance -- audit (PASS, 1702/1702)
  • cargo clippy --workspace --all-targets -- -D warnings (clean)

Summary by cubic

Aligns fakecloud-apigatewayv2 path routing and camelCase JSON with the Smithy model to match AWS and boost conformance coverage.

  • Migration
    • Routing rules now nest under /v2/domainnames/{DomainName}/routingrules (create/list/get/put/delete).
    • Portal product sharing policy path is /sharingpolicy (no hyphen).
    • Portal product pages paths are /productpages and /productrestendpointpages (no hyphens).
    • DisablePortal is DELETE /v2/portals/{id}/publish (not POST /disable).
    • Responses are camelCase; request bodies accept camelCase and PascalCase (handlers remain Pascal-case-friendly).
    • Conformance: apigateway 76.1% → 83.1%; overall 98.9% → 99.2% (fakecloud-conformance).

Written for commit 530d9b6. Summary will update on new commits.

- Smithy says routing rules nest under a domain
  (/v2/domainnames/{name}/routingrules), sharing policies are
  /sharingpolicy (no hyphen), portal product pages are /productpages
  and /productrestendpointpages (one word, not hyphenated), and
  DisablePortal is DELETE /v2/portals/{id}/publish (not POST /disable).
  Reroute all of these in resolve_action + conformance tests +
  extras handlers.
- Smithy serializes apigatewayv2 response fields in camel-case
  (jsonName defaults first-letter-lowercase). Extras handlers emit
  Pascal-case for legibility; add a to_camel walker that runs on
  every response + a body reader that merges Pascal-case duplicates
  of incoming camel-case fields so handlers read either case.
- Bumps baseline apigateway probe coverage from 76.1% to 83.1%
  and overall conformance to 99.2%. Remaining apigwv2 variants
  need per-op response-shape enrichment (Smithy-required fields
  like portalDefaultDomainName, lastModified, etc.); tracked as
  follow-up.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 50.96154% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/fakecloud-apigatewayv2/src/extras.rs 62.35% 32 Missing ⚠️
crates/fakecloud-apigatewayv2/src/service.rs 0.00% 19 Missing ⚠️

📢 Thoughts on this report? Let us know!

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 4 files

@vieiralucas vieiralucas merged commit 9a8b26e into main Apr 23, 2026
48 checks passed
@vieiralucas vieiralucas deleted the worktree-apigwv2-smithy-paths branch April 23, 2026 16:28
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