mirror of
https://github.com/robindhole/sfg-restdocs-example.git
synced 2025-03-15 23:29:55 +00:00
adding maven config
This commit is contained in:
parent
d6a96f8498
commit
a8b37662e5
30
pom.xml
30
pom.xml
@ -89,6 +89,11 @@
|
|||||||
<artifactId>mockito-junit-jupiter</artifactId>
|
<artifactId>mockito-junit-jupiter</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.restdocs</groupId>
|
||||||
|
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -121,6 +126,31 @@
|
|||||||
</compilerArgs>
|
</compilerArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.asciidoctor</groupId>
|
||||||
|
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||||
|
<version>1.5.3</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-docs</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>process-asciidoc</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<backend>html</backend>
|
||||||
|
<doctype>book</doctype>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.restdocs</groupId>
|
||||||
|
<artifactId>spring-restdocs-asciidoctor</artifactId>
|
||||||
|
<version>${spring-restdocs.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
29
src/main/asciidoc/index.adoc
Normal file
29
src/main/asciidoc/index.adoc
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
= SFG Brewery Order Service Docs
|
||||||
|
John Thompson;
|
||||||
|
:doctype: book
|
||||||
|
:icons: font
|
||||||
|
:source-highlighter: highlightjs
|
||||||
|
|
||||||
|
Sample application demonstrating how to use Spring REST Docs with JUnit 5.
|
||||||
|
|
||||||
|
`BeerOrderControllerTest` makes a call to a very simple service and produces three
|
||||||
|
documentation snippets.
|
||||||
|
|
||||||
|
One showing how to make a request using cURL:
|
||||||
|
|
||||||
|
include::{snippets}/orders/curl-request.adoc[]
|
||||||
|
|
||||||
|
One showing the HTTP request:
|
||||||
|
|
||||||
|
include::{snippets}/orders/http-request.adoc[]
|
||||||
|
|
||||||
|
And one showing the HTTP response:
|
||||||
|
|
||||||
|
include::{snippets}/orders/http-response.adoc[]
|
||||||
|
|
||||||
|
Response Body:
|
||||||
|
include::{snippets}/orders/response-body.adoc[]
|
||||||
|
|
||||||
|
|
||||||
|
Response Fields:
|
||||||
|
include::{snippets}/orders/response-fields.adoc[]
|
Loading…
x
Reference in New Issue
Block a user