Commit graph

183 commits

Author SHA1 Message Date
Ivan Lazar Miljenovic
4f8df0ebe2 Make sure code blocks are indented in markdown documentation
This relies on the behaviour of pandoc, and as such may not apply to
other Markdown renderers.

Before this change, you would have something like:

> - Example: `application/json`
>
> ```javascript
> "HELLO, HASKELLER"
> ```

When converting this to HTML, PDF, etc. the code block is _not_
contained within the bullet point.

With this change, the generated markdown looks like:

> - Example: `application/json`
>
>     ```javascript
> "HELLO, HASKELLER"
>     ```

With pandoc at least, this effectively indents the entire code block
to be under the bullet point, which is the intended effect.

Note that the code itself is _not_ indented (which might break other
Markdown renderers) as to do so would require splitting on newlines,
which may have unintended consequences when dealing with generated
values (may contain `\r\n`, etc.).
2017-10-05 16:29:43 +11:00
Ivan Lazar Miljenovic
061bf7a5b1 Add markdown type for text/xml
As it's an alternative mime-type for XML
2017-10-05 16:29:43 +11:00
Alp Mestanogullari
4a6edd7864 Merge pull request #813 from ivan-m/response-content-type
List content type with response examples
2017-09-25 10:38:02 +02:00
Ivan Lazar Miljenovic
81184df3d4 List content type with response examples 2017-09-22 14:12:13 +10:00
Oleg Grenrus
50be3a263b Merge pull request #767 from fierce-katie/docs-combinators
Description and Summary combinators
2017-08-16 15:31:12 +03:00
Ivan Lazar Miljenovic
36029f555f Add Changelog entries for my recent pull requests
As requests by @phadej in #790
2017-08-01 10:33:47 +10:00
Oleg Grenrus
24035ddd85 Merge pull request #790 from ivan-m/query-param-method
Document the type of endpoint a parameter belongs to
2017-07-31 11:41:13 +03:00
Oleg Grenrus
a9bc22d5c9 Merge pull request #788 from ivan-m/header-location
Move location of header information
2017-07-31 11:40:41 +03:00
Ivan Lazar Miljenovic
a2c6ef773d Changed to adding a Headers header
As per request by @phadej
2017-07-31 10:56:01 +10:00
Ivan Lazar Miljenovic
6fc4c735c4 Merge branch 'master' into query-param-method 2017-07-28 22:52:34 +10:00
Oleg Grenrus
53b352711b Merge pull request #787 from ivan-m/doc-auth-lenses
Export authentication-related types/lenses
2017-07-28 15:13:23 +03:00
Ivan Lazar Miljenovic
31578b9bfa Make defAction's documentation visible to Haddock 2017-07-28 16:39:52 +10:00
Ivan Lazar Miljenovic
256ee41254 Update documentation such that it isn't just for GET 2017-07-28 16:39:05 +10:00
Ivan Lazar Miljenovic
89e0a98ac5 Document the type of endpoint a parameter belongs to
Closes #760
2017-07-28 16:31:55 +10:00
Ivan Lazar Miljenovic
7221368cdd Move location of header information
Currently, it appears after the notes, authentication and capture
information... such that if any of those exist, then the list of
header sensitivity will appear to be an item of one of the previous
ones (as they provide Markdown headers).
2017-07-28 15:32:19 +10:00
Ivan Lazar Miljenovic
8e67e26d63 Export authentication-related types/lenses
I'm assuming that they're not meant to be just in `.Internal`.
2017-07-28 15:15:16 +10:00
Oleg Grenrus
213620e56a Fix cabal category 2017-07-25 10:46:57 +03:00
Oleg Grenrus
c46dd1aff9 Bump servant-docs version to 0.11 2017-07-24 10:54:11 +03:00
Ismail
2d271dc127 Fix broken link 2017-07-06 16:43:37 +01:00
ishiy
1ba7624e69 Improve authStr in markdown 2017-06-29 19:01:46 +09: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
Catherine Galkina
ec0431d930 Add instances for new combinators 2017-06-08 18:27:36 +03:00
Oleg Grenrus
ec930ac9a8 Release 0.11 2017-05-24 08:02:56 +03:00
Oleg Grenrus
f0eec498a1 Merge pull request #755 from osa1/fix_reqbody_samples
Don't drop samples in `HasDocs ReqBody` instance
2017-05-19 14:58:06 +03:00
Ömer Sinan Ağacan
d8dd1cb90a Don't drop samples in HasDocs ReqBody instance
As reported in #754, `HasDocs` instance of `ReqBody` was dropping samples other
than the first one. With this patch we show at most `_maxSamples` samples for
`ReqBody`, and also include the sample title in the docs.
2017-05-16 14:19:52 +03:00
David Turner
4b7ffc9461 Add test that EmptyAPI does not generate any docs 2017-05-16 10:29:27 +00:00
David Turner
2cfa71891b Add instance HasDocs EmptyAPI 2017-05-16 10:07:15 +00:00
Ivan Lazar Miljenovic
16a45e0d0f Import correct Servant module in README 2017-04-07 10:33:22 +10:00
Oleg Grenrus
8a3ecb2ebc Classify changelog into breaking and other changes 2017-02-01 09:06:30 +02:00
Oleg Grenrus
736918a694 Tweaks for 0.10 (#694)
* Add Servant category to in-repo packages

* Add version table
2017-01-30 19:12:39 +02:00
Oleg Grenrus
93df8d22df Bump version to 0.10 2017-01-26 20:10:01 +02:00
Oleg Grenrus
fdf86b0e15 Add Semigroup instances 2017-01-19 20:11:54 +02:00
Julian K. Arni
92b1196830 Redundant import fixes 2017-01-16 13:20:39 +02:00
Nickolay Kudasov
a6de4ba123 Remove IsIn from servant-docs 2017-01-16 13:20:39 +02:00
Julian K. Arni
4fd31a60fb Bump version.
To 0.9.1.1
2016-10-27 13:25:27 +02:00
Julian K. Arni
9e809a0756 Bump version.
To 0.9.1.
2016-10-26 17:35:57 +02:00
Julian K. Arni
3ddf225cec Bump version.
To 0.9.0.1.
2016-10-09 22:52:49 +02:00
Sönke Hahn
bc1a3e7faa bump version 2016-09-17 11:47:57 -04:00
Julian Arni
29af0bbdf9 Merge pull request #585 from axman6/axman6/get-headers-581
Replace use of ToByteString with HttpApiData for GetHeaders
2016-09-06 20:59:46 -03:00
Julian K. Arni
bf824a3889 Bump version to 0.8.1 2016-09-02 13:09:47 -03:00
Alex Mason
5bef76ed03 Remove all use of bytestring-conversion 2016-09-02 23:27:37 +10:00
Arian van Putten
c5dcff12d0 Add dummy docs instancE 2016-07-11 14:47:05 +01:00
Jonathan Lange
ed702f5927 servant-docs support for CaptureAll 2016-07-11 14:47:05 +01:00
Sönke Hahn
8eb412ff23 bump version 2016-07-10 17:21:36 +02: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
5effdfdbbb Rename type variables 'layout' and 'sublayout' to 'api' 2016-07-03 22:46:46 +08:00
Sönke Hahn
d8a4cce691 version bump 2016-05-11 12:09:25 +08:00
Julian K. Arni
7174f5185d Changelog updates for GHC 8.0 support. 2016-05-10 22:45:29 +02:00
Oleg Grenrus
008f2434ee Add -Wno-redundant-constraints 2016-05-10 19:09:59 +03:00
Sönke Hahn
e0216781b0 set the homepage to readthedocs 2016-04-22 14:12:21 +08:00
Sönke Hahn
b26bbfccda travis: enable -Wall -Werror 2016-04-21 13:06:10 +08:00
Sönke Hahn
718ca10589 update changelogs for release 2016-04-15 18:35:17 +08:00
Sönke Hahn
ab6131d733 version bump 2016-04-15 18:35:17 +08:00
Luke Cycon
b84016e191 Sort out this changelog situation 2016-04-11 21:54:04 -07:00
Luke Cycon
353c1798e1 Update some docs and the changelogs 2016-04-11 11:19:18 -07:00
Sönke Hahn
c2c9bef571 version bump 2016-04-07 18:24:29 +08:00
Sönke Hahn
14a8139cbe version bump 2016-04-04 16:22:11 +08:00
Julian K. Arni
101e138a4b Cut 0.5 in changelogs 2016-03-19 13:26:13 +01:00
aaron levin
60a536382f Update CHANGELOG for basic authentication support 2016-03-08 23:13:05 +01:00
aaron levin
f13c61956c Add authentication support to servant-docs 2016-03-08 23:13:05 +01: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
Julian K. Arni
be36e5b313 Change copyright to servant contributors 2016-01-20 16:58:29 +01:00
Sönke Hahn
ac930ef198 ComprehensiveAPI: add some comments (and minor tweaks) 2016-01-18 20:06:45 +01:00
Sönke Hahn
efd12053af servant-docs: add .ghci 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
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
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