Skip to content
Unverified Commit e61fb6f0 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Update `toSnakeCase` to better handle plurals, version numbers, and other...

Update `toSnakeCase` to better handle plurals, version numbers, and other pathological cases (#3037)

## Motivation and Context
There are currently a lot of fields in the SDK that are clearly
converted to snake-case wrong:
<img width="738" alt="Screenshot 2023-10-09 at 12 00 43 PM"
src="https://github.com/awslabs/smithy-rs/assets/492903/796b5dac-ca26-4a55-b9da-b88a976251d5">
<img width="417" alt="Screenshot 2023-10-09 at 12 02 48 PM"
src="https://github.com/awslabs/smithy-rs/assets/492903/b091bf50-2e6b-4ada-b2f8-8c7158f18f7d">


## Description
- Author a new splitWords algorithm
- Add snapshot test
- Add lots of individual tests.

## Testing
- snapshot testing, compared with current behavior.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 8bfc4c61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment