Browse Source

REST API help reference page: add more examples

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius 4 years ago
parent
commit
ef17081962
1 changed files with 65 additions and 5 deletions
  1. +65
    -5
      bookstore/src/main/resources/templates/apiref.html

+ 65
- 5
bookstore/src/main/resources/templates/apiref.html View File

@ -28,7 +28,7 @@ adminUser = 'admin:admin'
*/--> */-->
<table class="table table-striped"> <table class="table table-striped">
<tbody> <tbody>
<!--/* ------------------------------ */-->
<!--/* START: endpoints ------------------------------ */-->
<tr> <tr>
<th class="apiref-table-right apiref-table-title"> <th class="apiref-table-right apiref-table-title">
<h3 th:text="${#messages.msgOrNull('page.text.apiref.endpoints')} ?: 'page.text.apiref.endpoints'"> <h3 th:text="${#messages.msgOrNull('page.text.apiref.endpoints')} ?: 'page.text.apiref.endpoints'">
@ -104,6 +104,66 @@ adminUser = 'admin:admin'
</td> </td>
</tr> </tr>
<!--/* ------------------------------ */--> <!--/* ------------------------------ */-->
<tr>
<td class="apiref-table-right">
<code th:text="
'curl --include --request GET ' +
${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTUSERS}__} + '/' +
' --user ' + ${adminUser}
">
code placeholder
</code>
</td>
<td>
<a th:text="${#messages.msgOrNull('page.text.apiref.link')} ?: 'page.text.apiref.link'"
th:href="
${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTUSERS}__} + '/'
">
page.text.apiref.link
</a>
</td>
</tr>
<!--/* ------------------------------ */-->
<tr>
<td class="apiref-table-right">
<code th:text="
'curl --include --request GET ' +
${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTROLES}__} + '/' +
' --user ' + ${adminUser}
">
code placeholder
</code>
</td>
<td>
<a th:text="${#messages.msgOrNull('page.text.apiref.link')} ?: 'page.text.apiref.link'"
th:href="
${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTROLES}__} + '/'
">
page.text.apiref.link
</a>
</td>
</tr>
<!--/* ------------------------------ */-->
<tr>
<td class="apiref-table-right">
<code th:text="
'curl --include --request GET ' +
${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTUSERROLES}__} + '/' +
' --user ' + ${adminUser}
">
code placeholder
</code>
</td>
<td>
<a th:text="${#messages.msgOrNull('page.text.apiref.link')} ?: 'page.text.apiref.link'"
th:href="
${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTUSERROLES}__} + '/'
">
page.text.apiref.link
</a>
</td>
</tr>
<!--/* START: examples ------------------------------ */-->
<tr> <tr>
<th class="apiref-table-right apiref-table-title"> <th class="apiref-table-right apiref-table-title">
<h3 th:text="${#messages.msgOrNull('page.text.apiref.examples')} ?: 'page.text.apiref.examples'"> <h3 th:text="${#messages.msgOrNull('page.text.apiref.examples')} ?: 'page.text.apiref.examples'">
@ -235,7 +295,7 @@ adminUser = 'admin:admin'
</a> </a>
</td> </td>
</tr> </tr>
<!--/* ------------------------------ */-->
<!--/* START: get ------------------------------ */-->
<tr> <tr>
<th class="apiref-table-right apiref-table-title"> <th class="apiref-table-right apiref-table-title">
<h3 th:text="${#messages.msgOrNull('page.text.apiref.book.get')} ?: 'page.text.apiref.book.get'"> <h3 th:text="${#messages.msgOrNull('page.text.apiref.book.get')} ?: 'page.text.apiref.book.get'">
@ -268,7 +328,7 @@ adminUser = 'admin:admin'
</a> </a>
</td> </td>
</tr> </tr>
<!--/* ------------------------------ */-->
<!--/* START: add ------------------------------ */-->
<tr> <tr>
<th class="apiref-table-right apiref-table-title"> <th class="apiref-table-right apiref-table-title">
<h3 th:text="${#messages.msgOrNull('page.text.apiref.book.add')} ?: 'page.text.apiref.book.add'"> <h3 th:text="${#messages.msgOrNull('page.text.apiref.book.add')} ?: 'page.text.apiref.book.add'">
@ -355,7 +415,7 @@ adminUser = 'admin:admin'
<small th:text="${#messages.msgOrNull('page.text.apiref.unix.info')} ?: 'page.text.apiref.unix.info'">page.text.apiref.unix.info</small> <small th:text="${#messages.msgOrNull('page.text.apiref.unix.info')} ?: 'page.text.apiref.unix.info'">page.text.apiref.unix.info</small>
</td> </td>
</tr> </tr>
<!--/* ------------------------------ */-->
<!--/* START: edit ------------------------------ */-->
<tr> <tr>
<th class="apiref-table-right apiref-table-title"> <th class="apiref-table-right apiref-table-title">
<h3 th:text="${#messages.msgOrNull('page.text.apiref.book.edit')} ?: 'page.text.apiref.book.edit'"> <h3 th:text="${#messages.msgOrNull('page.text.apiref.book.edit')} ?: 'page.text.apiref.book.edit'">
@ -408,7 +468,7 @@ adminUser = 'admin:admin'
</small> </small>
</td> </td>
</tr> </tr>
<!--/* ------------------------------ */-->
<!--/* START: delete ------------------------------ */-->
<tr> <tr>
<th class="apiref-table-right apiref-table-title"> <th class="apiref-table-right apiref-table-title">
<h3 th:text="${#messages.msgOrNull('page.text.apiref.book.delete')} ?: 'page.text.apiref.book.delete'"> <h3 th:text="${#messages.msgOrNull('page.text.apiref.book.delete')} ?: 'page.text.apiref.book.delete'">


Loading…
Cancel
Save