Skip to content
Unverified Commit 14ccc50f authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Make when expression non exhaustive in EndpointBuiltInsDecorator.kt (#3634)

## Motivation and Context
Updates handling matching on endpoint parameter type in
`EndpointBuiltInsDecorator.kt`

## Description
Smithy 1.48.0 will introduce `ParameterType.STRING_ARRAY` for the
endpoint parameter type and exhaustive matching like what we have today
makes lint unhappy.
```
codegen/src/main/kotlin/software/amazon/smithy/rustsdk/EndpointBuiltInsDecorator.kt: (113, 9): 'when' expression must be exhaustive, add necessary 'STRING_ARRAY' branch or 'else' branch instead 
```

For now, we will fail out loud for anything other than `string` or
`boolean` since we most likely don't have services that support
`ParameterType.STRING_ARRAY` today. The panic will let us know during
internal preview when a service supports `ParameterType.STRING_ARRAY`.

## Testing
Relies on tests in CI

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 1468813e
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