Commit graph

65 commits

Author SHA1 Message Date
Julian K. Arni
37afddf3a2 Re-add missing Header instance for docs. 2016-01-11 13:37:20 +01:00
Julian K. Arni
208bcf5986 Use Verb for servant-docs 2016-01-07 13:47:08 +01:00
Julian K. Arni
5909a6df7a Fix rebase issues. 2016-01-07 13:47:08 +01:00
Julian K. Arni
cda8bcf17c Simplify verb combinators.
Create a single 'Verb' combinator with parameters for status code and
        method. Make existing combinators type synonyms of 'Verb'.
2016-01-07 13:47:07 +01:00
Luigy Leon
17fcc25d87 add include header files to extra-source-files 2016-01-04 23:05:05 -05:00
Julian K. Arni
79d4f944a4 less OverlappingInstances noise 2016-01-04 13:09:11 -05:00
Tomasz Mieszkowski
69a4a8d4f6 [servant-docs] Removed redundant imports. 2015-12-20 17:56:11 +01:00
Andrew Noyes
56beed459c Fix broken link 2015-12-18 16:56:37 -08:00
Mitchell Rosen
f1a6a2a151 Move 'pretty' to its own module 2015-12-10 12:27:15 -08:00
Mitchell Rosen
702c2cec7d Add 'pretty' 2015-12-09 18:38:31 -08:00
Simon Hengel
4e53e2083b Use tinc on travis 2015-11-05 09:32:13 +08:00
Andres Loeh
1398d1f5e1 More systematic approach to delayed checks.
This introduces a `Delayed` type in `RoutingApplication.hs` that
contains a handler together with delayed checks. There are several
blocks of delayed checks, so that we can ultimately execute them in the
order we desire.

The process is documented in more detail in `RoutingApplication.hs`.
2015-10-26 16:56:25 +01:00
Julian K. Arni
c22b5d1938 Changelogs for matrix params 2015-10-13 21:46:52 +02:00
Julian K. Arni
ec55f4b981 Remove Matrix params.
For servant-docs, -foreign, -js, and -mock.
2015-10-13 21:37:07 +02:00
Nickolay Kudasov
f0c2284c30 Fix docs for ToSamples 2015-09-24 15:25:58 +03:00
Nickolay Kudasov
479290affd Update changelog 2015-09-24 14:29:27 +03:00
Nickolay Kudasov
5aa0e2e733 Fix servant-docs test suite and add Headers to TestApi 2015-09-24 14:02:21 +03:00
Nickolay Kudasov
0082d2bd2f Remove redundant second argument of ToSample class 2015-09-24 14:00:39 +03:00
Julian K. Arni
965063171b Janitoring 2015-09-23 20:18:52 +02:00
Nickolay Kudasov
350992069f Update changelog 2015-09-21 13:49:26 +03:00
Nickolay Kudasov
42f5795fcc Add DocOptions with maxSamples field
With DocOptions one can limit maximum number of samples.
This is useful for Generic-based instances for recursive data types
(e.g. `[]`). Default options set maxSamples to 5.
2015-09-21 13:36:57 +03:00
Nickolay Kudasov
f96915e85e Add samples helper to define samples without documentation 2015-09-21 12:51:00 +03:00
Nickolay Kudasov
f56a656e65 Fix servant-docs tests 2015-09-21 12:46:21 +03:00
Nickolay Kudasov
8ecf2219ab Add more ToSample instances 2015-09-21 12:02:55 +03:00
Nickolay Kudasov
714e740098 Add some missing comments in Servant.Docs.Internal 2015-09-21 11:58:54 +03:00
Nickolay Kudasov
98af812491 Move toSample method out of ToSample class
toSample method conflicted with default Generics implementation.
2015-09-19 02:27:51 +03:00
Nickolay Kudasov
401b44ac1b Make default ToSample instances productive
The default Generics-based ToSample instance now uses Omega type
to productively produce distinct samples. The previous version
was based on lists and hence left-recursive. This means that with
previous versions the default toSamples for [Bool] would return an
infinite list like this:

[[],[False],[False,False],[False,False,False],...

As you can see it would never produce a list with True in it.
Omega handles this and produces a more diverse output:

[[],[False],[False,False],[True],...

This is still not the best possible case, but to do better we need
to use Omega not only in GToSample, but in ToSample as well since
GToSample uses ToSample instances recursively.
2015-09-19 01:25:26 +03:00
Nickolay Kudasov
c769800adb Add ToSample instances for (), Bool and Ordering
Also remove `instance ToSample ()` from example.
2015-09-19 01:22:28 +03:00
Nickolay Kudasov
a2bc8a0d0d Add ToSample instances for Maybe, Either and [] 2015-09-19 01:21:15 +03:00
Nickolay Kudasov
75999b8211 Replace boileplate ToSample instances for tuples with empty ones
We just use default Generics implementation for tuples now.
2015-09-19 01:19:52 +03:00
Nickolay Kudasov
80f235b986 Add default ToSample implementation for Generics
- introduce an internal `GToSample` class
- introduce internal functions `defaultSample` and `defaultSamples`
- add default signature for `toSamples` to use Generics
- set default `toSamples` implementation to `defaultSamples`
- remove the `MINIMAL` pragma to avoid warnings for empty instances
2015-09-19 01:15:18 +03:00
Matthias Fischmann
99d1402a06 ToSample instances for longer tuples (up to 7). 2015-09-16 12:45:51 +02:00
Matthias Fischmann
d9df8f043e Add tests. 2015-09-16 12:42:05 +02:00
Matthias Fischmann
e5259358db ToSample instances for tuples. 2015-09-16 11:57:29 +02:00
Sönke Hahn
ba918c720f fix for lens-4.13 2015-09-15 22:13:00 +08:00
Jonathan Lange
6a35a0ae7a Remove auto-generated nix files 2015-09-08 20:36:54 +01:00
Jonathan Lange
a265fd31a0 Run of update-nix-files.sh 2015-09-08 20:28:47 +01:00
Julian K. Arni
6eb7add53a stylish haskell changes
And import fix.
2015-08-18 00:07:12 +02:00
Brandon Martin
b40094d01c convenience scripts and nix updates 2015-07-30 08:09:29 -06:00
Julian K. Arni
1c9d5baa99 Bump versions to 0.5 2015-07-27 22:26:49 +02:00
Julian K. Arni
e29acc0825 Make HasDocs instance for :<|> overlappable.
That way it's easier to document that the endpoints on the LHS "fall
        through" to the RHS.
2015-07-14 15:57:36 +02:00
Alp Mestanogullari
f39d57c6b3 add HttpVersion, IsSecure, RemoteHost and Vault combinators with instances for all interpretations (all but the server ones being 'ignore that combinator')
tighter version bounds for network

cleanup

document the new combinators

servant-server: add some tests for HttpVersion, IsSecure, RemoteHost and Vault

update changelogs

address Julian's feedback

remove vault test in servant-server

servant-server tests: -Werror friendly
2015-07-10 14:00:01 +02:00
Philipp Kant
529139eb03 Added test for docsWith.
Make sure that no information is lost when providing additional
information via docsWith. With the current left-biased implementation of
combineAction, this can happen if the function arguments are in the
wrong order.
2015-06-16 22:38:14 +02:00
Philipp Kant
8dc6d9a7d4 servant-docs: Fix docsWith.
When adding extra info using using docsWith, the responses vanished from
the output. This was due to combineAction being left-biased, and
docsWith combining the extra info with the enpoint (in that
order). Flipping combineAction solves this.
2015-06-16 10:58:15 +02:00
Julian K. Arni
0b3291970f Bump to 0.4.1 2015-05-29 16:24:08 +02:00
Alp Mestanogullari
46d48946b0 update examples for servant-docs. fixes #76 2015-05-14 01:01:41 +02:00
Julian K. Arni
690df4d9e0 Consistent version numbering 2015-05-10 14:10:21 +02:00
Julian K. Arni
b81ea9eee2 Bump everything to 0.4 2015-05-09 17:28:52 +02:00
Alp Mestanogullari
b6f7efe8e2 put intro titles at the same level as the endpoints 2015-05-09 16:28:19 +02:00
Alp Mestanogullari
c2211e9534 add missing exports (lenses) to servant-docs's Servant.Docs module 2015-05-09 16:06:11 +02:00