pfsense-api icon indicating copy to clipboard operation
pfsense-api copied to clipboard

v2.2.0 Documentation on Netgate 4200 gives "Failed to load API definition."

Open war59312 opened this issue 1 year ago • 2 comments

Describe the bug v2.2.0 Documentation on Netgate 4200 gives "Failed to load API definition."

That is /api/v2/documentation gives "Failed to load API definition." on v2.2.0.

Rolled back to v2.1.3 and /api/v2/documentation loads correctly once more.

To Reproduce Steps to reproduce the behavior:

1.) Upgrade from v2.1.3 to v2.2.0 via System > REST API > Updates

2.) Try and view System > REST API > Documentation, now get the "Failed to load API definition." error.

3.) Roll back to v2.1.3 on System > REST API > Updates

4.) System > REST API > Documentation now loads correctly once more.

Expected behavior I expect for System > REST API > Documentation to still work when on v.2.2.0.

Screenshots or Response image

pfSense Version & Package Version:

  • pfSense Version: 24.03-RELEASE
  • Package Version: v2.2.0 / v2.1.3

war59312 avatar Oct 16 '24 21:10 war59312

The OpenAPI schema path changed in v2.2.0, looks like your browser may still have the Swagger config with the old path cached. Try clearing your browser cache and see if it loads correctly afterward.

jaredhendrickson13 avatar Oct 17 '24 04:10 jaredhendrickson13

Got you, indeed. :)

Can fix this by setting Cache-Control: no-store, no-cache, must-revalidate

war59312 avatar Oct 17 '24 15:10 war59312

I'll consider this resolved since this path shouldn't change again in the future.

jaredhendrickson13 avatar Nov 09 '24 03:11 jaredhendrickson13