Skip to content

Initialized swagger

fixes #126 (closed)

  • Made 3 api documentations
  • Serving the docs on /api/docs path
  • Making use of JSDocs
  • Custom documentation css styles, better UI
  • Tests can be made on local development servers as well as production API

Screenshot_2019-03-06_at_2.35.13_AM

Testing API here

Click on the Authorize button.
Screenshot_2019-03-06_at_2.41.25_AM
Fill in the API key created from carbonhub profile page and click Authorize
image
Now you can try and send any API requests
Screenshot_2019-03-06_at_2.54.05_AM
Response will be showed as a JSON object
image

2nd commit edit

Creating tags for different APIs

Screenshot_2019-03-10_at_3.09.03_AM


3rd commit edit

Documentation added for transport API endpoints

  • /vehicle
  • /flight
  • /trains

image

4th commit edit

Documentation added for Global API endpoints

  • /agriculture
  • /food
  • /land
  • /sector

image

5th commit edit

Documentation added for Emission API endpoints

  • Electricity
  • Airplane
  • Vehicle Fuel
  • Trains
  • Trees
  • Appliances

image

Final doc page looks like this:

image

Edited by Saurabh Thakur

Merge request reports