The Skroutz API documented live with Swagger UI.
This project demonstrates how to convert documentation given as a Postman Collection (that is hosted online) to a Swagger formatted documentation (OpenAPI Specification), that is real-time updated according to the Postman Collection given in the beginning.
To visualize and interact with the documentation we use Swagger UI.
The technology the project is based on is Node.js.
Skroutz.gr is a Comparison Shopping Engine (CSE) which evolved to an E-commerce Marketplace (it is considered the largest product price search engine in Greece).
Skoutz used to provide an official API (deprecated now). Their API documentation can be found, along with a list of all the example requests, as a Postman collection here.
In this project we periodically query the given documentation (in Postman format) to create and update a documentation in another format, with Swagger UI.
The project is deployed with Heroku and can be found online at http://bit.ly/swagger-skroutz.
You can find Skroutz on GitHub at https://github.com/skroutz.
First, clone the repository from GitHub (e.g. git clone https://github.com/KAUTH/Swagger-Skroutz-API.git
).
To run this project locally you need to have npm installed.
When deploying the project for the first time, install all the required packages by running the npm install
command on a terminal in the root directory.
After that, to run the project use the npm start
command.
The Swagger UI API documentation will then be accessible from http://localhost:8080/api/.
Important: There is 1 .env file (with environment variables) that our project uses, which is not on the repository for security reasons. In order for the project to run properly, you have to create your .env file in the same directory (root directory) that the .env.example file (example of how our .env file look like) is present in this repository.
-
You can always submit a PR if you want to suggest improvements or fix issues.
-
Check out the open issues at https://github.com/KAUTH/Swagger-Skroutz-API/issues.