add a test for resursive documents' to_schema method
support recursive documents