@@ -460,3 +460,112 @@ def test_do_not_propagate_parameters_on_json_schema_object():
460460    actual_component  =  transformer .propagate_types_and_parameters ("" , component , {})
461461
462462    assert  actual_component  ==  expected_component 
463+ 
464+ 
465+ def  test_propagate_property_chunking ():
466+     component  =  {
467+         "type" : "DeclarativeStream" ,
468+         "streams" : [
469+             {
470+                 "type" : "DeclarativeStream" ,
471+                 "retriever" : {
472+                     "type" : "SimpleRetriever" ,
473+                     "requester" : {
474+                         "type" : "HttpRequester" ,
475+                         "url_base" : "https://test.com" ,
476+                         "request_parameters" : {
477+                             "properties" : {
478+                                 "type" : "QueryProperties" ,
479+                                 "property_list" : {
480+                                     "type" : "PropertiesFromEndpoint" ,
481+                                     "property_field_path" : ["name" ],
482+                                     "retriever" : {
483+                                         "type" : "SimpleRetriever" ,
484+                                         "requester" : {
485+                                             "type" : "HttpRequester" ,
486+                                             "url_base" : "https://test.com" ,
487+                                             "authenticator" : {
488+                                                 "$ref" : "#/definitions/authenticator" 
489+                                             },
490+                                             "path" : "/properties/{{ parameters.entity }}/properties" ,
491+                                             "http_method" : "GET" ,
492+                                             "request_headers" : {"Content-Type" : "application/json" },
493+                                         },
494+                                     },
495+                                 },
496+                                 "property_chunking" : {
497+                                     "type" : "PropertyChunking" ,
498+                                     "property_limit_type" : "characters" ,
499+                                     "property_limit" : 15000 ,
500+                                 },
501+                             }
502+                         },
503+                     },
504+                 },
505+                 "$parameters" : {"entity" : "test_entity" },
506+             }
507+         ],
508+     }
509+     expected_component  =  {
510+         "streams" : [
511+             {
512+                 "$parameters" : {"entity" : "test_entity" },
513+                 "entity" : "test_entity" ,
514+                 "retriever" : {
515+                     "$parameters" : {"entity" : "test_entity" },
516+                     "entity" : "test_entity" ,
517+                     "requester" : {
518+                         "$parameters" : {"entity" : "test_entity" },
519+                         "entity" : "test_entity" ,
520+                         "request_parameters" : {
521+                             "properties" : {
522+                                 "$parameters" : {"entity" : "test_entity" },
523+                                 "entity" : "test_entity" ,
524+                                 "property_chunking" : {
525+                                     "$parameters" : {"entity" : "test_entity" },
526+                                     "entity" : "test_entity" ,
527+                                     "property_limit" : 15000 ,
528+                                     "property_limit_type" : "characters" ,
529+                                     "type" : "PropertyChunking" ,
530+                                 },
531+                                 "property_list" : {
532+                                     "$parameters" : {"entity" : "test_entity" },
533+                                     "entity" : "test_entity" ,
534+                                     "property_field_path" : ["name" ],
535+                                     "retriever" : {
536+                                         "$parameters" : {"entity" : "test_entity" },
537+                                         "entity" : "test_entity" ,
538+                                         "requester" : {
539+                                             "$parameters" : {"entity" : "test_entity" },
540+                                             "authenticator" : {
541+                                                 "$ref" : "#/definitions/authenticator" 
542+                                             },
543+                                             "entity" : "test_entity" ,
544+                                             "http_method" : "GET" ,
545+                                             "path" : "/properties/{{ " 
546+                                             "parameters.entity " 
547+                                             "}}/properties" ,
548+                                             "request_headers" : {"Content-Type" : "application/json" },
549+                                             "type" : "HttpRequester" ,
550+                                             "url_base" : "https://test.com" ,
551+                                         },
552+                                         "type" : "SimpleRetriever" ,
553+                                     },
554+                                     "type" : "PropertiesFromEndpoint" ,
555+                                 },
556+                                 "type" : "QueryProperties" ,
557+                             }
558+                         },
559+                         "type" : "HttpRequester" ,
560+                         "url_base" : "https://test.com" ,
561+                     },
562+                     "type" : "SimpleRetriever" ,
563+                 },
564+                 "type" : "DeclarativeStream" ,
565+             }
566+         ],
567+         "type" : "DeclarativeStream" ,
568+     }
569+     transformer  =  ManifestComponentTransformer ()
570+     actual_component  =  transformer .propagate_types_and_parameters ("" , component , {})
571+     assert  actual_component  ==  expected_component 
0 commit comments