Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-generate an API Explorer for WCF services

Tags:

rest

wcf

If you have ever used the Flickr API, you'll be familiar with their API Explorer. It is an awesome tool, that allows you to view the documentation for each API method, and the killer feature, being the execution of that API method (with a form to populate any request parameters). It even picks up when you are logged in, and completes the authentication part on your behalf. Gowalla has a similar API Explorer that is also really good.

Are there are tools for WCF that will auto-generate such an API Explorer, free or commercial?

Currently, we use Fiddler to build the JSON requests, but I would like to publish these service contracts, and allow potential developers to play around with them via a web based API explorer.

I am aware of the WCF Web HTTP Service Help Page, which I am using (and is awesome), but it is the API Explorer part that I am interested in.

like image 761
Rebecca Avatar asked Sep 08 '11 10:09

Rebecca


1 Answers

You may want to look at I/O Docs - an open-sourced interactive documentation system for RESTful web APIs that any API owner can use to deploy for their own documentation. It runs on Node.js and uses Redis as a data store.

https://github.com/mashery/iodocs

Example: developer.klout.com/iodocs, developer.rottentomatoes.com/iodocs

It uses JSON schema based files to define API endpoints, method and parameters. Based on these JSON files, it generates a client interface that developers can use to learn and explore your API. API calls can be executed directly from the documentation interface, producing formatted responses.

It's Open-sourced, so you can be assured of regular updates and improvements. In fact this past weekend, Brandon West from SendGrid (who use I/O docs to power their documentation), created and open sourced the UI to create/edit the JSON schema files for I/O Docs. So you don't have to manually create the JSON files anymore.

https://github.com/brandonmwest/iodoctor

like image 117
Amit Avatar answered Nov 15 '22 05:11

Amit