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

Commit 1de0c89

Browse files
authored
Update to Spring REST Docs 1.2.2 (#155)
* Update to Spring REST Docs 1.2.2 * Update example to Spring REST Docs 1.2.2 and Spring Boot 1.5.8
1 parent 60d1556 commit 1de0c89

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
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.1.RELEASE-test.jar
17-
-DgroupId=org.springframework.restdocs -DartifactId=spring-restdocs-core -Dversion=1.2.1.RELEASE
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
1818
-Dpackaging=jar -Dclassifier=test
1919
script:
2020
- mvn install -B -V

docs/index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ <h3 id="gettingstarted-requirements"><a class="link" href="#gettingstarted-requi
560560
<p>Java 7</p>
561561
</li>
562562
<li>
563-
<p>Spring REST Docs 1.2.1.RELEASE (see <a href="http://docs.spring.io/spring-restdocs/docs/1.2.1.RELEASE/reference/html5/">documentation</a>)</p>
563+
<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>
564564
</li>
565565
<li>
566566
<p>Jackson has to be used for creating and parsing JSON</p>
@@ -573,7 +573,7 @@ <h3 id="gettingstarted-usage"><a class="link" href="#gettingstarted-usage">Usage
573573
<div class="olist arabic">
574574
<ol class="arabic">
575575
<li>
576-
<p>Setup project for <a href="http://docs.spring.io/spring-restdocs/docs/1.2.1.RELEASE/reference/html5/#getting-started">Spring REST Docs</a></p>
576+
<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>
577577
</li>
578578
<li>
579579
<p>Additional configuration for this extension:</p>
@@ -1305,10 +1305,10 @@ <h3 id="snippets-custom"><a class="link" href="#snippets-custom">Custom snippet<
13051305
<h3 id="snippets-customization"><a class="link" href="#snippets-customization">Snippet customization</a></h3>
13061306
<div class="paragraph">
13071307
<p>Provide your own template in <code>org/springframework/restdocs/templates/asciidoctor</code> (or <code>markdown</code>) package of your resources.
1308-
You can override <a href="https://github.com/spring-projects/spring-restdocs/tree/v1.2.1.RELEASE/spring-restdocs-core/src/main/resources/org/springframework/restdocs/templates">REST Docs templates</a>
1308+
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>
13091309
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>.
13101310
Important is to omit <code>default-</code> part from the template name so that the resolution algorithm will prefer this custom template.
1311-
See also <a href="http://docs.spring.io/spring-restdocs/docs/1.2.1.RELEASE/reference/html5/#documenting-your-api-customizing-snippets">original documentation</a> for additional details.</p>
1311+
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>
13121312
</div>
13131313
</div>
13141314
</div>
@@ -1388,7 +1388,7 @@ <h3 id="constraints-custom"><a class="link" href="#constraints-custom">Custom co
13881388
Each description is a property where the key is the full class name of the annotation suffixed with <code>.description</code>.
13891389
The value is the description and can contain placeholders for annotation methods,
13901390
e.g. <code>${value}</code> to get the content of <code>value()</code>.
1391-
For more details, see original documentation of <a href="http://docs.spring.io/spring-restdocs/docs/1.2.1.RELEASE/reference/html5/#documenting-your-api-constraints-describing">here</a>.</p>
1391+
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>
13921392
</div>
13931393
<div class="paragraph">
13941394
<p>Example for the constraint annotation <code>myproject.constraints.OneOf</code>:</p>
@@ -1573,9 +1573,9 @@ <h4 id="contributing-installing-testjar"><a class="link" href="#contributing-ins
15731573
<div class="listingblock">
15741574
<div class="title">Bash</div>
15751575
<div class="content">
1576-
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">mvn install:install-file -Dfile=lib/spring-restdocs-core-1.2.1.RELEASE-test.jar \
1576+
<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 \
15771577
-DgroupId=org.springframework.restdocs -DartifactId=spring-restdocs-core \
1578-
-Dversion=1.2.1.RELEASE -Dpackaging=test-jar -Dclassifier=test</code></pre>
1578+
-Dversion=1.2.2.RELEASE -Dpackaging=test-jar -Dclassifier=test</code></pre>
15791579
</div>
15801580
</div>
15811581
</div>
@@ -1586,7 +1586,7 @@ <h4 id="contributing-building-testjar"><a class="link" href="#contributing-build
15861586
but if you ever want to upgrade the version of Spring REST Docs in this project this step has to be done.</p>
15871587
</div>
15881588
<div class="paragraph">
1589-
<p>We use version 1.2.1.RELEASE of Spring REST Docs in this example.</p>
1589+
<p>We use version 1.2.2.RELEASE of Spring REST Docs in this example.</p>
15901590
</div>
15911591
<div class="paragraph">
15921592
<p>You find the currently required version in <code>pom.xml</code>:</p>
@@ -1597,7 +1597,7 @@ <h4 id="contributing-building-testjar"><a class="link" href="#contributing-build
15971597
<pre class="highlightjs highlight"><code class="language-xml" data-lang="xml">&lt;dependency&gt;
15981598
&lt;groupId&gt;org.springframework.restdocs&lt;/groupId&gt;
15991599
&lt;artifactId&gt;spring-restdocs-core&lt;/artifactId&gt;
1600-
&lt;version&gt;1.2.1.RELEASE&lt;/version&gt;
1600+
&lt;version&gt;1.2.2.RELEASE&lt;/version&gt;
16011601
&lt;classifier&gt;test&lt;/classifier&gt;
16021602
&lt;scope&gt;test&lt;/scope&gt;
16031603
&lt;/dependency&gt;</code></pre>
@@ -1612,13 +1612,13 @@ <h4 id="contributing-building-testjar"><a class="link" href="#contributing-build
16121612
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">git clone git@github.com:spring-projects/spring-restdocs.git
16131613
cd spring-restdocs
16141614
git fetch --tags
1615-
git checkout tags/v1.2.1.RELEASE
1615+
git checkout tags/v1.2.2.RELEASE
16161616
./gradlew build</code></pre>
16171617
</div>
16181618
</div>
16191619
<div class="paragraph">
16201620
<p>Afterwards the test JAR is located at
1621-
<code>spring-restdocs/spring-restdocs-core/build/libs/spring-restdocs-core-1.2.1.RELEASE-test.jar</code>
1621+
<code>spring-restdocs/spring-restdocs-core/build/libs/spring-restdocs-core-1.2.2.RELEASE-test.jar</code>
16221622
and has to be installed with the Maven command shown in the section above.</p>
16231623
</div>
16241624
</div>
@@ -1637,7 +1637,7 @@ <h4 id="contributing-building-build"><a class="link" href="#contributing-buildin
16371637
</div>
16381638
<div id="footer">
16391639
<div id="footer-text">
1640-
Last updated 2017-10-23 13:03:37 CEST
1640+
Last updated 2017-10-30 09:01:48 CET
16411641
</div>
16421642
</div>
16431643
<link rel="stylesheet" href="highlight/styles/github.min.css">
199 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.1.RELEASE</spring-restdocs.version>
59+
<spring-restdocs.version>1.2.2.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.3.RELEASE"
3+
springBootVersion = "1.5.8.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.1.RELEASE"
55-
testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:1.2.1.RELEASE"
54+
testCompile "org.springframework.restdocs:spring-restdocs-core:1.2.2.RELEASE"
55+
testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:1.2.2.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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ <h4 id="_example_request"><a class="anchor" href="#_example_request"></a><a clas
10991099
<div class="content">
11001100
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items' -i -X POST \
11011101
-H 'Content-Type: application/json' \
1102-
-H 'Authorization: Bearer 96cee481-3e57-4307-b4d4-3e368972668e' \
1102+
-H 'Authorization: Bearer cc34a7a1-b5b2-48f8-8272-c3000623e47b' \
11031103
-d '{"description":"Hot News"}'</code></pre>
11041104
</div>
11051105
</div>
@@ -1328,7 +1328,7 @@ <h4 id="_example_request_2"><a class="anchor" href="#_example_request_2"></a><a
13281328
<div class="content">
13291329
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X PUT \
13301330
-H 'Content-Type: application/json' \
1331-
-H 'Authorization: Bearer 96cee481-3e57-4307-b4d4-3e368972668e' \
1331+
-H 'Authorization: Bearer cc34a7a1-b5b2-48f8-8272-c3000623e47b' \
13321332
-d '{"description":"Hot News"}'</code></pre>
13331333
</div>
13341334
</div>
@@ -1430,7 +1430,7 @@ <h4 id="_example_request_3"><a class="anchor" href="#_example_request_3"></a><a
14301430
<div class="listingblock">
14311431
<div class="content">
14321432
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X DELETE \
1433-
-H 'Authorization: Bearer 96cee481-3e57-4307-b4d4-3e368972668e'</code></pre>
1433+
-H 'Authorization: Bearer cc34a7a1-b5b2-48f8-8272-c3000623e47b'</code></pre>
14341434
</div>
14351435
</div>
14361436
</div>
@@ -1890,19 +1890,19 @@ <h4 id="_example_response_5"><a class="anchor" href="#_example_response_5"></a><
18901890
"page" : 0,
18911891
"size" : 20,
18921892
"sort" : null,
1893-
"offset" : 0,
18941893
"pageNumber" : 0,
1895-
"pageSize" : 20
1894+
"pageSize" : 20,
1895+
"offset" : 0
18961896
},
18971897
"total" : 1,
1898-
"totalPages" : 1,
18991898
"totalElements" : 1,
19001899
"last" : true,
1901-
"size" : 20,
1902-
"number" : 0,
1900+
"totalPages" : 1,
19031901
"sort" : null,
1902+
"first" : true,
19041903
"numberOfElements" : 1,
1905-
"first" : true
1904+
"size" : 20,
1905+
"number" : 0
19061906
}</code></pre>
19071907
</div>
19081908
</div>
@@ -2275,7 +2275,7 @@ <h4 id="_example_response_8"><a class="anchor" href="#_example_response_8"></a><
22752275
</div>
22762276
<div id="footer">
22772277
<div id="footer-text">
2278-
Last updated 2017-09-09 15:54:35 CEST
2278+
Last updated 2017-10-28 15:42:38 CEST
22792279
</div>
22802280
</div>
22812281
<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.6.RELEASE</version>
10+
<version>1.5.8.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.1.RELEASE</spring-restdocs.version>
26+
<spring-restdocs.version>1.2.2.RELEASE</spring-restdocs.version>
2727
<spring-auto-restdocs.version>1.0.10-SNAPSHOT</spring-auto-restdocs.version>
2828
</properties>
2929

0 commit comments

Comments
 (0)