oas icon indicating copy to clipboard operation
oas copied to clipboard

Comment parsing result cache?

Open viewfromthesky opened this issue 3 years ago • 1 comments

Got a weird bug in my documentation generation. I’ve run oas generate several times recently when testing this to get ready to document our API with this tool, and not had any issues at all. However, while testing the output for some new routes, I added a bunch of parameters to a route that were not relevant and subsequently removed them. Now it doesn’t matter what I do, but that route documentation is absolutely set in stone and will not change. Even if I run the generator on the project with nothing but the base spec JSON, no comments in the code at all, two of my routes still appear with the same bad settings from a while back.

Reinstalling the package doesn’t work, individually or along with a reinstall of the entire package base, so there must be some cached result saved somewhere I’m not aware of. What can I do about this? If this is a known problem, could it be documented?

viewfromthesky avatar Jul 22 '22 12:07 viewfromthesky

Indeed this is an issue as we've experienced it a few times in the past as well. It lies somewhere in https://github.com/readmeio/swagger-inline but none of us have been able to figure it out because nothing in our code is doing the caching, its something in a dependency or a sub-dependency.

I've had success by deleting my node_modules/ directory and running npm ci, but YMMV. We'd love for someone to dig into this and see what's going on.

erunion avatar Jul 22 '22 17:07 erunion