openfisca / legislation-explorer

Explore legislation formulas and parameters.
https://legislation.demo.openfisca.org
GNU Affero General Public License v3.0
26 stars 13 forks source link

Broken /parameter and /variable on swagger #227

Open sandcha opened 3 years ago

sandcha commented 3 years ago

What happened? When I try sending a request on /parameter (or /variable) endpoints on swagger, I get a red text area on the parameterID (or variableID) and nothing happens.

What I expected: To be able to try the Web API with the swagger interface and get the requested parameter (or variable) description (and a text area that doesn't reject the requested name and doesn't turn into a red area).

Additional information:
Tested on the legislation explorer of:

This might be a side effect of the last updates on openfisca-core like openfisca/openfisca-core#982

bonjourmauko commented 3 years ago

Thanks for reporting this bug @sandcha !

It seems it is not related to the latest OpenFisca Core version. I've tried in localhost with the previous version and this is what happened:

openfisca-france[master] > make install
openfisca-france[master] > pip install OpenFisca-Core==35.1.1
legislation-explorer[fix-legexp*] > npm start
Capture d’écran 2021-03-24 à 17 08 25 Capture d’écran 2021-03-24 à 17 08 50 Capture d’écran 2021-03-24 à 17 09 02
bonjourmauko commented 3 years ago

I haven't been able to determine the source of this problem but my instinct tells me it could be related to the current OpenAPI specification used by the Web API.

I'll try to help on openfisca/openfisca-core#988 to see if we can solve this bug that way.

@openfisca/international-contrib help welcomed :)