Andy Wilkinson 404b99b0a4 Avoid problems caused by | characters in table cell content
Previously, a | character in a cell of an Asciidoctor table would
break that table's formatting as it would be interpretted as a
delimiter for the cell. The problem also affects Markdown tables where
the | character is not within backticks.

This commit addresses the problem with Asciidoctor tables by
introducing a JMustache Lambda that escapes | characters by prefixing
them with a backslash.

Unfortunately, a complete solution to the problem when using Markdown
is not as straightforward. Markdown only requires a | character to be
espaced when it is not within backticks. Determing this isn't
straightforward as the text would have to be parsed, taking into
account the possibility of backticks themselves being escaped.
Instead, this commit attempts to avoid the problem in a different way.

The most likely source of a | character is when documenting a
`@Pattern` constraint that uses a | character in its regular
expression. To improve the readability of the regular expression this
commit wraps it in backticks, thereby formatting it in a monospaced
font in both Asciidoctor and Markdown and also avoiding any escaping
problems with the latter.

Closes gh-232
See gh-230
2016-05-24 10:50:32 +01:00
2016-05-05 13:26:20 +01:00
2016-03-09 17:38:04 +00:00
2016-04-04 11:55:52 +01:00
2016-05-05 12:48:23 +01:00
2016-05-05 14:06:12 +01:00
2016-02-02 09:45:37 +00:00
2016-02-02 09:45:37 +00:00
2015-10-15 17:51:17 +01:00
2016-04-04 11:55:52 +01:00
2016-04-04 11:55:52 +01:00

Spring REST Docs Build status

Overview

The primary goal of this project is to make it easy to document RESTful services by combining content that's been hand-written using Asciidoctor with auto-generated examples produced with the Spring MVC Test framework. The result is intended to be an easy-to-read user guide, akin to GitHub's API documentation for example, rather than the fully automated, dense API documentation produced by tools like Swagger.

For a broader introduction see the Documenting RESTful APIs presentation. Both the slides and a video recording are available.

Learning more

To learn more about Spring REST Docs, please consult the reference documentation.

Building from source

You will need Java 7 or later to build Spring REST Docs. It is built using Gradle:

./gradlew build

Contributing

Contributors to this project agree to uphold its code of conduct.

There are several that you can contribute to Spring REST Docs:

Licence

Spring REST Docs is open source software released under the Apache 2.0 license.

Description
No description provided
Readme 6.8 MiB
Languages
Java 98.2%
Groovy 1.3%
Vim Snippet 0.5%