Skip to content

Server deserialize operation with required member expects enum Option #1159

@guymguym

Description

@guymguym

With #1148 codegen server of S3 model from aws/sdk/aws-models/s3.json gives a bunch of errors like the below :

error[E0308]: `?` operator has incompatible types
    --> src/operation_deser.rs:1238:13
     |
1238 |             crate::http_serde::deser_payload_delete_objects_delete_objects_input_delete(&bytes)?
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found struct `Delete`
     |
     = note: `?` operator cannot convert from `Delete` to `Option<Delete>`
     = note: expected enum `Option<Delete>`
              found struct `Delete`

This is the operation and member -

        "com.amazonaws.s3#DeleteObjectsRequest": {
            "type": "structure",
            "members": {
                ...
                "Delete": {
                    "target": "com.amazonaws.s3#Delete",
                    "traits": {
                        "smithy.api#documentation": "<p>Container for the request.</p>",
                        "smithy.api#httpPayload": {},
                        "smithy.api#required": {},
                        "smithy.api#xmlName": "Delete"
                    }
                },

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserverRust server SDK

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions