Open jmartin-sul opened 5 years ago
@cmharlow noted that the swagger library for golang deals with this gracefully by using "handlers", so see if that's a pattern that could be leveraged. when she described that approach, it reminded me of abstract classes and interfaces (actual testing code would just implement the auto-generated interface), but maybe i was misunderstanding that (since i have little go experience). either way, not sure that fits easily with what swagger-codegen
does for JS.
re-generating the client code itself is easy, since we don't expect to modify it ourselves.
re-generating the tests is currently a pain: if swagger-codegen sees test code there already (even unmodified auto-generated test code), it won't re-generate new test code.
currently, the strategy is to
git add -p
on the re-generated specs, only keeping the desired new and modified test stubs