Skip to content

Commit 3a3206b

Browse files
committed
📝 better docs for model search
1 parent b9c0db3 commit 3a3206b

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎src/main/java/com/mindee/v2/search/models/ModelSearchParameters.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77
import 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)
1417
public 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

‎src/test/java/com/mindee/v2/search/ModelSearchIT.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)