@@ -2436,12 +2436,14 @@ def test_plugins_search_dedl_discover_queryables(self, mock_request):
24362436 self .assertEqual (get_origin (base_type ), list )
24372437 literal_args = get_args (base_type )
24382438 self .assertEqual (literal_args , (Literal ["00:00" ],))
2439+ self .assertIn ("json_schema_required" , args [1 ].metadata )
24392440
24402441 # Check that "start" has type Annotated[str, ...]
24412442 self .assertIn ("start" , queryables_dedl )
24422443 annotated_type = queryables_dedl ["start" ]
24432444 args = get_args (annotated_type )
24442445 self .assertEqual (args [0 ], str )
2446+ self .assertNotIn ("json_schema_required" , args [1 ].metadata )
24452447
24462448 # Check that "geom" has type Annotated[Union[str, dict[str, float], BaseGeometry], ...]
24472449 self .assertIn ("geom" , queryables_dedl )
@@ -2459,6 +2461,14 @@ def test_plugins_search_dedl_discover_queryables(self, mock_request):
24592461 if isinstance (arg , type )
24602462 )
24612463 )
2464+ self .assertTrue (args [1 ].is_required ())
2465+
2466+ # Check that "bbox" has type fieldInfo with "required": "True" and json_schema_required in metadata
2467+ self .assertIn ("bbox" , queryables_dedl )
2468+ annotated_type = queryables_dedl ["bbox" ]
2469+ args = get_args (annotated_type )
2470+ self .assertTrue (args [1 ].is_required ())
2471+ self .assertIn ("json_schema_required" , args [1 ].metadata )
24622472
24632473 @mock .patch (
24642474 "eodag.plugins.search.qssearch.QueryStringSearch._request" , autospec = True
0 commit comments