Petstore: About
The About page (/console/about) is the smallest page in the petstore console: three prose cards and no data. It
is worth reading as the minimal shape of a console page, and because its third card links to live examples of the
REST utility beans.
What the page shows
The three html cards, each wrapped in a jc-prose block:
| Card id | Title | Content |
|---|---|---|
overview | About the petstore | What the sample is, and that its data is seeded the same way on every start |
links | Elsewhere | Links to /petstore/api (the REST API and its Swagger page), /petstore-ui (the React app) and the petstore docs |
beans | REST utility beans | Links to three bean endpoints, shown against the Pet bean |
The bean endpoints live under /console/about/beans and each returns one utility bean:
| Endpoint | Bean |
|---|---|
/console/about/beans/BeanDescription | BeanDescription, the properties of the Pet class |
/console/about/beans/Hyperlink | Hyperlink, a link back to /console/about |
/console/about/beans/SeeOtherRoot | SeeOtherRoot, a redirect to the servlet root |
Template
<@page tab="about">
<@card id="overview" title="About the petstore">
<div class="jc-prose">
<p>The petstore is Apache Juneau's sample application and its console regression suite. ...</p>
</div>
</@card>
<@card id="links" title="Elsewhere">
...
</@page>
Builder twin
return PageSpec.create().tab("about")
.html("overview", "About the petstore", """
<div class="jc-prose">
<p>The petstore is Apache Juneau's sample application and its console regression suite. ...</p>
</div>""")
.html("links", "Elsewhere", "...")
.html("beans", "REST utility beans", "...");
Source: AboutRest in juneau-petstore/juneau-petstore-core/src/main/java/org/apache/juneau/petstore/console/;
AboutPageBuilders.about in .../console/pages/; about.ftlh under .../console/templates/.
Tests: AboutRest_Test.