Server Test Python

Server Test Python

rev. 05c6e78604a0fddb35163c03f066c1bbd63de078

Files changed:

tmp-codegen-diff/codegen-server-test-python/constraints/rust-server-codegen-python/src/unconstrained.rs

@@ -113,113 +173,174 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                        .map_err(|inner_violation| (idx, inner_violation))
  144    145   
                                        })
  145    146   
                                        .collect();
  146    147   
                                    let inner = res
  147    148   
                                        
  148    149   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    150   
            Ok(Self(inner))
  150    151   
        }
  151    152   
    }
  152    153   
}
  153    154   
pub(crate) mod map_of_length_pattern_string_unconstrained {
@@ -629,630 +689,691 @@
  649    650   
    impl std::convert::TryFrom<RecursiveListUnconstrained>
  650    651   
        for crate::constrained::recursive_list_constrained::RecursiveListConstrained
  651    652   
    {
  652    653   
        type Error = crate::model::recursive_list_internal::ConstraintViolation;
  653    654   
        fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
  654    655   
            let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
  655    656   
                                        .0
  656    657   
                                        .into_iter()
  657    658   
                                        .enumerate()
  658    659   
                                        .map(|(idx, inner)| {
  659         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         660  +
                                            inner.try_into()
         661  +
                                                        .map_err(|inner_violation| (idx, inner_violation))
  660    662   
                                        })
  661    663   
                                        .collect();
  662    664   
            let inner =
  663    665   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  664    666   
            Ok(Self(inner))
  665    667   
        }
  666    668   
    }
  667    669   
}
  668    670   
pub(crate) mod length_set_of_pattern_string_unconstrained {
  669    671   

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/unconstrained.rs

@@ -113,113 +173,174 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                        .map_err(|inner_violation| (idx, inner_violation))
  144    145   
                                        })
  145    146   
                                        .collect();
  146    147   
                                    let inner = res
  147    148   
                                        
  148    149   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    150   
            Ok(Self(inner))
  150    151   
        }
  151    152   
    }
  152    153   
}
  153    154   
pub(crate) mod map_of_length_pattern_string_unconstrained {
@@ -629,630 +689,691 @@
  649    650   
    impl std::convert::TryFrom<RecursiveListUnconstrained>
  650    651   
        for crate::constrained::recursive_list_constrained::RecursiveListConstrained
  651    652   
    {
  652    653   
        type Error = crate::model::recursive_list_internal::ConstraintViolation;
  653    654   
        fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
  654    655   
            let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
  655    656   
                                        .0
  656    657   
                                        .into_iter()
  657    658   
                                        .enumerate()
  658    659   
                                        .map(|(idx, inner)| {
  659         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         660  +
                                            inner.try_into()
         661  +
                                                        .map_err(|inner_violation| (idx, inner_violation))
  660    662   
                                        })
  661    663   
                                        .collect();
  662    664   
            let inner =
  663    665   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  664    666   
            Ok(Self(inner))
  665    667   
        }
  666    668   
    }
  667    669   
}
  668    670   
pub(crate) mod length_set_of_pattern_string_unconstrained {
  669    671