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

Include enum members in API endpoint #137

Closed guillett closed 7 years ago

guillett commented 7 years ago

Some variables are EnumCol (cf. rsa_non_calculable in legislation explorer and rsa_non_calculable code).

As a user/consumer:

Currently, I would use those details to validate a structure in a client application - MesAides that add metadata to openfisca variables.

Related to https://github.com/openfisca/legislation-explorer/issues/95.

fpagnoux commented 7 years ago

Hi @guillett,

Thanks for reporting this issue, indeed there is much progress to be done with enums, and exposing the value of the operands through the API is something we will consider.

fpagnoux commented 7 years ago

As a workaround, today the best way to get the enum members is to click on "Code source de cette variable" on the legislation explorer page. The first lines of the variable source code should be the definition of the enum :).

thom4parisot commented 7 years ago

Likewise for contrat_de_travail and categorie_de_salarie — and so any type of Enum we use a an index instead of their value.

MattiSG commented 7 years ago

Done via https://github.com/openfisca/openfisca-core/pull/550 :tada: