Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Paths in the cache are overwritten when filtering by pathPart #91

Open
baltendo opened this issue Jul 13, 2016 · 0 comments · May be fixed by #94
Open

Paths in the cache are overwritten when filtering by pathPart #91

baltendo opened this issue Jul 13, 2016 · 0 comments · May be fixed by #94

Comments

@baltendo
Copy link

Hi!
I have a problem when I want to filter my APIs by path.

/swagger.json?path=/rest/api/users
/swagger.json?path=/rest/api/persons

After I restart the application I can access the "users" api and I can use it in swagger-ui.
When I then use another api like "persons" I don't see anything in swagger-ui.
When I switch back to the "users" api I don't see anything in swagger-ui.
When I restart the application I can see the first used API again.
The problem why I don't see anything in swagger-ui is because the paths field is empty.

I debugged the problem a bit and I think the problem is in ApiHelpController.getApiListing:
clone.setPaths(clone.getPaths.filterKeys(_.startsWith(pathPart) ))

Here the existing paths are filtered and set to the clone.
When I access the "users" api I see that all 20 paths are filtered and 10 paths are left.
When I then access the "persons" api I see that the 10 paths are filtered and 0 paths are left.
So instead of changing a clone the cache is changed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant