Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haskell-servant/servant-swagger-ui
Provide embedded swagger UI for servant and swagger
https://github.com/haskell-servant/servant-swagger-ui
hacktoberfest haskell
Last synced: 5 days ago
JSON representation
Provide embedded swagger UI for servant and swagger
- Host: GitHub
- URL: https://github.com/haskell-servant/servant-swagger-ui
- Owner: haskell-servant
- Created: 2016-01-31T09:21:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-08T12:36:15.000Z (about 1 year ago)
- Last Synced: 2024-04-25T23:02:16.550Z (9 months ago)
- Topics: hacktoberfest, haskell
- Language: JavaScript
- Homepage:
- Size: 16.8 MB
- Stars: 45
- Watchers: 6
- Forks: 34
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# servant-swagger-ui
*Provide a Swagger UI for your Servant API*
"[Swagger UI](http://swagger.io/swagger-ui/) allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place."
[![Build Status](https://travis-ci.org/phadej/servant-swagger-ui.svg?branch=master)](https://travis-ci.org/phadej/servant-swagger-ui)
[![Hackage](https://img.shields.io/hackage/v/servant-swagger-ui.svg)](http://hackage.haskell.org/package/servant-swagger-ui)
[![Stackage LTS 5](http://stackage.org/package/servant-swagger-ui/badge/lts-5)](http://stackage.org/lts-5/package/servant-swagger-ui)
[![Stackage Nightly](http://stackage.org/package/servant-swagger-ui/badge/nightly)](http://stackage.org/nightly/package/servant-swagger-ui)## Example
![example screenshot](https://raw.githubusercontent.com/haskell-servant/servant-swagger-ui/master/screenshot.png)
Check [`servant-swagger-ui-example/src/Main.hs`](https://github.com/haskell-servant/servant-swagger-ui/blob/master/servant-swagger-ui-example/src/Main.hs) for an example.
## Development
### Updating of bundled swagger-ui version:
- Extract `dist` directory of `swagger-ui` into `swagger-dist-<version>`. Remove the `*.map` files.
- update `extra-source-files` in the `.cabal`
- move `index.html` into `index.html.tmpl`, do the diff, port the changes
- search replace the embbeded directory (in `Servant/Swagger/UI.hs`)
- test it works