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

Commit d36be87

Browse files
committed
docs regen
1 parent f1cb743 commit d36be87

File tree

2 files changed

+125
-32
lines changed

2 files changed

+125
-32
lines changed

docs/index.html

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ <h1>Spring Auto REST Docs</h1>
464464
<ul class="sectlevel2">
465465
<li><a href="#paging">Paging support</a></li>
466466
<li><a href="#preprocessors">Preprocessors</a></li>
467+
<li><a href="#deprecation">Deprecation support</a></li>
467468
</ul>
468469
</li>
469470
<li><a href="#contributing">Contributing</a>
@@ -1556,6 +1557,27 @@ <h3 id="preprocessors"><a class="link" href="#preprocessors">Preprocessors</a></
15561557
<p>For a list of standard preprocessors see <a href="https://github.com/spring-projects/spring-restdocs/blob/master/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/Preprocessors.java">Preprocessors</a>.</p>
15571558
</div>
15581559
</div>
1560+
<div class="sect2">
1561+
<h3 id="deprecation"><a class="link" href="#deprecation">Deprecation support</a></h3>
1562+
<div class="paragraph">
1563+
<p>Endpoint or field will be marked as deprecated if at least one of these is present:</p>
1564+
</div>
1565+
<div class="ulist">
1566+
<ul>
1567+
<li>
1568+
<p>method / field is annotated with <code>@Deprecated</code></p>
1569+
</li>
1570+
<li>
1571+
<p>method&#8217;s / field&#8217;s Javadoc has <code>@deprecated</code> tag</p>
1572+
</li>
1573+
</ul>
1574+
</div>
1575+
<div class="paragraph">
1576+
<p>The deprecation is only visible when using <a href="#snippets-section">Section</a> approach. Then it will be shown in the title (also visible in
1577+
TOC) and description. Field&#8217;s deprecation is shown in description column of request/response table.
1578+
See how it looks in the <a href="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/spring-auto-restdocs-example/generated-docs/index.html#resources-item-resource-test-clone-item">example project</a>.</p>
1579+
</div>
1580+
</div>
15591581
</div>
15601582
</div>
15611583
<div class="sect1">
@@ -1637,7 +1659,7 @@ <h4 id="contributing-building-build"><a class="link" href="#contributing-buildin
16371659
</div>
16381660
<div id="footer">
16391661
<div id="footer-text">
1640-
Last updated 2017-10-31 14:21:24 CET
1662+
Last updated 2017-11-02 10:44:00 CET
16411663
</div>
16421664
</div>
16431665
<link rel="stylesheet" href="highlight/styles/github.min.css">

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

Lines changed: 102 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ <h1>Example API Documentation</h1>
448448
<li><a href="#resources-item-resource-test-process-all-items">2.8. Process All Items</a></li>
449449
<li><a href="#resources-item-resource-test-process-single-item">2.9. Process One Item</a></li>
450450
<li><a href="#resources-item-resource-test-validate-metadata">2.10. Validate Metadata</a></li>
451+
<li><a href="#resources-item-resource-test-clone-item">2.11. Clone Item (deprecated)</a></li>
451452
</ul>
452453
</li>
453454
</ul>
@@ -1116,7 +1117,7 @@ <h4 id="_example_request"><a class="anchor" href="#_example_request"></a><a clas
11161117
<div class="content">
11171118
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items' -i -X POST \
11181119
-H 'Content-Type: application/json' \
1119-
-H 'Authorization: Bearer e1f691fa-23dc-4da1-8700-522fc9620010' \
1120+
-H 'Authorization: Bearer f6c4621b-bf20-4c4c-9d69-6710a70b0a3b' \
11201121
-d '{"description":"Hot News"}'</code></pre>
11211122
</div>
11221123
</div>
@@ -1351,7 +1352,7 @@ <h4 id="_example_request_2"><a class="anchor" href="#_example_request_2"></a><a
13511352
<div class="content">
13521353
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X PUT \
13531354
-H 'Content-Type: application/json' \
1354-
-H 'Authorization: Bearer e1f691fa-23dc-4da1-8700-522fc9620010' \
1355+
-H 'Authorization: Bearer f6c4621b-bf20-4c4c-9d69-6710a70b0a3b' \
13551356
-d '{"description":"Hot News"}'</code></pre>
13561357
</div>
13571358
</div>
@@ -1454,7 +1455,7 @@ <h4 id="_example_request_3"><a class="anchor" href="#_example_request_3"></a><a
14541455
<div class="listingblock">
14551456
<div class="content">
14561457
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/1' -i -X DELETE \
1457-
-H 'Authorization: Bearer e1f691fa-23dc-4da1-8700-522fc9620010'</code></pre>
1458+
-H 'Authorization: Bearer f6c4621b-bf20-4c4c-9d69-6710a70b0a3b'</code></pre>
14581459
</div>
14591460
</div>
14601461
</div>
@@ -1934,14 +1935,14 @@ <h4 id="_example_response_5"><a class="anchor" href="#_example_response_5"></a><
19341935
"pageSize" : 20
19351936
},
19361937
"total" : 1,
1937-
"totalPages" : 1,
19381938
"totalElements" : 1,
1939+
"totalPages" : 1,
19391940
"last" : true,
19401941
"size" : 20,
19411942
"number" : 0,
1942-
"sort" : null,
1943+
"numberOfElements" : 1,
19431944
"first" : true,
1944-
"numberOfElements" : 1
1945+
"sort" : null
19451946
}</code></pre>
19461947
</div>
19471948
</div>
@@ -2235,30 +2236,9 @@ <h4 id="_path_parameters_9"><a class="anchor" href="#_path_parameters_9"></a><a
22352236
</div>
22362237
<div class="sect3">
22372238
<h4 id="_query_parameters_8"><a class="anchor" href="#_query_parameters_8"></a><a class="link" href="#_query_parameters_8">2.10.3. Query parameters</a></h4>
2238-
<table class="tableblock frame-all grid-all spread">
2239-
<colgroup>
2240-
<col style="width: 25%;">
2241-
<col style="width: 25%;">
2242-
<col style="width: 25%;">
2243-
<col style="width: 25%;">
2244-
</colgroup>
2245-
<thead>
2246-
<tr>
2247-
<th class="tableblock halign-left valign-top">Parameter</th>
2248-
<th class="tableblock halign-left valign-top">Type</th>
2249-
<th class="tableblock halign-left valign-top">Optional</th>
2250-
<th class="tableblock halign-left valign-top">Description</th>
2251-
</tr>
2252-
</thead>
2253-
<tbody>
2254-
<tr>
2255-
<td class="tableblock halign-left valign-top"><p class="tableblock">lala</p></td>
2256-
<td class="tableblock halign-left valign-top"><p class="tableblock">Array[String]</p></td>
2257-
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
2258-
<td class="tableblock halign-left valign-top"></td>
2259-
</tr>
2260-
</tbody>
2261-
</table>
2239+
<div class="paragraph">
2240+
<p>No parameters.</p>
2241+
</div>
22622242
</div>
22632243
<div class="sect3">
22642244
<h4 id="_request_fields_10"><a class="anchor" href="#_request_fields_10"></a><a class="link" href="#_request_fields_10">2.10.4. Request fields</a></h4>
@@ -2330,12 +2310,103 @@ <h4 id="_example_response_8"><a class="anchor" href="#_example_response_8"></a><
23302310
</div>
23312311
</div>
23322312
</div>
2313+
<div class="sect2">
2314+
<h3 id="resources-item-resource-test-clone-item"><a class="anchor" href="#resources-item-resource-test-clone-item"></a><a class="link" href="#resources-item-resource-test-clone-item">2.11. Clone Item (deprecated)</a></h3>
2315+
<div class="paragraph">
2316+
<p><code>POST /items/cloneItem</code></p>
2317+
</div>
2318+
<div class="paragraph">
2319+
<p><strong>Deprecated.</strong> Create a new item instead.</p>
2320+
</div>
2321+
<div class="paragraph">
2322+
<p>Clones an item.</p>
2323+
</div>
2324+
<div class="paragraph">
2325+
<p>An example of deprecation.</p>
2326+
</div>
2327+
<div class="sect3">
2328+
<h4 id="_authorization_11"><a class="anchor" href="#_authorization_11"></a><a class="link" href="#_authorization_11">2.11.1. Authorization</a></h4>
2329+
<div class="paragraph">
2330+
<p>OAuth2: Resource is public.</p>
2331+
</div>
2332+
</div>
2333+
<div class="sect3">
2334+
<h4 id="_path_parameters_10"><a class="anchor" href="#_path_parameters_10"></a><a class="link" href="#_path_parameters_10">2.11.2. Path parameters</a></h4>
2335+
<div class="paragraph">
2336+
<p>No parameters.</p>
2337+
</div>
2338+
</div>
2339+
<div class="sect3">
2340+
<h4 id="_query_parameters_9"><a class="anchor" href="#_query_parameters_9"></a><a class="link" href="#_query_parameters_9">2.11.3. Query parameters</a></h4>
2341+
<div class="paragraph">
2342+
<p>No parameters.</p>
2343+
</div>
2344+
</div>
2345+
<div class="sect3">
2346+
<h4 id="_request_fields_11"><a class="anchor" href="#_request_fields_11"></a><a class="link" href="#_request_fields_11">2.11.4. Request fields</a></h4>
2347+
<table class="tableblock frame-all grid-all spread">
2348+
<colgroup>
2349+
<col style="width: 25%;">
2350+
<col style="width: 25%;">
2351+
<col style="width: 25%;">
2352+
<col style="width: 25%;">
2353+
</colgroup>
2354+
<thead>
2355+
<tr>
2356+
<th class="tableblock halign-left valign-top">Path</th>
2357+
<th class="tableblock halign-left valign-top">Type</th>
2358+
<th class="tableblock halign-left valign-top">Optional</th>
2359+
<th class="tableblock halign-left valign-top">Description</th>
2360+
</tr>
2361+
</thead>
2362+
<tbody>
2363+
<tr>
2364+
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
2365+
<td class="tableblock halign-left valign-top"><p class="tableblock">String</p></td>
2366+
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
2367+
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Deprecated.</strong>
2368+
</p><p class="tableblock">New item&#8217;s name.</p></td>
2369+
</tr>
2370+
</tbody>
2371+
</table>
2372+
</div>
2373+
<div class="sect3">
2374+
<h4 id="_response_fields_11"><a class="anchor" href="#_response_fields_11"></a><a class="link" href="#_response_fields_11">2.11.5. Response fields</a></h4>
2375+
<div class="paragraph">
2376+
<p>No response body.</p>
2377+
</div>
2378+
</div>
2379+
<div class="sect3">
2380+
<h4 id="_example_request_9"><a class="anchor" href="#_example_request_9"></a><a class="link" href="#_example_request_9">2.11.6. Example request</a></h4>
2381+
<div class="listingblock">
2382+
<div class="content">
2383+
<pre class="highlightjs highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/items/cloneItem' -i -X POST \
2384+
-H 'Content-Type: application/json' \
2385+
-d '{ "name": "xyz" }'</code></pre>
2386+
</div>
2387+
</div>
2388+
</div>
2389+
<div class="sect3">
2390+
<h4 id="_example_response_9"><a class="anchor" href="#_example_response_9"></a><a class="link" href="#_example_response_9">2.11.7. Example response</a></h4>
2391+
<div class="listingblock">
2392+
<div class="content">
2393+
<pre class="highlightjs highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
2394+
X-Content-Type-Options: nosniff
2395+
X-XSS-Protection: 1; mode=block
2396+
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
2397+
Pragma: no-cache
2398+
Expires: 0
2399+
X-Frame-Options: DENY</code></pre>
2400+
</div>
2401+
</div>
2402+
</div>
2403+
</div>
23332404
</div>
23342405
</div>
23352406
</div>
23362407
<div id="footer">
23372408
<div id="footer-text">
2338-
Last updated 2017-10-31 14:20:12 CET
2409+
Last updated 2017-11-02 10:03:56 CET
23392410
</div>
23402411
</div>
23412412
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css">

0 commit comments

Comments
 (0)