plantbreeding / brapi-Java-TestServer

BrAPI Java Test Server
https://brapi.org
MIT License
6 stars 7 forks source link

Search Observation Units doesn't work #47

Closed ctucker3 closed 3 years ago

ctucker3 commented 3 years ago

The POST search observation units endpoint doesn't filter results, and returns 500 for at least one search param.

The following search will return all of the observation units in the db when it should return no results:

{
    "germplasmDbId": ["test"]
}

The following search with return a 500 error:

{
    "germplasmNames": ["test"]
}

EDIT: This seems to be the case for the search germplasm endpoint too.

BrapiCoordinatorSelby commented 3 years ago

I don't know when this was fixed, but it seems to be working as expected now. A note on the first example: "germplasmDbId" is not a valid parameter, it is missing the "s", should be "germplasmDbIds". The server just ignores extra fields, so it reads it as an empty object. Search with no parameters gives you all the records

there are no 500 errors with the corrected "germplasmDbIds" or "germplasmNames", for observations or germplasm