Commit Graph

15 Commits

Author SHA1 Message Date
Oleg Grenrus 8058891299 Reformat servant 2018-03-11 17:58:31 +02:00
Oleg Grenrus 3e1748c965 Add description modifier helpers and parametrise Capture 2018-02-15 12:28:42 +02: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 2e59a82d01 Add Description and Summary combinators 2017-06-08 17:35:24 +03:00
David Turner 2c6aca0fc6 Add to ComprehensiveAPI 2017-05-16 10:26:06 +00:00
Sönke Hahn 23493d982d add Raw to ComprehensiveAPI (and add ComprehensiveAPIWithoutRaw) 2016-08-17 23:36:30 +02:00
Arian van Putten b714640110 Add CaptureAll to ComprehensiveAPI 2016-07-11 14:47:05 +01:00
Arian van Putten 05379ed7e3 Replace all occurances of () with NoContent
We use NoContent to signify an empty response nowadays. This commit
replaces all occurences of () with NoContent so that all packages use
the new semantics.
2016-07-10 16:58:59 +02:00
Sönke Hahn 8ef4d4543b renaming: Config -> Context 2016-03-07 23:12:24 +08:00
Sönke Hahn 2176fecfda config: added instances for all interpretations 2016-01-21 17:55:02 +01:00
Sönke Hahn ac930ef198 ComprehensiveAPI: add some comments (and minor tweaks) 2016-01-18 20:06:45 +01:00
Sönke Hahn 14aac5fc9f servant-mock: support for response headers 2016-01-18 19:53:19 +01:00
Sönke Hahn 290e4ef1ba add RemoteHost to ComprehensiveAPI 2016-01-18 12:28:29 +01:00
Sönke Hahn b20b8d9770 add HasClient instance for HttpVersion 2016-01-18 12:28:29 +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