Tired of writing documentation for your library? This Concordion plugin can help!
- Never again miss API changes in your documentation!
- Include real code output in your documentation! No more "copy and paste from some old version"!
- Embed code (Groovy) as part of the specification that gets executed in the tests!
- Syntax highlighting by highlight.js
- xhtml and Markdown!
To enable extensions use the annotation @Extensions(ExecutableSpecExtension.class)
.
<dependency>
<groupId>org.concordion</groupId>
<artifactId>concordion-api-documentation-extension</artifactId>
<version>0.0.4</version>
<type>pom</type>
</dependency>
compile 'org.concordion:concordion-api-documentation-extension:0.0.4'
Browse the tests for examples. Here are the appetizers!
```groovy
import ExecutableSpecExtension
System.out.println("Namespace: " + ExecutableSpecExtension.NAMESPACE);
System.out.println("OUT 1");
System.err.println("ERR 1");
System.out.println("OUT 2");
System.err.println("ERR 2");
```
@RunWith(ConcordionRunner.class)
@Extensions(ExecutableSpecExtension)
class ExecutableSpecReturnsValuesMarkdownTest {
// no code needed for this
}
```groovy result:#returnValue
return 7*7
```
This script returns [49]( - "?=#returnValue") (this check is verified as part of the specification)!
```groovy
xxxCompiler error;
System.out.println("We should never get here!");
```
```groovy run:no
xxxCompiler error;
System.out.println("We should never get here!");
```
``` shell
total 0
drwxr-xr-x@ 3 root wheel 102 Nov 25 2016 ..
drwxr-xr-x@ 5 jens staff 170 Aug 10 15:35 .
drwx------@ 9 jens staff 306 Aug 10 16:42 demo
```
The base skeleton (e.g. build system) has been copied from https://github.com/concordion/concordion-input-style-extension-demo