hapi-swagger / hapi-swagger

A Swagger interface for hapi
https://hapi.dev/
MIT License
913 stars 420 forks source link

sticky filtering by tags problem #241

Closed midnightcodr closed 8 years ago

midnightcodr commented 8 years ago

To replicate the problem, you can use https://github.com/glennjones/be-more-hapi 1) once it's up and running, load the following in a browser http://localhost:3000/documentation?tags=somethinginvalid

2) it should show no valid endpoints, now change the value or tags to something valid such as ?tags=store or even remove the whole query string, you should see still no valid endpoints show, Network inspection shows UI tries to load swagger.json with whatever the initial value is sent.

glennjones commented 8 years ago

Hi this has now been fixed and in v4.3.0 on npm

midnightcodr commented 8 years ago

Thanks for the update but it doesn't seem the issue is fully addressed.

/documentation?tags=something loads routes with tag 'something', then if I switch to /documentation, it still loads the same result as /documentation?tags=something. The only way to make all routes appear again is to do a /documentation?tags=api

I am using v4.3.0 btw

glennjones commented 8 years ago

Well caught. v4.3.1 should now return a full documentation set after using tag filter and then removing it. So /documentation?tags=something gives you the reduced set and then going back /documentation returns the full set.