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

Commit 9ab996a

Browse files
authored
Upgrade to Spring REST Docs 1.2.3 (#177)
1 parent ff60bb2 commit 9ab996a

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ cache:
1313
- $HOME/.gradle/caches/
1414
- $HOME/.gradle/wrapper/
1515
before_install:
16-
- mvn install:install-file -Dfile=lib/spring-restdocs-core-1.2.2.RELEASE-test.jar
17-
-DgroupId=org.springframework.restdocs -DartifactId=spring-restdocs-core -Dversion=1.2.2.RELEASE
16+
- mvn install:install-file -Dfile=lib/spring-restdocs-core-1.2.3.RELEASE-test.jar
17+
-DgroupId=org.springframework.restdocs -DartifactId=spring-restdocs-core -Dversion=1.2.3.RELEASE
1818
-Dpackaging=jar -Dclassifier=test
1919
script:
2020
- mvn install -B -V

docs/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ <h3 id="gettingstarted-requirements"><a class="link" href="#gettingstarted-requi
563563
<p>Java 7</p>
564564
</li>
565565
<li>
566-
<p>Spring REST Docs 1.2.2.RELEASE (see <a href="http://docs.spring.io/spring-restdocs/docs/1.2.2.RELEASE/reference/html5/">documentation</a>)</p>
566+
<p>Spring REST Docs 1.2.3.RELEASE (see <a href="http://docs.spring.io/spring-restdocs/docs/1.2.3.RELEASE/reference/html5/">documentation</a>)</p>
567567
</li>
568568
<li>
569569
<p>Jackson has to be used for creating and parsing JSON</p>
@@ -576,7 +576,7 @@ <h3 id="gettingstarted-usage"><a class="link" href="#gettingstarted-usage">Usage
576576
<div class="olist arabic">
577577
<ol class="arabic">
578578
<li>
579-
<p>Setup project for <a href="http://docs.spring.io/spring-restdocs/docs/1.2.2.RELEASE/reference/html5/#getting-started">Spring REST Docs</a></p>
579+
<p>Setup project for <a href="http://docs.spring.io/spring-restdocs/docs/1.2.3.RELEASE/reference/html5/#getting-started">Spring REST Docs</a></p>
580580
</li>
581581
<li>
582582
<p>Additional configuration for this extension:</p>
@@ -1397,10 +1397,10 @@ <h3 id="snippets-custom"><a class="link" href="#snippets-custom">Custom snippet<
13971397
<h3 id="snippets-customization"><a class="link" href="#snippets-customization">Snippet customization</a></h3>
13981398
<div class="paragraph">
13991399
<p>Provide your own template in <code>org/springframework/restdocs/templates/asciidoctor</code> (or <code>markdown</code>) package of your resources.
1400-
You can override <a href="https://github.com/spring-projects/spring-restdocs/tree/v1.2.2.RELEASE/spring-restdocs-core/src/main/resources/org/springframework/restdocs/templates">REST Docs templates</a>
1400+
You can override <a href="https://github.com/spring-projects/spring-restdocs/tree/v1.2.3.RELEASE/spring-restdocs-core/src/main/resources/org/springframework/restdocs/templates">REST Docs templates</a>
14011401
and <a href="https://github.com/ScaCap/spring-auto-restdocs/tree/master/spring-auto-restdocs-core/src/main/resources/org/springframework/restdocs/templates">Auto REST Docs templates</a>.
14021402
Important is to omit <code>default-</code> part from the template name so that the resolution algorithm will prefer this custom template.
1403-
See also <a href="http://docs.spring.io/spring-restdocs/docs/1.2.2.RELEASE/reference/html5/#documenting-your-api-customizing-snippets">original documentation</a> for additional details.</p>
1403+
See also <a href="http://docs.spring.io/spring-restdocs/docs/1.2.3.RELEASE/reference/html5/#documenting-your-api-customizing-snippets">original documentation</a> for additional details.</p>
14041404
</div>
14051405
</div>
14061406
</div>
@@ -1480,7 +1480,7 @@ <h3 id="constraints-custom"><a class="link" href="#constraints-custom">Custom co
14801480
Each description is a property where the key is the full class name of the annotation suffixed with <code>.description</code>.
14811481
The value is the description and can contain placeholders for annotation methods,
14821482
e.g. <code>${value}</code> to get the content of <code>value()</code>.
1483-
For more details, see original documentation of <a href="http://docs.spring.io/spring-restdocs/docs/1.2.2.RELEASE/reference/html5/#documenting-your-api-constraints-describing">here</a>.</p>
1483+
For more details, see original documentation of <a href="http://docs.spring.io/spring-restdocs/docs/1.2.3.RELEASE/reference/html5/#documenting-your-api-constraints-describing">here</a>.</p>
14841484
</div>
14851485
<div class="paragraph">
14861486
<p>Example for the constraint annotation <code>myproject.constraints.OneOf</code>:</p>
@@ -1625,7 +1625,7 @@ <h3 id="paging"><a class="link" href="#paging">Paging support</a></h3>
16251625
<p>Paging support in an endpoint is automatically recognized if request handler method contains <code>Pageable</code> parameter
16261626
and response is of type <code>Page</code>. This is then mentioned in request and response snippets by linking
16271627
to common section explaining the details of supported paging parameters/fields.
1628-
This section has to be created manally and must be tagged as <code>[[overview-pagination]]</code>.
1628+
This section has to be created manually and must be tagged as <code>[[overview-pagination]]</code>.
16291629
See example project for <a href="https://github.com/ScaCap/spring-auto-restdocs/blob/master/spring-auto-restdocs-example/src/main/asciidoc/index.adoc#overview-pagination">paging section</a> template.</p>
16301630
</div>
16311631
</div>
@@ -1686,9 +1686,9 @@ <h4 id="contributing-installing-testjar"><a class="link" href="#contributing-ins
16861686
<div class="listingblock">
16871687
<div class="title">Bash</div>
16881688
<div class="content">
1689-
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">mvn install:install-file -Dfile=lib/spring-restdocs-core-1.2.2.RELEASE-test.jar \
1689+
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">mvn install:install-file -Dfile=lib/spring-restdocs-core-1.2.3.RELEASE-test.jar \
16901690
-DgroupId=org.springframework.restdocs -DartifactId=spring-restdocs-core \
1691-
-Dversion=1.2.2.RELEASE -Dpackaging=test-jar -Dclassifier=test</code></pre>
1691+
-Dversion=1.2.3.RELEASE -Dpackaging=test-jar -Dclassifier=test</code></pre>
16921692
</div>
16931693
</div>
16941694
</div>
@@ -1699,7 +1699,7 @@ <h4 id="contributing-building-testjar"><a class="link" href="#contributing-build
16991699
but if you ever want to upgrade the version of Spring REST Docs in this project this step has to be done.</p>
17001700
</div>
17011701
<div class="paragraph">
1702-
<p>We use version 1.2.2.RELEASE of Spring REST Docs in this example.</p>
1702+
<p>We use version 1.2.3.RELEASE of Spring REST Docs in this example.</p>
17031703
</div>
17041704
<div class="paragraph">
17051705
<p>You find the currently required version in <code>pom.xml</code>:</p>
@@ -1710,7 +1710,7 @@ <h4 id="contributing-building-testjar"><a class="link" href="#contributing-build
17101710
<pre class="highlightjs highlight"><code class="language-xml" data-lang="xml">&lt;dependency&gt;
17111711
&lt;groupId&gt;org.springframework.restdocs&lt;/groupId&gt;
17121712
&lt;artifactId&gt;spring-restdocs-core&lt;/artifactId&gt;
1713-
&lt;version&gt;1.2.2.RELEASE&lt;/version&gt;
1713+
&lt;version&gt;1.2.3.RELEASE&lt;/version&gt;
17141714
&lt;classifier&gt;test&lt;/classifier&gt;
17151715
&lt;scope&gt;test&lt;/scope&gt;
17161716
&lt;/dependency&gt;</code></pre>
@@ -1725,13 +1725,13 @@ <h4 id="contributing-building-testjar"><a class="link" href="#contributing-build
17251725
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">git clone git@github.com:spring-projects/spring-restdocs.git
17261726
cd spring-restdocs
17271727
git fetch --tags
1728-
git checkout tags/v1.2.2.RELEASE
1728+
git checkout tags/v1.2.3.RELEASE
17291729
./gradlew build</code></pre>
17301730
</div>
17311731
</div>
17321732
<div class="paragraph">
17331733
<p>Afterwards the test JAR is located at
1734-
<code>spring-restdocs/spring-restdocs-core/build/libs/spring-restdocs-core-1.2.2.RELEASE-test.jar</code>
1734+
<code>spring-restdocs/spring-restdocs-core/build/libs/spring-restdocs-core-1.2.3.RELEASE-test.jar</code>
17351735
and has to be installed with the Maven command shown in the section above.</p>
17361736
</div>
17371737
</div>
@@ -1750,7 +1750,7 @@ <h4 id="contributing-building-build"><a class="link" href="#contributing-buildin
17501750
</div>
17511751
<div id="footer">
17521752
<div id="footer-text">
1753-
Last updated 2017-11-04 17:46:45 GMT
1753+
Last updated 2017-12-01 21:41:24 CET
17541754
</div>
17551755
</div>
17561756
<link rel="stylesheet" href="highlight/styles/github.min.css">
203 KB
Binary file not shown.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<java.version>1.7</java.version>
5757
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5858
<snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory>
59-
<spring-restdocs.version>1.2.2.RELEASE</spring-restdocs.version>
59+
<spring-restdocs.version>1.2.3.RELEASE</spring-restdocs.version>
6060
</properties>
6161

6262
<build>

spring-auto-restdocs-example/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext {
3-
springBootVersion = "1.5.8.RELEASE"
3+
springBootVersion = "1.5.9.RELEASE"
44
}
55
repositories {
66
jcenter()
@@ -51,8 +51,8 @@ dependencies {
5151
exclude(module: "commons-logging")
5252
}
5353
testCompile "com.jayway.jsonpath:json-path-assert"
54-
testCompile "org.springframework.restdocs:spring-restdocs-core:1.2.2.RELEASE"
55-
testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:1.2.2.RELEASE"
54+
testCompile "org.springframework.restdocs:spring-restdocs-core:1.2.3.RELEASE"
55+
testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:1.2.3.RELEASE"
5656
compileOnly "org.projectlombok:lombok"
5757
jsondoclet "capital.scalable:spring-auto-restdocs-json-doclet:$version"
5858
}

spring-auto-restdocs-example/generated-docs/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ <h4 id="_example_request"><a class="anchor" href="#_example_request"></a><a clas
11171117
<div class="content">
11181118
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items' -i -X POST \
11191119
-H 'Content-Type: application/json' \
1120-
-H 'Authorization: Bearer 024eccb9-bbe3-448f-b6ea-804db7e3f1c0' \
1120+
-H 'Authorization: Bearer a771d0c0-a03b-48ee-9511-f33193a506c9' \
11211121
-d '{"description":"Hot News"}'</code></pre>
11221122
</div>
11231123
</div>
@@ -1352,7 +1352,7 @@ <h4 id="_example_request_2"><a class="anchor" href="#_example_request_2"></a><a
13521352
<div class="content">
13531353
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X PUT \
13541354
-H 'Content-Type: application/json' \
1355-
-H 'Authorization: Bearer 024eccb9-bbe3-448f-b6ea-804db7e3f1c0' \
1355+
-H 'Authorization: Bearer a771d0c0-a03b-48ee-9511-f33193a506c9' \
13561356
-d '{"description":"Hot News"}'</code></pre>
13571357
</div>
13581358
</div>
@@ -1455,7 +1455,7 @@ <h4 id="_example_request_3"><a class="anchor" href="#_example_request_3"></a><a
14551455
<div class="listingblock">
14561456
<div class="content">
14571457
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X DELETE \
1458-
-H 'Authorization: Bearer 024eccb9-bbe3-448f-b6ea-804db7e3f1c0'</code></pre>
1458+
-H 'Authorization: Bearer a771d0c0-a03b-48ee-9511-f33193a506c9'</code></pre>
14591459
</div>
14601460
</div>
14611461
</div>
@@ -1935,9 +1935,9 @@ <h4 id="_example_response_5"><a class="anchor" href="#_example_response_5"></a><
19351935
"offset" : 0
19361936
},
19371937
"total" : 1,
1938+
"totalPages" : 1,
19381939
"totalElements" : 1,
19391940
"last" : true,
1940-
"totalPages" : 1,
19411941
"sort" : null,
19421942
"first" : true,
19431943
"numberOfElements" : 1,
@@ -2406,7 +2406,7 @@ <h4 id="_example_response_9"><a class="anchor" href="#_example_response_9"></a><
24062406
</div>
24072407
<div id="footer">
24082408
<div id="footer-text">
2409-
Last updated 2017-11-02 20:52:09 GMT
2409+
Last updated 2017-11-02 01:44:08 CET
24102410
</div>
24112411
</div>
24122412
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css">

spring-auto-restdocs-example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.springframework.boot</groupId>
99
<artifactId>spring-boot-starter-parent</artifactId>
10-
<version>1.5.8.RELEASE</version>
10+
<version>1.5.9.RELEASE</version>
1111
<relativePath/>
1212
</parent>
1313

@@ -23,7 +23,7 @@
2323
<java.version>1.7</java.version>
2424
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2525
<start-class>capital.scalable.restdocs.example.Application</start-class>
26-
<spring-restdocs.version>1.2.2.RELEASE</spring-restdocs.version>
26+
<spring-restdocs.version>1.2.3.RELEASE</spring-restdocs.version>
2727
<spring-auto-restdocs.version>1.0.11-SNAPSHOT</spring-auto-restdocs.version>
2828
</properties>
2929

0 commit comments

Comments
 (0)