legislation-explorer icon indicating copy to clipboard operation
legislation-explorer copied to clipboard

Support OpenAPI v3.1

Open MattiSG opened this issue 1 year ago • 2 comments

Following https://github.com/openfisca/openfisca-ops/pull/126, we have been able to upgrade Core in production, which means that https://github.com/openfisca/openfisca-core/pull/989 was deployed and the web API now exposes a OpenAPI v3.1 format. The Legislation Explorer uses an outdated parser that displays the following error:

Unable to render this definition The provided definition does not specify a valid version field.

image

MattiSG avatar May 14 '24 14:05 MattiSG

I tried upgrading the Swagger UI package to v5 that supports OpenAPI v3.1. However, all the dependencies of the Legislation Explorer are so severely outdated that it is a never-ending headache. I cannot even build the website on my machine, no matter if there is a package upgrade or not. I don't see an easy way to bring back Swagger UI without an overhaul in the app, which I believe should not happen and we should instead rewrite it from scratch.

MattiSG avatar May 17 '24 13:05 MattiSG

The issue is really specifically with OpenAPI v3.1, not v3. Most other online tools have also not upgraded to the Swagger UI version that supports OpenAPI v3.1, and thus finding a freely accessible alternative is not easy.

The upgrade was made in https://github.com/openfisca/openfisca-core/commit/8be2ec4e7b598c70111a30458ebe6d8e40d96abc. Maybe one way out of this situation is to only revert https://github.com/openfisca/openfisca-core/commit/8be2ec4e7b598c70111a30458ebe6d8e40d96abc. We need to assess the functional consequences of this revert.

MattiSG avatar May 18 '24 11:05 MattiSG