Below are descriptions for errors in the POST germplasm endpoint. Quick summary, there seems to be issues with the germplasmOrigin and storageTypes fields and the donors, institute code, institute name, synonyms, or taxons do not cause errors, but are not saved properly.
I'm doing POST germplasm to the brapi test server and it errors out when I include a germplasmOrigin in there. Here is the body I am sending,
{
"timestamp": 1600345699155,
"status": 500,
"error": "Internal Server Error",
"message": "Type definition error: [simple type, class io.swagger.model.GeoJSONGeometry]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.swagger.model.GeoJSONGeometry` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: (PushbackInputStream); line: 35, column: 27] (through reference chain: java.util.ArrayList[0]->io.swagger.model.germ.GermplasmNewRequest[\"germplasmOrigin\"]->java.util.ArrayList[0]->io.swagger.model.germ.GermplasmOrigin[\"coordinates\"]->io.swagger.model.GeoJSON[\"geometry\"])",
"path": "/brapi/v2/germplasm"
}
When I remove germplasmOrigin I get an error about storageTypes:
{
"timestamp": 1600345988841,
"status": 500,
"error": "Internal Server Error",
"message": "Type definition error: [simple type, class io.swagger.model.germ.GermplasmStorageTypes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.swagger.model.germ.GermplasmStorageTypes` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)\n at [Source: (PushbackInputStream); line: 42, column: 13] (through reference chain: java.util.ArrayList[0]->io.swagger.model.germ.GermplasmNewRequest[\"storageTypes\"]->java.util.ArrayList[0])",
"path": "/brapi/v2/germplasm"
}
Removed storageTypes and it works
Also, when you POST and you have donors, institute code, institute name, synonyms, or taxons populated, it doesn't seem to save those fields. It will return them in the POST response but if you GET that specific germplasm afterward it doesn't return those fields.
Below are descriptions for errors in the POST germplasm endpoint. Quick summary, there seems to be issues with the germplasmOrigin and storageTypes fields and the donors, institute code, institute name, synonyms, or taxons do not cause errors, but are not saved properly.
I'm doing POST germplasm to the brapi test server and it errors out when I include a germplasmOrigin in there. Here is the body I am sending,
Here is the error I am getting:
When I remove germplasmOrigin I get an error about storageTypes:
Removed storageTypes and it works
Also, when you POST and you have donors, institute code, institute name, synonyms, or taxons populated, it doesn't seem to save those fields. It will return them in the POST response but if you GET that specific germplasm afterward it doesn't return those fields.