git.iko.soy/typeable/servant
on type-errors help sign in
46 lines 2.2 kB history raw
1# servant-swagger
3[![Hackage](https://img.shields.io/hackage/v/servant-swagger.svg)](http://hackage.haskell.org/package/servant-swagger)
4[![Stackage LTS](http://stackage.org/package/servant-swagger/badge/lts)](http://stackage.org/lts/package/servant-swagger)
5[![Stackage Nightly](http://stackage.org/package/servant-swagger/badge/nightly)](http://stackage.org/nightly/package/servant-swagger)
7Swagger 2.0 conforming json for [servant](https://github.com/haskell-servant/servant) APIs.
9![servant-swagger robot](http://s16.postimg.org/rndz1wbyt/servant.png)
11### Motivation
13Swagger is a project used to describe and document RESTful APIs.
14Unlike Servant it is language-agnostic and thus is quite popular among developers
15in different languages. It also exists for a longer time and has more tools to work with.
17This package provides means to generate Swagger specification for a Servant API
18and also to partially test whether API conforms with its specification.
20Generated Swagger specification then can be used for many things such as
21- displaying interactive documentation using [Swagger UI](http://swagger.io/swagger-ui/);
22- generating clients and servers in many languages using [Swagger Codegen](http://swagger.io/swagger-codegen/);
23- and [many others](http://swagger.io/open-source-integrations/).
25### Usage
27Please refer to [haddock documentation](http://hackage.haskell.org/package/servant/servant-swagger).
29Some examples can be found in [`example/` directory](/example).
31### Try it out
33All generated swagger specifications can be interactively viewed on [Swagger Editor](http://editor.swagger.io/).
35Ready-to-use specification can be served as JSON and interactive API documentation
36can be displayed using [Swagger UI](https://github.com/swagger-api/swagger-ui).
38Many Swagger tools, including server and client code generation for many languages, can be found on
39[Swagger's Tools and Integrations page](http://swagger.io/open-source-integrations/).
41### Contributing
43We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.
45Please report bugs via the [github issue tracker](https://github.com/haskell-servant/servant/issues).