Server Test

Server Test

rev. 4906ceba94d55094a893e14215b3544f6657834c

Files changed:

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/input.rs

@@ -1681,1681 +1753,1753 @@
 1701   1701   
            }
 1702   1702   
        }
 1703   1703   
    }
 1704   1704   
    impl ::std::error::Error for ConstraintViolation {}
 1705   1705   
    impl ConstraintViolation {
 1706   1706   
        pub(crate) fn as_validation_exception_field(
 1707   1707   
            self,
 1708   1708   
            path: ::std::string::String,
 1709   1709   
        ) -> crate::model::ValidationExceptionField {
 1710   1710   
            match self {
 1711         -
        ConstraintViolation::MissingString => crate::model::ValidationExceptionField {
 1712         -
                                        message: format!("Value at '{}/string' failed to satisfy constraint: Member must not be null", path),
 1713         -
                                        path: path + "/string",
 1714         -
                                    },
 1715         -
        ConstraintViolation::MissingStringInQuery => crate::model::ValidationExceptionField {
 1716         -
                                        message: format!("Value at '{}/stringInQuery' failed to satisfy constraint: Member must not be null", path),
 1717         -
                                        path: path + "/stringInQuery",
 1718         -
                                    },
 1719         -
        ConstraintViolation::MissingStringInHeader => crate::model::ValidationExceptionField {
 1720         -
                                        message: format!("Value at '{}/stringInHeader' failed to satisfy constraint: Member must not be null", path),
 1721         -
                                        path: path + "/stringInHeader",
 1722         -
                                    },
 1723         -
    }
        1711  +
            ConstraintViolation::MissingString => crate::model::ValidationExceptionField {
        1712  +
                                                message: format!("Value at '{}/string' failed to satisfy constraint: Member must not be null", path),
        1713  +
                                                path: path + "/string",
        1714  +
                                            },
        1715  +
            ConstraintViolation::MissingStringInQuery => crate::model::ValidationExceptionField {
        1716  +
                                                message: format!("Value at '{}/stringInQuery' failed to satisfy constraint: Member must not be null", path),
        1717  +
                                                path: path + "/stringInQuery",
        1718  +
                                            },
        1719  +
            ConstraintViolation::MissingStringInHeader => crate::model::ValidationExceptionField {
        1720  +
                                                message: format!("Value at '{}/stringInHeader' failed to satisfy constraint: Member must not be null", path),
        1721  +
                                                path: path + "/stringInHeader",
        1722  +
                                            },
        1723  +
        }
 1724   1724   
        }
 1725   1725   
    }
 1726   1726   
    impl ::std::convert::From<ConstraintViolation>
 1727   1727   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
 1728   1728   
    {
 1729   1729   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 1730   1730   
            let first_validation_exception_field =
 1731   1731   
                constraint_violation.as_validation_exception_field("".to_owned());
 1732   1732   
            let validation_exception = crate::error::ValidationException {
 1733   1733   
                message: format!(

tmp-codegen-diff/codegen-server-test/s3/rust-server-codegen/src/input.rs

@@ -182,182 +251,251 @@
  202    202   
            }
  203    203   
        }
  204    204   
    }
  205    205   
    impl ::std::error::Error for ConstraintViolation {}
  206    206   
    impl ConstraintViolation {
  207    207   
        pub(crate) fn as_validation_exception_field(
  208    208   
            self,
  209    209   
            path: ::std::string::String,
  210    210   
        ) -> crate::model::ValidationExceptionField {
  211    211   
            match self {
  212         -
        ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  213         -
                                        message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  214         -
                                        path: path + "/Bucket",
  215         -
                                    },
  216         -
        ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
  217         -
                                        message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
  218         -
                                        path: path + "/Key",
  219         -
                                    },
  220         -
        ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
  221         -
    }
         212  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         213  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         214  +
                                                path: path + "/Bucket",
         215  +
                                            },
         216  +
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
         217  +
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
         218  +
                                                path: path + "/Key",
         219  +
                                            },
         220  +
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         221  +
        }
  222    222   
        }
  223    223   
    }
  224    224   
    impl ::std::convert::From<ConstraintViolation>
  225    225   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  226    226   
    {
  227    227   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  228    228   
            let first_validation_exception_field =
  229    229   
                constraint_violation.as_validation_exception_field("".to_owned());
  230    230   
            let validation_exception = crate::error::ValidationException {
  231    231   
                message: format!(
@@ -322,322 +391,391 @@
  342    342   
            }
  343    343   
        }
  344    344   
    }
  345    345   
    impl ::std::error::Error for ConstraintViolation {}
  346    346   
    impl ConstraintViolation {
  347    347   
        pub(crate) fn as_validation_exception_field(
  348    348   
            self,
  349    349   
            path: ::std::string::String,
  350    350   
        ) -> crate::model::ValidationExceptionField {
  351    351   
            match self {
  352         -
        ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  353         -
                                        message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  354         -
                                        path: path + "/Bucket",
  355         -
                                    },
  356         -
        ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
  357         -
                                        message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
  358         -
                                        path: path + "/Key",
  359         -
                                    },
  360         -
        ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
  361         -
    }
         352  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         353  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         354  +
                                                path: path + "/Bucket",
         355  +
                                            },
         356  +
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
         357  +
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
         358  +
                                                path: path + "/Key",
         359  +
                                            },
         360  +
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         361  +
        }
  362    362   
        }
  363    363   
    }
  364    364   
    impl ::std::convert::From<ConstraintViolation>
  365    365   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  366    366   
    {
  367    367   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  368    368   
            let first_validation_exception_field =
  369    369   
                constraint_violation.as_validation_exception_field("".to_owned());
  370    370   
            let validation_exception = crate::error::ValidationException {
  371    371   
                message: format!(
@@ -488,488 +552,552 @@
  508    508   
            }
  509    509   
        }
  510    510   
    }
  511    511   
    impl ::std::error::Error for ConstraintViolation {}
  512    512   
    impl ConstraintViolation {
  513    513   
        pub(crate) fn as_validation_exception_field(
  514    514   
            self,
  515    515   
            path: ::std::string::String,
  516    516   
        ) -> crate::model::ValidationExceptionField {
  517    517   
            match self {
  518         -
        ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  519         -
                                        message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  520         -
                                        path: path + "/Bucket",
  521         -
                                    },
  522         -
    }
         518  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         519  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         520  +
                                                path: path + "/Bucket",
         521  +
                                            },
         522  +
        }
  523    523   
        }
  524    524   
    }
  525    525   
    impl ::std::convert::From<ConstraintViolation>
  526    526   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  527    527   
    {
  528    528   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  529    529   
            let first_validation_exception_field =
  530    530   
                constraint_violation.as_validation_exception_field("".to_owned());
  531    531   
            let validation_exception = crate::error::ValidationException {
  532    532   
                message: format!(
@@ -597,597 +663,663 @@
  617    617   
            }
  618    618   
        }
  619    619   
    }
  620    620   
    impl ::std::error::Error for ConstraintViolation {}
  621    621   
    impl ConstraintViolation {
  622    622   
        pub(crate) fn as_validation_exception_field(
  623    623   
            self,
  624    624   
            path: ::std::string::String,
  625    625   
        ) -> crate::model::ValidationExceptionField {
  626    626   
            match self {
  627         -
        ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  628         -
                                        message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  629         -
                                        path: path + "/Bucket",
  630         -
                                    },
  631         -
        ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
  632         -
        ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
  633         -
    }
         627  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         628  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         629  +
                                                path: path + "/Bucket",
         630  +
                                            },
         631  +
            ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
         632  +
            ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
         633  +
        }
  634    634   
        }
  635    635   
    }
  636    636   
    impl ::std::convert::From<ConstraintViolation>
  637    637   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  638    638   
    {
  639    639   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  640    640   
            let first_validation_exception_field =
  641    641   
                constraint_violation.as_validation_exception_field("".to_owned());
  642    642   
            let validation_exception = crate::error::ValidationException {
  643    643   
                message: format!(