## Motivation and Context
running codegen tests produces a diff you need to ignore
## 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._
## Motivation and Context
Release build was broken because `smithy-build.json` was not being
generated prior to smithyBuild actually running.
## Description
Fix task names
## Testing
Manual patch of release tag with this fix.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
Previously, there was logic used to ignore the default 0/false values
for numbers/booleans when serializing members if they weren't boxed.
This was to fix issues that occured when upstream models didn't properly
box shapes that were meant to be optional, and for the most part worked
because services would just fill in the default if it wasn't passed.
However, with Smithy 2.0, models may have defaults != 0/false, but the
codegenerator still ignores the zero value.
## Description
<!--- Describe your changes in detail -->
This commit makes it so that the actual default value for the member is
ignored for booleans and numbers, instead of just 0/false. It also
updates serialization for http bindings so that headers and query
parameters with 0/false values aren't ignored if they are optional
parameters.
## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
- [x] Generated AWS SDK and inspected diff. Only changes are not
ignoring default value inside `if let Some() = ...` blocks, and ignoring
default value instead of just 0 (only seems to effect nimble).
- [x] Added protocol tests for serializing 0/false in query params for
restXml and restJson
## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [x] 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._
---------
Co-authored-by: John DiSanti <john@vinylsquid.com>
Fix deprecation warnings in the gradle build scripts, and upgrade jsoup
and gson.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: ysaito1001 <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
## Motivation and Context
- aws-sdk-rust#957
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Motivation and Context
> JSON object. A union is serialized identically as a ``structure``
shape, but only a single member can be set to a non-null value.
Deserializers MUST ignore an unrecognized ``__type`` member if present.
[source](https://github.com/smithy-lang/smithy/blob/main/docs/source-2.0/aws/protocols/aws-json.rst.template#L133-L135)
## Description
- upgrade to smithy 1.40
- unignore protocol tests
- fix JSON deserializers
## Testing
- protocol tests + extra unit tests
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
## Description
<!--- Describe your changes in detail -->
## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
## 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._
---------
Co-authored-by: ysaito1001 <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: kstich <kevin@kstich.com>
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
smithy-rs#1767 aws-sdk-rust#536
## Description
<!--- Describe your changes in detail -->
This PR adds support for nullability i.e. much less unwraps will be
required when using the AWS SDK. For generic clients, this new behavior
can be enabled in codegen by setting `nullabilityCheckMode: "Client"` in
their codegen config:
```
"plugins": {
"rust-client-codegen": {
"codegen": {
"includeFluentClient": false,
"nullabilityCheckMode": "CLIENT_CAREFUL"
},
}
```
## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Ran existing tests
## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [x] 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._
---------
Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Russell Cohen <rcoh@amazon.com>
This PR incorporates the new test cases in Smithy from
https://github.com/smithy-lang/smithy/pull/1908, and adds support to
`@restXml` and `@restJson1` for unions with the `@httpPayload` trait.
This resolves https://github.com/awslabs/smithy-rs/issues/1896.
This also fixes code generation for the latest `medicalimaging` SDK
model.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
This PR removes the runtime mode flag, test compile flags, and CI checks
for client middleware.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
This PR changes the default runtime mode to orchestrator for generated
clients and the AWS SDK.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
This PR moves all the "runtime components", pieces that are core to the
operation of the orchestrator, into a separate `RuntimeComponents` type
for the orchestrator to reference directly.
The reason for this is so that these core components cannot be changed
by interceptors while the orchestrator is executing a request.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Motivation and Context
In orchestrator mode, most `codegen-client-test` tests were failing due
to being unable to find a matching auth scheme, or due to some of the
test models referencing the `@sigv4` trait. This PR fixes all of those
failures, and adds the `smithy.runtime.mode` flag to
`codegen-client-test` as well.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Motivation and Context
Now we have the feature parity between Rust and Python servers (at least
for the Pokémon service's needs) we can use the same model in both.
Closes https://github.com/awslabs/smithy-rs/issues/1508
## Testing
```bash
$ cd smithy-rs/examples
$ make test # test Rust servers
$ cd python
$ make test # test Python servers
```
## 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._
* Make service name casing consistent
* Add naming-obstacle-course-casing.smithy
* Add missing import
* Relax obstacle course even further
* Better TODO
* Add CHANGELOG.next.toml
* wip
* Fix region decorator
* Update S3 tests to succeed
* Create 'endpoint_url' setters
* Fix SDK adhoc tests
* Fix endpoint tests
* Fix protocol test generator to have a stub endpoint resolver
* Fix some more tests
* Fix aws rust runtime tests
* Update generator to appease clippy
* CR feedback
* Fix compilation
* Fix tests
* Fix doc links
* Fix SDK integration tests
* Update changelog
* Fix s3 control by adding transformer
* Throw a specific exception if the service doesn't have ep rules
* Add codecatalyst to the list of custom services
This change creates `ClientCodegenDecorator` and
`ServerCodegenDecorator` in `codegen-client` and `codegen-server`
respectively to replace `RustCodegenDecorator`. Client/server
equivalents are created to replace `CombinedCodegenDecorator` as well.
This eliminates the need for the `supportsCodegenContext` method since
the decorator interface is no longer generic, so the `ServiceLoader` is
now powerful enough to differentiate.
The largest benefit, however, is that now clients and servers can have
separate customizations.
* Add support for Endpoints 2.0 Parameters
This commit adds `EndpointDecorator` which injects Endpoint
parameters in to the operation property bag. These can come from
an ordered list of sources—this wires them all up. To facilitate
testing, this diff also writes the parameters into the property
bag during operation generation.
* remove println
* CR Feedback
The logic that keeps track of whether we're working with a borrowed or
an owned value is flawed. It just so happened to work when requesting
owned values from borrowed values because we called `autoDeref` before
creating the value expression. That logic should instead be used
_within_ `ValueExpression` to appease Clippy there too.
Fixes#1831.
* Create the `codegen-core` module
* Move the `Version` class into `codegen-core`
* Rename `codegen` to `codegen-client`
* Rename `codegen-test` to `codegen-client-test`
* Move shared test models to common location
* Fix Smithy validation errors in `misc.smithy`