ireceptor-plus / issues

0 stars 0 forks source link

invalid repertoire or missing repertoire_id should be an error? #100

Open schristley opened 2 years ago

schristley commented 2 years ago

Should a request with an invalid repertoire/missing repertoire_id be an error? A request like this:

{
    "repertoires": [ 
        { "foo":"bar"}
    ],
    "statistics":[
        "duplicate_count_productive"
    ]
}

or alternatively a request like this:

{
    "repertoires": [ 
        { }
    ],
    "statistics":[
        "duplicate_count_productive"
    ]
}

Currently, the spec allows this. When I send such a request to the openapi3 middleware, it is not flagged as invalid. Instead it acts as if no repertoires were specified and thus returns all repertoires. I think this could be fixed by making the repertoire key be required

I suppose this could return all repertoires, but I notice that covid19-1 returns an error... and IMO it looks like an invalid request.

{"Info":{"title":"iReceptorPlus Statistics API","version":"0.3.0","description":"Statistics API for the iReceptor Plus platform.","contact":null},"Message":"Error processing the request"}