mirror of
https://github.com/typeable/servant-swagger-ui.git
synced 2024-09-11 06:25:28 +03:00
Screenshot
This commit is contained in:
parent
88e0c5a319
commit
d7028b56be
@ -9,4 +9,6 @@
|
||||
|
||||
## Example
|
||||
|
||||
![example screenshot](https://raw.githubusercontent.com/phadej/servant-swagger-ui/master/screenshot.png)
|
||||
|
||||
Check [`example/Main.hs`](https://github.com/phadej/servant-swagger-ui/blob/master/example/Main.hs) for an example.
|
||||
|
@ -61,6 +61,8 @@ instance ToSchema CatName
|
||||
|
||||
type BasicAPI = Get '[PlainText, JSON] Text
|
||||
:<|> "cat" :> Capture ":name" CatName :> Get '[JSON] Cat
|
||||
:<|> "cat2" :> Capture ":name" CatName :> Get '[JSON] Cat
|
||||
:<|> "cat3" :> Capture ":name" CatName :> Get '[JSON] Cat
|
||||
|
||||
type SwaggerSchemaEndpoint = "swagger.js" :> Get '[JSON] Swagger
|
||||
|
||||
@ -82,7 +84,7 @@ type instance IsElem' e API = IsElem e API'
|
||||
-- Implementation
|
||||
server :: Server API
|
||||
server =
|
||||
(return "Hello World" :<|> catEndpoint)
|
||||
(return "Hello World" :<|> catEndpoint :<|> catEndpoint :<|> catEndpoint)
|
||||
:<|> return swaggerDoc
|
||||
:<|> swaggerUIServer
|
||||
where
|
||||
|
@ -30,7 +30,7 @@ dependencies:
|
||||
- swagger2 >=2.0.1 && <2.2
|
||||
- template-haskell >=2.9 && <2.12
|
||||
- text >=1.2.0.6 && <1.3
|
||||
- wai-app-static >=3.0.1.1 && <3.2
|
||||
- wai-app-static >=3.0.1.1 && <3.2
|
||||
|
||||
library:
|
||||
source-dirs: src
|
||||
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
@ -84,11 +84,11 @@ library
|
||||
, servant >=0.4.4.5 && <0.8
|
||||
, servant-blaze >=0.4.4.5 && <0.8
|
||||
, servant-server >=0.4.4.5 && <0.8
|
||||
, servant-swagger >=1.0.3 && <1.1
|
||||
, swagger2 >=2.0.1 && <2.1
|
||||
, servant-swagger >=1.0.3 && <1.2
|
||||
, swagger2 >=2.0.1 && <2.2
|
||||
, template-haskell >=2.9 && <2.12
|
||||
, text >=1.2.0.6 && <1.3
|
||||
, wai-app-static >=3.0.1.1 && <3.2
|
||||
, wai-app-static >=3.0.1.1 && <3.2
|
||||
exposed-modules:
|
||||
Servant.Swagger.UI
|
||||
Servant.Swagger.UI.Internal
|
||||
@ -111,11 +111,11 @@ test-suite example
|
||||
, servant >=0.4.4.5 && <0.8
|
||||
, servant-blaze >=0.4.4.5 && <0.8
|
||||
, servant-server >=0.4.4.5 && <0.8
|
||||
, servant-swagger >=1.0.3 && <1.1
|
||||
, swagger2 >=2.0.1 && <2.1
|
||||
, servant-swagger >=1.0.3 && <1.2
|
||||
, swagger2 >=2.0.1 && <2.2
|
||||
, template-haskell >=2.9 && <2.12
|
||||
, text >=1.2.0.6 && <1.3
|
||||
, wai-app-static >=3.0.1.1 && <3.2
|
||||
, wai-app-static >=3.0.1.1 && <3.2
|
||||
, servant-swagger-ui
|
||||
, servant-server >=0.4.4.5 && <0.8
|
||||
, aeson >=0.8.0.2 && <0.12
|
||||
|
132
stack.yaml
132
stack.yaml
@ -1,134 +1,10 @@
|
||||
resolver: ghc-8.0.1
|
||||
resolver: nightly-2016-05-29
|
||||
packages:
|
||||
- '.'
|
||||
- location:
|
||||
git: https://github.com/phadej/servant-swagger.git
|
||||
commit: a6e2a0fea75ebfc08a8f278062de7a3d4b0943ae
|
||||
commit: 16d428ee320b1afba5146da3e30276d2da760d09
|
||||
extra-dep: true
|
||||
extra-deps:
|
||||
- adjunctions-4.3
|
||||
- aeson-0.11.2.0
|
||||
- aeson-pretty-0.7.2
|
||||
- aeson-qq-0.8.1
|
||||
- ansi-terminal-0.6.2.3
|
||||
- ansi-wl-pprint-0.6.7.3
|
||||
- appar-0.1.4
|
||||
- async-2.1.0
|
||||
- attoparsec-0.13.0.2
|
||||
- auto-update-0.1.4
|
||||
- base-compat-0.9.1
|
||||
- base-orphans-0.5.4
|
||||
- base64-bytestring-1.0.0.1
|
||||
- bifunctors-5.3
|
||||
- blaze-builder-0.4.0.2
|
||||
- blaze-html-0.8.1.1
|
||||
- blaze-markup-0.7.0.3
|
||||
- byteorder-1.0.4
|
||||
- bytestring-builder-0.10.6.0.0
|
||||
- bytestring-conversion-0.3.1
|
||||
- case-insensitive-1.2.0.6
|
||||
- cmdargs-0.10.14
|
||||
- comonad-5
|
||||
- contravariant-1.4
|
||||
- cookie-0.4.2
|
||||
- cpphs-1.20.1
|
||||
- cryptonite-0.15
|
||||
- data-default-class-0.1.0
|
||||
- distributive-0.5.0.2
|
||||
- dlist-0.7.1.2
|
||||
- doctest-0.11.0
|
||||
- double-conversion-2.0.1.0
|
||||
- easy-file-0.2.1
|
||||
- exceptions-0.8.2.1
|
||||
- fail-4.9.0.0
|
||||
- fast-logger-2.4.6
|
||||
- file-embed-0.0.10
|
||||
- free-4.12.4
|
||||
- ghc-paths-0.1.0.9
|
||||
- Glob-0.7.5
|
||||
- hashable-1.2.4.0
|
||||
- haskell-src-exts-1.17.1
|
||||
- haskell-src-meta-0.6.0.14
|
||||
- hex-0.1.2
|
||||
- hspec-2.2.3
|
||||
- hspec-core-2.2.3
|
||||
- hspec-discover-2.2.3
|
||||
- hspec-expectations-0.7.2
|
||||
- http-api-data-0.2.2
|
||||
- http-date-0.0.6.1
|
||||
- http-media-0.6.3
|
||||
- http-types-0.9
|
||||
- http2-1.6.0
|
||||
- HUnit-1.3.1.1
|
||||
- iproute-1.7.0
|
||||
- kan-extensions-5.0.1
|
||||
- lens-4.14
|
||||
- lifted-base-0.2.3.6
|
||||
- memory-0.13
|
||||
- mime-types-0.1.0.7
|
||||
- mmorph-1.0.6
|
||||
- monad-control-1.0.1.0
|
||||
- mtl-2.2.1
|
||||
- network-2.6.2.1
|
||||
- network-uri-2.6.1.0
|
||||
- old-locale-1.0.0.7
|
||||
- old-time-1.1.0.3
|
||||
- optparse-applicative-0.12.1.0
|
||||
- parallel-3.2.1.0
|
||||
- parsec-3.1.11
|
||||
- polyparse-1.12
|
||||
- prelude-extras-0.4.0.3
|
||||
- primitive-0.6.1.0
|
||||
- profunctors-5.2
|
||||
- psqueues-0.2.2.1
|
||||
- QuickCheck-2.8.2
|
||||
- quickcheck-io-0.1.2
|
||||
- random-1.1
|
||||
- reflection-2.1.2
|
||||
- resourcet-1.1.7.4
|
||||
- safe-0.3.9
|
||||
- scientific-0.3.4.6
|
||||
- semigroupoids-5.0.1
|
||||
- semigroups-0.18.1
|
||||
- servant-0.7.1
|
||||
- servant-blaze-0.7.1
|
||||
- servant-server-0.7.1
|
||||
- setenv-0.1.1.3
|
||||
- simple-sendfile-0.2.23
|
||||
- split-0.2.3.1
|
||||
- StateVar-1.1.0.4
|
||||
- stm-2.4.4.1
|
||||
- streaming-commons-0.1.15.5
|
||||
- string-conversions-0.4
|
||||
- stringsearch-0.3.6.6
|
||||
- swagger2-2.0.2
|
||||
- syb-0.6
|
||||
- system-filepath-0.4.13.4
|
||||
- tagged-0.8.4
|
||||
- text-1.2.2.1
|
||||
- tf-random-0.5
|
||||
- th-expand-syns-0.4.0.0
|
||||
- th-lift-0.7.6
|
||||
- th-lift-instances-0.1.7
|
||||
- th-orphans-0.13.1
|
||||
- th-reify-many-0.1.6
|
||||
- time-locale-compat-0.1.1.1
|
||||
- transformers-base-0.4.4
|
||||
- transformers-compat-0.5.1.4
|
||||
- unix-compat-0.4.1.4
|
||||
- unix-time-0.3.6
|
||||
- unordered-containers-0.2.7.0
|
||||
- utf8-string-1.0.1.1
|
||||
- vault-0.3.0.6
|
||||
- vector-0.11.0.0
|
||||
- void-0.7.1
|
||||
- wai-3.2.1
|
||||
- wai-app-static-3.1.5
|
||||
- wai-extra-3.0.15.1
|
||||
- wai-logger-2.2.7
|
||||
- warp-3.2.6
|
||||
- word8-0.1.2
|
||||
- zlib-0.6.1.1
|
||||
flags:
|
||||
time-locale-compat:
|
||||
old-locale: false
|
||||
- swagger2-2.1
|
||||
flags: {}
|
||||
|
Loading…
Reference in New Issue
Block a user