-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added option to disable caching #145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good. Can you include tests to ensure previous functionality isn't broken.
If I may ask @ricardoboss , what is the use case of disabling caching? |
My spec is a local file. That doesn't need caching. |
In this case, caching is used to store a copy of the API specification (spec) from the last time the generator was run. By comparing the current API spec with the cached version, the system can detect if any changes have been made. If the spec hasn’t changed, the generator skips the code regeneration step, which avoids unnecessary work. This approach is especially useful when: The API spec is large: Regenerating code for a large spec can be time-consuming. Maybe i will give it another name as |
That all sounds great in theory. For my use case however, it's not great. My spec file changes frequently as I am developing the API. Sometimes the system doesn't detect it has changed. (at least as far as I can remember, I've been using my fork for a few months by now) Look, adding this change has no impact for people who don't want it but gives people who want it a way to get it. It's also not hard to support this. Why the push back? |
You are right. just wanted to know the use case so I can find an appropriate name for the flag. Thanks for your contribution. |
Please resolve merge conflicts so this can go out in next release. |
4d5daaf
to
d1ae279
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #145 +/- ##
==========================================
+ Coverage 83.35% 84.06% +0.70%
==========================================
Files 10 10
Lines 631 640 +9
==========================================
+ Hits 526 538 +12
+ Misses 105 102 -3 ☔ View full report in Codecov by Sentry. |
This would fix #144