Skip to content

feat: add API Gateway v2 service with all 57 operations and execution engine#10

Merged
tyrchen merged 3 commits intomasterfrom
feat/apigatewayv2
Mar 20, 2026
Merged

feat: add API Gateway v2 service with all 57 operations and execution engine#10
tyrchen merged 3 commits intomasterfrom
feat/apigatewayv2

Conversation

@tyrchen
Copy link
Copy Markdown
Owner

@tyrchen tyrchen commented Mar 20, 2026

Summary

  • Add complete API Gateway v2 (HTTP APIs) support to RustStack with ~57 management API operations and a full execution engine
  • Phase 0: API, Route, Integration CRUD (15 operations)
  • Phase 1: Stage, Deployment, Route Response CRUD (12 operations)
  • Phase 2: Authorizer, Model CRUD (11 operations)
  • Phase 3: Domain Name, VPC Link, Tag, API Mapping CRUD (18 operations)
  • Phase 4: Execution engine with route matching, Lambda proxy, HTTP proxy, mock integration, and CORS handling
  • Two-component architecture: Management API (/v2/ prefix) + Execution Engine (/_aws/execute-api/ prefix)
  • All types generated from official AWS Smithy model via codegen
  • 3 new crates: ruststack-apigatewayv2-model, ruststack-apigatewayv2-http, ruststack-apigatewayv2-core
  • CI workflow with comprehensive AWS CLI tests for all operations
  • Integration tests using aws-sdk-apigatewayv2

Test plan

  • Unit tests pass (router, path matching, CORS, event construction, route matching)
  • cargo clippy -- -D warnings clean
  • cargo +nightly fmt clean
  • cargo deny check passes
  • CI workflow: AWS CLI smoke tests for all 57 operations
  • CI workflow: Rust integration tests with aws-sdk-apigatewayv2
  • CI workflow: Execution engine tests (mock integration, CORS preflight)

🤖 Generated with Claude Code

tyrchen and others added 3 commits March 19, 2026 18:48
… engine (#10)

Add complete API Gateway v2 (HTTP APIs) support to RustStack with ~57
management API operations and a full execution engine for routing HTTP
requests through configured API Gateway resources.

## Phases implemented

- **Phase 0**: API, Route, Integration CRUD (15 operations)
- **Phase 1**: Stage, Deployment, Route Response CRUD (12 operations)
- **Phase 2**: Authorizer, Model CRUD (11 operations)
- **Phase 3**: Domain Name, VPC Link, Tag, API Mapping CRUD (18 operations)
- **Phase 4**: Execution engine with route matching, Lambda proxy,
  HTTP proxy, mock integration, and CORS handling

## Architecture

- **Two-component design**: Management API (CRUD via /v2/ prefix) and
  Execution Engine (request proxy via /_aws/execute-api/ prefix)
- **restJson1 protocol**: Reuses Lambda's URL-based routing infrastructure
- **Smithy codegen**: All types generated from official AWS Smithy model
- **Cross-service**: Lambda proxy integration via ruststack-lambda-core

## New crates

- `ruststack-apigatewayv2-model`: Auto-generated types (57 ops, 16 enums,
  21 shared structs)
- `ruststack-apigatewayv2-http`: HTTP protocol layer (router, service,
  handler trait)
- `ruststack-apigatewayv2-core`: Business logic, storage, execution engine

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…l structs

The codegen generated individual `#[serde(rename = "PascalCase")]`
attributes on every struct field, which override the struct-level
`#[serde(rename_all = "camelCase")]`. API Gateway v2 uses camelCase
in the JSON wire protocol (e.g., `name`, `protocolType`), not
PascalCase. This caused `missing field 'Name'` errors when the AWS
CLI sent `{"name": "..."}`.

Remove all PascalCase rename attributes from struct fields while
preserving enum variant renames (e.g., `HTTP`, `WEBSOCKET`).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The handler was parsing the JSON body before injecting path parameters,
causing required fields like `apiId` to be missing. Now merges path
params and query params into the JSON body before deserialization.

Also handles `resource-arn` -> `resourceArn` translation and collects
`tagKeys` query params as JSON arrays.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tyrchen tyrchen merged commit 35843c2 into master Mar 20, 2026
17 checks passed
@tyrchen tyrchen deleted the feat/apigatewayv2 branch March 20, 2026 03:06
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