openfisca / openfisca-web-api

[DEPRECATED] Web API for OpenFisca
https://www.openfisca.fr/
GNU Affero General Public License v3.0
13 stars 11 forks source link

Add country and extension metadata in root response #131

Closed guillett closed 7 years ago

guillett commented 7 years ago

Add details in:

{

    "apiVersion": 1,
    "message": "Welcome, this is OpenFisca Web API.",
    "method": "/"
}
MattiSG commented 7 years ago

Thanks for reporting this @guillett! Could you please elaborate on your use case? 😃 In which case do you need to know which country and extension are loaded?

I also want you to know that the upcoming version of the API will deliver that information through headers:

$ lwp-request -m GET -e https://api-test.openfisca.fr/parameters | head -30
200 OK
Connection: close
Date: Wed, 31 May 2017 11:16:34 GMT
Server: nginx/1.6.2
[…]
Country-Package: openfisca-france
Country-Package-Version: 18.2.7

{
  "bouclier_fiscal.taux": {
    "description": "Taux d'imposition maximal"
  }, 
[…]

Your feedback on this feature is welcome!

MattiSG commented 7 years ago

With no response in the last three weeks, I consider that using headers solved your problem. If that wasn't the case, please feel free to comment again on this issue or open another one 🙂