Skip to main content

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 idTitleContent
overviewAbout the petstoreWhat the sample is, and that its data is seeded the same way on every start
linksElsewhereLinks to /petstore/api (the REST API and its Swagger page), /petstore-ui (the React app) and the petstore docs
beansREST utility beansLinks to three bean endpoints, shown against the Pet bean

The bean endpoints live under /console/about/beans and each returns one utility bean:

EndpointBean
/console/about/beans/BeanDescriptionBeanDescription, the properties of the Pet class
/console/about/beans/HyperlinkHyperlink, a link back to /console/about
/console/about/beans/SeeOtherRootSeeOtherRoot, 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.

See also​