Loading codegen/src/ops.rs +11 −1 Original line number Diff line number Diff line Loading @@ -64,6 +64,16 @@ pub fn collect_operations(model: &smithy::Model) -> Operations { f!("{op_name}Output") }; // See https://github.com/awslabs/smithy-rs/discussions/2308 let smithy_http_code = sh.traits.http_code().unwrap(); let http_code = if op_name == "PutBucketPolicy" { assert_eq!(smithy_output, "Unit"); assert_eq!(smithy_http_code, 200); 204 } else { smithy_http_code }; let op = Operation { name: op_name.clone(), Loading @@ -77,7 +87,7 @@ pub fn collect_operations(model: &smithy::Model) -> Operations { http_method: sh.traits.http_method().unwrap().to_owned(), http_uri: sh.traits.http_uri().unwrap().to_owned(), http_code: sh.traits.http_code().unwrap(), http_code, }; insert(op_name, op); } Loading crates/s3s/src/ops/generated.rs +3 −1 Original line number Diff line number Diff line Loading @@ -3997,7 +3997,9 @@ impl PutBucketPolicy { } pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result<http::Response> { Ok(http::Response::default()) let mut res = http::Response::default(); *res.status_mut() = http::StatusCode::NO_CONTENT; Ok(res) } } Loading Loading
codegen/src/ops.rs +11 −1 Original line number Diff line number Diff line Loading @@ -64,6 +64,16 @@ pub fn collect_operations(model: &smithy::Model) -> Operations { f!("{op_name}Output") }; // See https://github.com/awslabs/smithy-rs/discussions/2308 let smithy_http_code = sh.traits.http_code().unwrap(); let http_code = if op_name == "PutBucketPolicy" { assert_eq!(smithy_output, "Unit"); assert_eq!(smithy_http_code, 200); 204 } else { smithy_http_code }; let op = Operation { name: op_name.clone(), Loading @@ -77,7 +87,7 @@ pub fn collect_operations(model: &smithy::Model) -> Operations { http_method: sh.traits.http_method().unwrap().to_owned(), http_uri: sh.traits.http_uri().unwrap().to_owned(), http_code: sh.traits.http_code().unwrap(), http_code, }; insert(op_name, op); } Loading
crates/s3s/src/ops/generated.rs +3 −1 Original line number Diff line number Diff line Loading @@ -3997,7 +3997,9 @@ impl PutBucketPolicy { } pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result<http::Response> { Ok(http::Response::default()) let mut res = http::Response::default(); *res.status_mut() = http::StatusCode::NO_CONTENT; Ok(res) } } Loading