feat: casing engine + schema_driven_xml transform (schema-driven provider machinery)#107
Merged
Merged
Conversation
general-kroll-4-life
approved these changes
Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Provider-agnostic, opt-in machinery that lets specs move from per-op verbose Go templates to schema-driven, casing-aware handling. Everything is gated behind new per-spec flags/extensions, so existing providers (google, okta, github, awscc, ...) see zero behaviour change. Motivated by the native AWS provider; no AWS knowledge is hard-coded in core.
Two cleanly separable features (could be split into two PRs if preferred; bundled here):
1. casing engine (pkg/casing)
xform_name(snake) + inverses for pascal | kebab | camel, with a cache.config.snake_case_aliases: true, top-level response column names are snake-aliased at the SQL surface; the wire name is retained on the schema for response navigation.request.nativeCasingis set (pascal | kebab | camel | snake), an unresolved snake SQL key is reverse-cased to the wire form and re-resolved (parameters and one level of request-body properties). Final miss yields a typedParameterNotFoundErrorlisting wire-format keys.Wiring: const.go, config.go, provider.go (
IsSnakeCaseAliasesEnabled), expectedRequest.go (GetNativeCasing), operation_store.go (GetRequestNativeCasing, reverse-casing inGetParameter/body matcher,GetParameterOrError), schema.go (getPropertiesColumns), radix_tree_address_space/legacy_address_space.go (GetColumns).2. schema_driven_xml transform (pkg/stream_transform)
StreamTransformerfamilyschema_driven_xml_v0.1.0(distinct fromgolang_template_mxj_v*).response.schema_overrideschema, walks mxj-decoded XML, and projects rows into the{"<objectKey>": [...]}envelope. Decodes mxj WITHOUT casting and applies the schema's declared type, so 12-digit IDs stay strings, booleans stay booleans, objects/arrays are JSON-stringified, and self-closing elements become null.info.x-protocol; handles list and singleton (incl. singleton-with-ancillary-list) shapes.SchemaTree); the operation store adapts its Schema and dispatches ingetOverridenResponse.Tests
Notes
GetOperationParameter(a secondary parameter path) was intentionally not extended; the primaryGetParameterresolution carries reverse-casing.go test ./...+ golangci-lint to be run in CI.