Commit graph

26 commits

Author SHA1 Message Date
Andrey Prokopenko
da0c83d318
Add URI fragment as a separate combinator (#1324) 2020-11-18 21:57:20 +03:00
Oleg Grenrus
e229efdf25
Merge pull request #1241 from Simspace/issue-1240
merge documentation from duplicate routes
2019-12-14 22:23:25 +02:00
Samuel Gélineau
0cfd9e6597 test "merge documentation from duplicate routes" 2019-11-07 19:31:29 -05:00
Oleg Grenrus
7bed805cf7 Golden test for comprehensive API docs 2018-11-08 16:32:10 +02:00
Oleg Grenrus
f7bda98b6a Use tasty for servant-docs tests 2018-11-08 15:35:48 +02:00
Oleg Grenrus
7634e08352 Make ComprehensiveAPI part of public API
We cannot simply tweak it, it will break tests of other packages.
Including packages not in this repository.
2018-11-06 13:35:47 +02:00
Oleg Grenrus
cfade67c2f Cleanup pre-GHC-8.0 stuff 2018-07-11 01:39:38 +03:00
Oleg Grenrus
f9bcc15d0b Apply stylish-haskell on all modules 2018-06-29 23:36:39 +03:00
Oleg Grenrus
bc3f61d615 Add Servant.API.Modifiers to servant
Changes Header, ReqBody and QueryParam to take a modifier list.

Resolves https://github.com/haskell-servant/servant/issues/856

ResponseHeader story turns to be somewhat ugly, but it can be made
elegant when https://github.com/haskell-servant/servant/issues/841 is
implemnted, then we can omit HList aka Header Heterogenous List
implementation.

- servant-server changes:

  Writing server side intepretations is quite simple using
  `unfoldRequestArgument`, which makes Header and QueryParam look quite
  the same.

  `ReqBody` cannot be easily made optional with current design (what that
  would mean: No Content-Type Header?), so that dimensions isn't used
  there.

- Add HasLink for all the rest ComprehensiveAPI combinators
- Add 'tricky' Header', QueryParam' endpoints to ComprehensiveAPI
- servant-docs: Quick'n'dirty implementation. Don't use modifiers information (yet).
2018-01-25 09:10:11 +02:00
Catherine Galkina
be0878cdd8 Fix tests for different GHC versions 2017-06-19 18:58:25 +03:00
Catherine Galkina
272e47c3d3 Increase stack size for GHC-7.8.4 tests 2017-06-19 14:59:26 +03:00
David Turner
4b7ffc9461 Add test that EmptyAPI does not generate any docs 2017-05-16 10:29:27 +00:00
Arian van Putten
c5dcff12d0 Add dummy docs instancE 2016-07-11 14:47:05 +01:00
Sönke Hahn
ac930ef198 ComprehensiveAPI: add some comments (and minor tweaks) 2016-01-18 20:06:45 +01:00
Sönke Hahn
e5974ec94d add ComprehensiveAPI to test whether we're missing instances
Some of the combinators are commented atm, because we *are* missing combinators.
2016-01-18 12:28:29 +01:00
Julian K. Arni
641431d5b2 Fix extra quotes in Verb headers for docs.
Fixes #325.
2016-01-15 12:17:48 +01:00
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
Nickolay Kudasov
5aa0e2e733 Fix servant-docs test suite and add Headers to TestApi 2015-09-24 14:02:21 +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
Matthias Fischmann
d9df8f043e Add tests. 2015-09-16 12:42:05 +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
Julian K. Arni
84211d4a0f Fix ToSample issues 2015-05-03 01:50:30 +02:00
Julian K. Arni
88f1a3fc15 prepare merge 2015-04-20 11:19:48 +02:00