# Swagger, WADL or similar for the REST API?

**URL:** <https://meta.discourse.org/t/swagger-wadl-or-similar-for-the-rest-api/41623>\
**Category:** Development\
**Created:** [Março 27, 2016, 5:15pm UTC](https://meta.discourse.org/t/swagger-wadl-or-similar-for-the-rest-api/41623 "2016-03-27T17:15:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![erkist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erkist/32/53325_2.png) [@erkist](https://meta.discourse.org/u/erkist)\
**Post date:** [Março 29, 2016, 3:47pm UTC](https://meta.discourse.org/t/swagger-wadl-or-similar-for-the-rest-api/41623/3 "2016-03-29T15:47:30Z")

</div>

> [@fantasticfears](#):
>
> But the team maintains a discourse\_api gem which is the so called client.

I’m not a particularly clever person, but from what I can see, that gem does not contain any information about what data is returned. Instead it relies on the API users _somehow_ knowing what data is returned, which brings me back to my original problem of not having enough information to generate a strongly typed API.

Since my original post I’ve been playing around with Swagger a bit, and current-best-thinking is as follows:

1. Use the source code of Discourse (not discourse\_api) to get an idea about which data types are used in responses, and what data they share.
2. Use discourse\_api, the API documentation post and the Swagger specification created by @fantasticfears to get an idea about which requests exists, and what they do
3. Write a complete Swagger specification including output data that can be used to generate a client in all languages supported by [http://editor.swagger.io/](http://editor.swagger.io/) (and share it, of course!)

I’m sort of confident I **can** write such a specification, but I have no idea if I **should**.

So: Does anyone know any reasons doing this would be a bad idea?

---

_[View the full topic](https://meta.discourse.org/t/swagger-wadl-or-similar-for-the-rest-api/41623)._
