Travis CI script for your Swagger/OpenAPI Specification
I also love medium.com, so when I saw their API doc was hand written in plain text, I thought it would be good exercise to convert it to OpenAPI Specification format. The result is https://github.com/amardeshbd/medium-api-specification
Now, recently I’ve started adding Travis Continuous Integration (CI) script for most of my recent projects. So, I wanted to add CI support for this OAS project.
UPDATE: I have written another article that leverages GitHub actions and node modules to validate different things. Use this article to validate anything including Swagger/OpenAPI specifications.
Use node.js tools on GitHub actions CI workflow
On April 14th, 2020 GitHub announced a major change in their plans to allow free private repositories. It’s a good time…
Adding Travis CI build support for OpenAPI specification
Googling for this specific topic didn’t bring much content. I wanted to keep the scrip simple and use existing validator provided by swagger-validator-badge web service (NOTE: There are over dozens of validator in different languages built by the community — see http://swagger.io/open-source-integrations/).
Here are the key elements used for CI:
* shUnit2 — for writing unit tests in shell script. This is downloaded via Travis build config before the build begins.
* validator-badge — online web-service to validate OpenAPI specification file
I hope somebody finds this useful for their project.