You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swagger.json URL does not keep getting tags appended to it, page works after refreshing.
Actual Behavior
See above
Reproducible Demo
Easily reproducible.
Initial investigation
I believe this problem was introduced by this commit: 88c3316. The previous version of appendQueryString parses the original URL then replaces the query. The new version of the function appends to the URL each time.
The (presumably global) settings object is being modified on every request, rather than the cloned copy, so every request to the Swagger page causes another ?tags=xxx to be appended to the jsonPath permanently.
The text was updated successfully, but these errors were encountered:
Issue
We recently upgraded from hapi-swagger v12 to v15, and found the following issue when we access the Swagger page filtering by tags.
Environment
npx envinfo --npmPackages '*hapi*' --binaries
Steps to Reproduce
http://localhost:8000/documentation?tags=v3
/swagger.json?tags=v3
/swagger.json?tags=v3?tags=v3
?tags=v3
appended each timePlugin config:
Expected Behavior
swagger.json URL does not keep getting tags appended to it, page works after refreshing.
Actual Behavior
See above
Reproducible Demo
Easily reproducible.
Initial investigation
I believe this problem was introduced by this commit: 88c3316. The previous version of
appendQueryString
parses the original URL then replaces the query. The new version of the function appends to the URL each time.I think this is also part of the problem:
hapi-swagger/lib/index.js
Lines 331 to 333 in d9c2089
The (presumably global)
settings
object is being modified on every request, rather than the cloned copy, so every request to the Swagger page causes another?tags=xxx
to be appended to thejsonPath
permanently.The text was updated successfully, but these errors were encountered: