File tree Expand file tree Collapse file tree
main/java/com/mindee/v2/search/models
test/java/com/mindee/v2/search Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import lombok .Getter ;
88
99/**
10- * Search parameters for models.
10+ * Search for models within the organization linked to the API key.
11+ * All search filters are optional.
12+ * If no search filters are given, all models belonging to the organization are returned.
13+ * Results are paginated.
1114 */
1215@ Getter
1316@ EqualsAndHashCode (callSuper = true )
1417public class ModelSearchParameters extends BaseSearchParameters <ModelSearchResponse > {
1518 /**
16- * Case-insensitive search term for the model name
19+ * Filter models by partial name match, case-insensitive.
1720 */
1821 private final String name ;
1922
2023 /**
21- * Case-insensitive search term for the model type
24+ * Filter by an exact model type.
2225 */
2326 private final String modelType ;
2427
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ public void ModelSearch_mustHaveResults() throws Exception {
3333 assertNotNull (response );
3434 assertNotNull (response .getModels ());
3535 assertFalse (response .getModels ().isEmpty ());
36+ for (var model : response .getModels ()) {
37+ assertFalse (model .getId ().isEmpty ());
38+ assertFalse (model .getName ().isEmpty ());
39+ assertFalse (model .getModelType ().isEmpty ());
40+ }
3641 assertNotNull (response .getPagination ());
3742 assertTrue (response .getPagination ().getTotalItems () > 1 );
3843 assertEquals (1 , response .getPagination ().getPage ());
You can’t perform that action at this time.
0 commit comments