# 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:** [2016年三月27日 17:15 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:** 2

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [2016年三月27日 21:37 UTC](https://meta.discourse.org/t/swagger-wadl-or-similar-for-the-rest-api/41623/2 "2016-03-27T21:37:09Z")

</div>

> [@erkist](#):
>
> I know @fantasticfears has an embryo of a Swagger definition on Github, which he posted about here: [https://meta.discourse.org/t/a-community-effort-to-improve-discourses-documentation/29129/18](https://meta.discourse.org/t/a-community-effort-to-improve-discourses-documentation/29129/18) but as far as I can see it only describes which calls are available, not what they return. I’d like to generate a complete strongly typed library.

I didn’t improve the Swagger definition since then. But the team maintains a `discourse_api` gem which is the so called client.

> [@Use the Discourse API ruby gem](https://meta.discourse.org/t/using-the-discourse-api-ruby-gem/17587):
>
> So you want to use [Discourse API](https://meta.discourse.org/t/discourse-api-documentation/22706)? Great! Let’s get started. Set up Discourse development environment Set up Discourse development environment using our [Windows](https://meta.discourse.org/t/install-discourse-on-windows-for-development/75149), [macOS](https://meta.discourse.org/t/install-discourse-on-macos-for-development/15772/) or [Ubuntu](https://meta.discourse.org/t/install-discourse-on-ubuntu-or-debian-for-development/14727/) guide. Clone Discourse API Gem Now that you have set up Discourse development environment, you should already have Git and Ruby installed on your system. You can install Discourse API gem by running following command from console: git clone https://github.com/discourse/discourse\_api.git ~/discourse\_api Alternatively…

> [@Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706):
>
> Discourse API Please view the Discourse API Documentation site for detailed info: [https://docs.discourse.org](https://docs.discourse.org)information_source Authentication API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below. The only API endpoints that continue to support credentials in query parameters are requests to…

---

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