Title: [aws_lambda_events] Add 'catch-all' field for unmodeled fields, probably behind feature flag · Issue #1017 · aws/aws-lambda-rust-runtime · GitHub
Open Graph Title: [aws_lambda_events] Add 'catch-all' field for unmodeled fields, probably behind feature flag · Issue #1017 · aws/aws-lambda-rust-runtime
X Title: [aws_lambda_events] Add 'catch-all' field for unmodeled fields, probably behind feature flag · Issue #1017 · aws/aws-lambda-rust-runtime
Description: aws_lambda_events is essentially a set of shadow schemas that are hand-maintained to match the event request/response types used by other services. This is very useful from a Rust perspective due to all the nice compile-time guarantees a...
Open Graph Description: aws_lambda_events is essentially a set of shadow schemas that are hand-maintained to match the event request/response types used by other services. This is very useful from a Rust perspective due t...
X Description: aws_lambda_events is essentially a set of shadow schemas that are hand-maintained to match the event request/response types used by other services. This is very useful from a Rust perspective due t...
Opengraph URL: https://github.com/aws/aws-lambda-rust-runtime/issues/1017
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[aws_lambda_events] Add 'catch-all' field for unmodeled fields, probably behind feature flag","articleBody":"`aws_lambda_events` is essentially a set of shadow schemas that are hand-maintained to match the event request/response types used by other services. This is very useful from a Rust perspective due to all the nice compile-time guarantees and performance optimizations we get using `serde`. However, it is very much a moving target, where schemas are always adding new fields, not to mention frequently including undocumented fields.\n\nIt would be nice to have a usage mode for 'I want the bleeding edge, including unmodeled fields'. That way, consumers could both interact with undocumented fields that we will probably never model, as well as the latest and greatest new fields even before we release a new version.\n\nWe could do that today via a 'catch-all' serde-modeled field that just is represented as a `Map\u003cString, Value\u003e`, as demonstrated here: https://github.com/serde-rs/serde/issues/941#issuecomment-375486935\n\n```\n#[derive(Serialize, Deserialize)]\nstruct S {\n a: u32,\n b: String,\n #[serde(flatten)]\n other: Map\u003cString, Value\u003e,\n}\n```\n\nAnd then the caller can interact with contained fields at runtime, or just dump it to logs.\n\nI think probably it belongs under a something like `feature = \"catch-all-fields\"` since this will involve extra allocations and other overhead?\n\nIt would be a fair bit of gruntwork to implement everywhere, but probably a LLM could do it pretty easily.","author":{"url":"https://github.com/jlizen","@type":"Person","name":"jlizen"},"datePublished":"2025-07-15T17:22:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1017/aws-lambda-rust-runtime/issues/1017"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:363347d2-cb49-22dd-8189-018feca3aaab |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3AA:376471:8336B29:AF65BF7:698BBBC7 |
| html-safe-nonce | 7bb4d698b9e5a75226ef4a65609aeea6aad068ed8e753e74f0c7d4d79ec7e3fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0FBOjM3NjQ3MTo4MzM2QjI5OkFGNjVCRjc6Njk4QkJCQzciLCJ2aXNpdG9yX2lkIjoiNzM4ODM4Mjk3NzExNDU5MjcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6a4c80b4c58763dbb3e91409d3b369c4716ebc49f456a36be4a9f49cede7ced5 |
| hovercard-subject-tag | issue:3233071675 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws/aws-lambda-rust-runtime/1017/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d2908a69adba455ae3787a0521f28455fd22ea1205ac781902bc9c5993ded80/aws/aws-lambda-rust-runtime/issues/1017 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d2908a69adba455ae3787a0521f28455fd22ea1205ac781902bc9c5993ded80/aws/aws-lambda-rust-runtime/issues/1017 |
| og:image:alt | aws_lambda_events is essentially a set of shadow schemas that are hand-maintained to match the event request/response types used by other services. This is very useful from a Rust perspective due t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jlizen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/aws/aws-lambda-rust-runtime git https://github.com/aws/aws-lambda-rust-runtime.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 156752158 |
| octolytics-dimension-repository_nwo | aws/aws-lambda-rust-runtime |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 156752158 |
| octolytics-dimension-repository_network_root_nwo | aws/aws-lambda-rust-runtime |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width