meeshkan / unmock-js

Fuzz test your REST API calls
https://unmock.io
93 stars 8 forks source link

Merge service.ts and serviceCore.ts #345

Open mikesol opened 4 years ago

mikesol commented 4 years ago

The separation of service.ts and serviceCore.ts used to make sense when service was used as a public wrapper around service core, but as the two evolved, they became pretty co-dependent and indistinguishable. I do not see any blockers to merging them, but there could be some distinctions between the two in the code base that need to be preserved.

It would be good to investigate how service and serviceCore are being called, note any meaningful distinctions, and either make these more apparent through better comments/interfaces or, if the distinctions do not warrant two separate files, merge the files.

ksaaskil commented 4 years ago

I think the codebase is already quite tightly coupled in service-related stuff so I would maybe not try to merge the two classes. It's true that the separation between them is not very clear, but instead of adding tighter coupling now, I'd maybe rather start investigating what kind of new abstractions would be needed to support, for example, GraphQL-based services.

carolstran commented 4 years ago

Any feelings on what Kimmo said @mikesol?