DEV Community

Discussion on: Devs, what tools do you use to keep track of API changes?

Collapse
 
sam_ferree profile image
Sam Ferree

Is swagger what you're looking for?

Collapse
 
vbordo profile image
Victor Bordo

From my experience with Swagger, it's fantastic for automated documentation but doesn't have any pub/sub features for tracking changes to APIs/docs. Has that changed by any chance? I don't see any tools on their site for alerting and whatnot.

Collapse
 
rhymes profile image
rhymes • Edited

If the APIs developers publish a Swagger file and keep it updated you could just write a script to check if it changes using swagger-diff but I wouldn't count on it.

What if the Swagger has not been updated? What if the API doesn't have it all?

Another solution is to build it yourself. Use a "vcr" like tool, store the response and every once in a while check if the response you get it's still the same. If it's not, you can send yourself an alert and check.

It could have false positives but it might help.

Thread Thread
 
vbordo profile image
Victor Bordo

You read my mind! I'm thinking about building my own but I want to see if it's a widely experienced problem before putting the time in. Based on the lack of engagement thus far looks like it's not a significant pain point :)

Thread Thread
 
rhymes profile image
rhymes

It could also be because there are no tools for it so people don't have an answer :P

It's hard to build an automated tool around it. Every API is different, you need to register each time to have the credentials and automating non idempotent requests can be tricky.

Also most APIs have clients which means that in numerous occasions the developer doesn't really know how the underlying HTTP API actually like (until it breaks :D). They might just read the client documentation.

Thread Thread
 
vbordo profile image
Victor Bordo

Haha very true. It might be an interesting project to pursue. Good point regarding the underlying clients. I figure because there are so many unofficial clients that aren't maintained by the same provider of the core API and still used widely (Slack's unofficial library list is a good example) it might be a useful service for OSS maintainers as well. Thanks for your thoughts here I appreciate it!