Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Renamed WebTestClient to WebFlux (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmisur authored Sep 20, 2018
1 parent 30b9ee1 commit 4adcce0
Show file tree
Hide file tree
Showing 23 changed files with 69 additions and 67 deletions.
37 changes: 19 additions & 18 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,24 @@ <h2 id="faq"><a class="link" href="#faq">FAQ</a></h2>
<div class="qlist qanda">
<ol>
<li>
<p><em>Does it work with Spring MVC tests?</em></p>
<p>Yes, it is easy to use in existing or new Spring MVC tests. Take a look at the example.</p>
<p><em>Does it work with Spring Web MVC tests?</em></p>
<p>Yes, take a look at the <a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webmvc">example</a>.</p>
</li>
<li>
<p><em>Does it work with Spring WebTestClient?</em></p>
<p>Yes, but only basic support yet. Take a look at the example.</p>
<p><em>Does it work with Spring WebFlux?</em></p>
<p>Yes, take a look at the <a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webflux">example</a>.</p>
</li>
<li>
<p><em>Is Kotlin supported?</em></p>
<p>Yes, Spring Auto REST Docs 1.0.13 and 2.0.0 introduced Kotlin support.
Instead of the Javadoc Doclet one has to use the Dokka extension
<code>spring-auto-restdocs-dokka-json</code>. The extension is only available as 2.0.x,
but works with both version of Spring Auto REST Docs. Take a look at the
<a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/kotlin-webmvc">example</a>.</p>
</li>
<li>
<p><em>Is Java 9 supported?</em></p>
<p>Yes, see <a href="#getting-started">Getting Started</a>.</p>
</li>
<li>
<p><em>Does it work with REST Assured tests?</em></p>
Expand All @@ -565,17 +577,6 @@ <h2 id="faq"><a class="link" href="#faq">FAQ</a></h2>
One can generate Spring REST Docs snippets and Spring Auto REST Docs snippets out of the same test.
This is demonstrated in the example project.</p>
</li>
<li>
<p><em>Is Kotlin supported?</em></p>
<p>Yes, Spring Auto REST Docs 1.0.13 and 2.0.0 introduced Kotlin support.
Instead of the Javadoc Doclet one has to use the Dokka extension
<code>spring-auto-restdocs-dokka-json</code>. The extension is only available as 2.0.x,
but works with both version of Spring Auto REST Docs.</p>
</li>
<li>
<p><em>Is Java 9 supported?</em></p>
<p>Yes, see <a href="#getting-started">Getting Started</a>.</p>
</li>
</ol>
</div>
</div>
Expand Down Expand Up @@ -886,7 +887,7 @@ <h3 id="gettingstarted-sample"><a class="link" href="#gettingstarted-sample">Sam
<p>This projects includes a
<a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webmvc">Java Web MVC example</a>,
a
<a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webtestclient">Java WebTestClient example</a>
<a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webflux">Java WebFlux example</a>
and a
<a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/kotlin-webmvc">Kotlin Web MVC example</a>
application that demonstrate most features.</p>
Expand All @@ -895,7 +896,7 @@ <h3 id="gettingstarted-sample"><a class="link" href="#gettingstarted-sample">Sam
<p>The generated documentation can be viewed for the
<a href="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webmvc/generated-docs/index.html">Java Web MVC example</a>,
the
<a href="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webtestclient/generated-docs/index.html">Java WebTestClient example</a>
<a href="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webflux/generated-docs/index.html">Java WebFlux example</a>
and the
<a href="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/kotlin-webmvc/generated-docs/index.html">Kotlin Web MCV example</a>.</p>
</div>
Expand Down Expand Up @@ -1951,7 +1952,7 @@ <h4 id="contributing-building-build"><a class="link" href="#contributing-buildin
<div id="footer">
<div id="footer-text">
Version 2.0.2-SNAPSHOT<br>
Last updated 2018-09-20 10:03:44 CEST
Last updated 2018-09-20 10:38:11 CEST
</div>
</div>
<link rel="stylesheet" href="highlight/styles/github.min.css">
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1949,13 +1949,13 @@ <h4 id="_example_response_5"><a class="anchor" href="#_example_response_5"></a><
} ],
"pageable" : "INSTANCE",
"total" : 1,
"totalPages" : 1,
"totalElements" : 1,
"totalPages" : 1,
"last" : true,
"size" : 0,
"number" : 0,
"numberOfElements" : 1,
"first" : true,
"numberOfElements" : 1,
"sort" : {
"orders" : [ ],
"sorted" : false,
Expand Down Expand Up @@ -2433,26 +2433,26 @@ <h3 id="resources-items-get-spring-rest-docs"><a class="anchor" href="#resources
<div class="sect3">
<h4 id="_authorization_12"><a class="anchor" href="#_authorization_12"></a><a class="link" href="#_authorization_12">2.12.1. Authorization</a></h4>
<div class="paragraph">
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webtestclient/target/generated-snippets/item-resource-test/get-item-with-rest-docs/auto-authorization.adoc[]</p>
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webflux/target/generated-snippets/item-resource-test/get-item-with-rest-docs/auto-authorization.adoc[]</p>
</div>
</div>
<div class="sect3">
<h4 id="_path_parameters_11"><a class="anchor" href="#_path_parameters_11"></a><a class="link" href="#_path_parameters_11">2.12.2. Path parameters</a></h4>
<div class="paragraph">
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webtestclient/target/generated-snippets/item-resource-test/get-item-with-rest-docs/path-parameters.adoc[]</p>
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webflux/target/generated-snippets/item-resource-test/get-item-with-rest-docs/path-parameters.adoc[]</p>
</div>
</div>
<div class="sect3">
<h4 id="_response_fields_12"><a class="anchor" href="#_response_fields_12"></a><a class="link" href="#_response_fields_12">2.12.3. Response fields</a></h4>
<div class="paragraph">
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webtestclient/target/generated-snippets/item-resource-test/get-item-with-rest-docs/response-fields.adoc[]</p>
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webflux/target/generated-snippets/item-resource-test/get-item-with-rest-docs/response-fields.adoc[]</p>
</div>
</div>
<div class="sect3">
<h4 id="_example_request_response_3"><a class="anchor" href="#_example_request_response_3"></a><a class="link" href="#_example_request_response_3">2.12.4. Example request/response</a></h4>
<div class="paragraph">
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webtestclient/target/generated-snippets/item-resource-test/get-item-with-rest-docs/curl-request.adoc[]
Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webtestclient/target/generated-snippets/item-resource-test/get-item-with-rest-docs/http-response.adoc[]</p>
<p>Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webflux/target/generated-snippets/item-resource-test/get-item-with-rest-docs/curl-request.adoc[]
Unresolved directive in srd-items.adoc - include::/Users/duro/dev/spring-auto-restdocs/samples/java-webflux/target/generated-snippets/item-resource-test/get-item-with-rest-docs/http-response.adoc[]</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</parent>

<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-java-webtestclient-example</artifactId>
<artifactId>spring-auto-restdocs-java-webflux-example</artifactId>
<version>0.0.1-SNAPSHOT</version>

<name>Spring Auto REST Docs Java WebTestClient Example Project</name>
<name>Spring Auto REST Docs Java WebFlux Example Project</name>
<description>Example project for Spring Auto REST Docs</description>
<url>https://github.com/scacap/spring-auto-restdocs</url>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* #%L
* Spring Auto REST Docs Java WebTestClient Example Project
* Spring Auto REST Docs Java WebFlux Example Project
* %%
* Copyright (C) 2015 - 2018 Scalable Capital GmbH
* %%
Expand Down Expand Up @@ -41,7 +41,7 @@

import java.util.function.Consumer;

import capital.scalable.restdocs.webtestclient.WebTestClientInitializer;
import capital.scalable.restdocs.webflux.WebTestClientInitializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Rule;
Expand Down
10 changes: 5 additions & 5 deletions samples/java-webmvc/generated-docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ <h4 id="_example_request"><a class="anchor" href="#_example_request"></a><a clas
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/items' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer 412a28e4-f983-4b65-ace7-c287b1f34e33' \
-H 'Authorization: Bearer 46ab9c29-3e36-449c-bb8e-269196b13e4d' \
-d '{"description":"Hot News"}'</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1382,7 +1382,7 @@ <h4 id="_example_request_2"><a class="anchor" href="#_example_request_2"></a><a
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer 412a28e4-f983-4b65-ace7-c287b1f34e33' \
-H 'Authorization: Bearer 46ab9c29-3e36-449c-bb8e-269196b13e4d' \
-d '{"description":"Hot News"}'</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1488,7 +1488,7 @@ <h4 id="_example_request_3"><a class="anchor" href="#_example_request_3"></a><a
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X DELETE \
-H 'Authorization: Bearer 412a28e4-f983-4b65-ace7-c287b1f34e33'</code></pre>
-H 'Authorization: Bearer 46ab9c29-3e36-449c-bb8e-269196b13e4d'</code></pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -1989,13 +1989,13 @@ <h4 id="_example_response_5"><a class="anchor" href="#_example_response_5"></a><
"last" : true,
"size" : 20,
"number" : 0,
"first" : true,
"numberOfElements" : 1,
"sort" : {
"orders" : [ ],
"sorted" : false,
"unsorted" : true
},
"first" : true
}
}</code></pre>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions samples/kotlin-webmvc/generated-docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ <h4 id="_example_request"><a class="anchor" href="#_example_request"></a><a clas
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/items' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer d2329d42-eb9e-4c35-9c6f-08a627c45f0f' \
-H 'Authorization: Bearer e74119bc-d372-4c17-9263-931e0349e8ad' \
-d '{"description":"Hot News"}'</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1367,7 +1367,7 @@ <h4 id="_example_request_2"><a class="anchor" href="#_example_request_2"></a><a
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer d2329d42-eb9e-4c35-9c6f-08a627c45f0f' \
-H 'Authorization: Bearer e74119bc-d372-4c17-9263-931e0349e8ad' \
-d '{"description":"Hot News"}'</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1469,7 +1469,7 @@ <h4 id="_example_request_3"><a class="anchor" href="#_example_request_3"></a><a
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X DELETE \
-H 'Authorization: Bearer d2329d42-eb9e-4c35-9c6f-08a627c45f0f'</code></pre>
-H 'Authorization: Bearer e74119bc-d372-4c17-9263-931e0349e8ad'</code></pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -1957,17 +1957,17 @@ <h4 id="_example_response_5"><a class="anchor" href="#_example_response_5"></a><
"offset" : 0,
"pageSize" : 20,
"pageNumber" : 0,
"unpaged" : false,
"paged" : true
"paged" : true,
"unpaged" : false
},
"total" : 1,
"last" : true,
"totalElements" : 1,
"totalPages" : 1,
"totalElements" : 1,
"size" : 20,
"number" : 0,
"numberOfElements" : 1,
"first" : true,
"numberOfElements" : 1,
"sort" : {
"orders" : [ ],
"sorted" : false,
Expand Down
2 changes: 1 addition & 1 deletion samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<modules>
<module>shared</module>
<module>java-webmvc</module>
<module>java-webtestclient</module>
<module>java-webflux</module>
</modules>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
* #L%
*/
package capital.scalable.restdocs.webtestclient;
package capital.scalable.restdocs.webflux;

import capital.scalable.restdocs.constraints.ConstraintReader;
import capital.scalable.restdocs.constraints.ConstraintReaderImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
* #L%
*/
package capital.scalable.restdocs.webtestclient;
package capital.scalable.restdocs.webflux;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down
4 changes: 2 additions & 2 deletions spring-auto-restdocs-docs/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ repositories {
This projects includes a
https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webmvc[Java Web MVC example],
a
https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webtestclient[Java WebTestClient example]
https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webflux[Java WebFlux example]
and a
https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/kotlin-webmvc[Kotlin Web MVC example]
application that demonstrate most features.

The generated documentation can be viewed for the
https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webmvc/generated-docs/index.html[Java Web MVC example],
the
https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webtestclient/generated-docs/index.html[Java WebTestClient example]
https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webflux/generated-docs/index.html[Java WebFlux example]
and the
https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/kotlin-webmvc/generated-docs/index.html[Kotlin Web MCV example].
23 changes: 12 additions & 11 deletions spring-auto-restdocs-docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ you write even less.
== FAQ

[qanda]
Does it work with Spring MVC tests?::
Yes, it is easy to use in existing or new Spring MVC tests. Take a look at the example.
Does it work with Spring WebTestClient?::
Yes, but only basic support yet. Take a look at the example.
Does it work with Spring Web MVC tests?::
Yes, take a look at the https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webmvc[example].
Does it work with Spring WebFlux?::
Yes, take a look at the https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/java-webflux[example].
Is Kotlin supported?::
Yes, Spring Auto REST Docs 1.0.13 and 2.0.0 introduced Kotlin support.
Instead of the Javadoc Doclet one has to use the Dokka extension
`spring-auto-restdocs-dokka-json`. The extension is only available as 2.0.x,
but works with both version of Spring Auto REST Docs. Take a look at the
https://github.com/ScaCap/spring-auto-restdocs/tree/master/samples/kotlin-webmvc[example].
Is Java 9 supported?::
Yes, see <<getting-started,Getting Started>>.
Does it work with REST Assured tests?::
Not yet. We may add support for REST Assured in the future, but your PR is also welcome.
Is Jackson required for automatic field documentation?::
Expand All @@ -58,13 +66,6 @@ Can Spring REST Docs and Spring Auto REST Docs features be combined?::
Yes, this even works in the same test.
One can generate Spring REST Docs snippets and Spring Auto REST Docs snippets out of the same test.
This is demonstrated in the example project.
Is Kotlin supported?::
Yes, Spring Auto REST Docs 1.0.13 and 2.0.0 introduced Kotlin support.
Instead of the Javadoc Doclet one has to use the Dokka extension
`spring-auto-restdocs-dokka-json`. The extension is only available as 2.0.x,
but works with both version of Spring Auto REST Docs.
Is Java 9 supported?::
Yes, see <<getting-started,Getting Started>>.

include::getting-started.adoc[]

Expand Down

0 comments on commit 4adcce0

Please sign in to comment.