NCATS-Tangerine / translator-knowledge-beacon

NCATS Translator Knowledge Beacon Application Programming Interface plus Sample code
MIT License
7 stars 2 forks source link

Array collection format: multi, pipes, csv #20

Closed lhannest closed 6 years ago

lhannest commented 6 years ago

We're currently using the multi format for arrays, which looks like: /api/statements?c=X&c=Y&c=Z

But this raises a problem. Most people want to use Python Flask to write their API's, but the Swagger Codegen application generates API's that use Connexion, which do not support the multi collection format.

Connexion only supports the csv and pipes collection format, which looks like: /api/statements?c=X,Y,Z /api/statements?c=X|Y|Z

I have been trying to develop Connexion to support the multi collection format, and if I accomplish this then the issue is resolved. But otherwise, we might want to use a different collection format so that developers can use Swagger to generate Python Flask project stubs.

cmungall commented 6 years ago

seems bizarre connexion doesn't support this. csv and pipes seem highly non-standard?

lhannest commented 6 years ago

I was able to get the multi format working in connextion: https://github.com/lhannest/connexion, but they're not responding to my pull request. I did swagger use swagger to generate a flask app, and then installed my version of connexion locally and so far it's working well.

lhannest commented 6 years ago

Didn't mean to click close.

lhannest commented 6 years ago

Connexion version 1.1.15 now supports the multi array format.