plantbreeding / IPK-BrAPI-Validator

MIT License
4 stars 3 forks source link

Do not repport errors on unimplemented methods #77

Open guignonv opened 1 year ago

guignonv commented 1 year ago

I'll try to make it short...

If you use the call https://www.crop-diversity.org/mgis5/brapi/v2/serverinfo, you'll notice the 'germplasm' call does only implement the "GET" method.

{
    "contentTypes": ["application\/json"],
    "dataTypes": ["application\/json"],
    "methods": ["GET"],
    "service": "germplasm",
    "versions": ["2.1"]
}

However, BRAVA will try and test the germplasm call with the "POST" and "PUT" method since they are part of the call definition. image

Since my implementation is not supposed to support those methods, it will return a 501 "not implemented" while in the BrAPI specifications, only 200, 400, 401 and 403 codes are allowed.

In my opinion, BRAVA should only test methods that are declared available from the /serverinfo call.

langeipk commented 1 year ago

Dear @guignonv thankf for the feature request. Indeed in a feedback with @patrick-koenig we see the benifit, if only the implemented calls are tested. It not task of the Validator to check the level of implementation of the BrAPI specs for particular service provider. Because the toll is currently re-engineered under lead of @daveneti, in branch https://github.com/plantbreeding/IPK-BrAPI-Validator/tree/BRAVA-2-main, I assign the issue to him.