This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new f9b4bde91 New Docusaurus-based documentation tree
f9b4bde91 is described below
commit f9b4bde913231fd5e1d32d436c4d2311afe64d1a
Author: James Bognar <[email protected]>
AuthorDate: Mon Sep 15 12:24:21 2025 -0400
New Docusaurus-based documentation tree
---
juneau-docs-poc/convert-example-headers.js | 153 +++++++++++++++++++++
juneau-docs-poc/docs/topics/01.01.Overview.md | 6 +-
juneau-docs-poc/docs/topics/01.02.Marshalling.md | 40 +-----
juneau-docs-poc/docs/topics/01.04.RestServer.md | 53 +++----
juneau-docs-poc/docs/topics/01.05.RestClient.md | 13 +-
juneau-docs-poc/docs/topics/01.06.Dtos.md | 57 ++++----
juneau-docs-poc/docs/topics/01.07.ConfigFiles.md | 7 +-
.../docs/topics/01.08.FluentAssertions.md | 11 +-
juneau-docs-poc/docs/topics/01.09.GeneralDesign.md | 6 +-
juneau-docs-poc/docs/topics/02.02.Marshallers.md | 8 +-
juneau-docs-poc/docs/topics/02.04.BeanContexts.md | 4 +-
.../docs/topics/02.18.ReadingContinuousStreams.md | 4 +-
.../docs/topics/02.21.02.VarResolvers.md | 4 +-
.../docs/topics/02.22.SimpleVariableLanguage.md | 4 +-
juneau-docs-poc/docs/topics/02.23.Encoders.md | 4 +-
juneau-docs-poc/docs/topics/02.24.03.Json5.md | 4 +-
.../docs/topics/02.24.05.JsonAnnotation.md | 4 +-
juneau-docs-poc/docs/topics/02.24.ObjectTools.md | 28 +++-
.../topics/02.26.04.XmlBeanTypeNameAnnotation.md | 8 +-
.../docs/topics/02.26.05.XmlChildNameAnnotation.md | 4 +-
.../docs/topics/02.26.06.XmlFormatAnnotation.md | 16 ++-
.../docs/topics/02.27.04.HtmlAnnotation.md | 12 +-
.../docs/topics/02.27.06.HtmlDocSerializer.md | 4 +-
juneau-docs-poc/docs/topics/04.03.Atom.md | 2 +-
juneau-docs-poc/docs/topics/05.02.03.JCFObjects.md | 4 +-
juneau-docs-poc/docs/topics/05.02.Overview.md | 4 +-
juneau-docs-poc/docs/topics/05.04.Variables.md | 4 +-
juneau-docs-poc/docs/topics/05.06.Sections.md | 12 +-
juneau-docs-poc/docs/topics/05.10.02.FileStore.md | 4 +-
.../docs/topics/05.10.03.CustomStores.md | 4 +-
juneau-docs-poc/docs/topics/05.10.ConfigImports.md | 8 +-
juneau-docs-poc/docs/topics/05.11.ConfigStores.md | 4 +-
.../docs/topics/05.12.ReadOnlyConfigs.md | 4 +-
.../docs/topics/05.13.ClosingConfigs.md | 4 +-
juneau-docs-poc/docs/topics/06.02.Overview.md | 20 ++-
juneau-docs-poc/docs/topics/07.02.HelperClasses.md | 24 +++-
juneau-docs-poc/docs/topics/07.04.HttpHeaders.md | 20 ++-
juneau-docs-poc/docs/topics/07.05.HttpParts.md | 16 ++-
.../docs/topics/07.06.HttpEntitiesAndResources.md | 4 +-
juneau-docs-poc/docs/topics/07.07.HttpResponses.md | 4 +-
.../docs/topics/08.02.02.ChildResources.md | 4 +-
.../docs/topics/08.02.03.PathVariables.md | 4 +-
juneau-docs-poc/docs/topics/08.02.04.Deployment.md | 2 +-
.../topics/08.03.01.InferredHttpMethodsAndPaths.md | 4 +-
.../docs/topics/08.03.02.JavaMethodParameters.md | 8 +-
.../docs/topics/08.03.03.JavaMethodReturnTypes.md | 12 +-
.../topics/08.03.04.JavaMethodThrowableTypes.md | 4 +-
juneau-docs-poc/docs/topics/08.03.06.Matchers.md | 4 +-
.../docs/topics/08.04.02.HttpPartAnnotations.md | 24 +++-
.../docs/topics/08.04.03.DefaultParts.md | 4 +-
.../docs/topics/08.04.04.RequestBeans.md | 12 +-
.../docs/topics/08.04.06.HttpPartApis.md | 8 +-
.../docs/topics/08.04.RestOpAnnotatedMethods.md | 8 +-
juneau-docs-poc/docs/topics/08.05.HttpParts.md | 4 +-
juneau-docs-poc/docs/topics/08.06.Marshalling.md | 4 +-
.../docs/topics/08.07.HandlingFormPosts.md | 4 +-
juneau-docs-poc/docs/topics/08.08.Guards.md | 8 +-
juneau-docs-poc/docs/topics/08.09.Converters.md | 4 +-
.../docs/topics/08.10.LocalizedMessages.md | 4 +-
juneau-docs-poc/docs/topics/08.11.Encoders.md | 4 +-
.../docs/topics/08.12.ConfigurationFiles.md | 8 +-
juneau-docs-poc/docs/topics/08.13.SvlVariables.md | 4 +-
.../docs/topics/08.15.ClientVersioning.md | 4 +-
.../docs/topics/08.17.02.HtmlWidgets.md | 4 +-
.../docs/topics/08.19.LoggingAndDebugging.md | 4 +-
.../docs/topics/10.01.Juneau-rest-client.md | 12 +-
.../docs/topics/10.02.PojoMarshalling.md | 12 +-
juneau-docs-poc/docs/topics/10.03.RequestParts.md | 8 +-
.../docs/topics/10.04.RequestContent.md | 4 +-
.../docs/topics/10.05.ResponseStatus.md | 12 +-
.../docs/topics/10.06.ResponseHeaders.md | 12 +-
.../docs/topics/10.07.ResponseContent.md | 12 +-
.../docs/topics/10.08.CustomCallHandlers.md | 4 +-
juneau-docs-poc/docs/topics/10.09.01.Remote.md | 24 +++-
.../docs/topics/10.09.02.RemoteMethod.md | 12 +-
juneau-docs-poc/docs/topics/10.09.03.Content.md | 4 +-
juneau-docs-poc/docs/topics/10.09.04.FormData.md | 4 +-
juneau-docs-poc/docs/topics/10.09.05.Query.md | 4 +-
juneau-docs-poc/docs/topics/10.09.06.Header.md | 4 +-
juneau-docs-poc/docs/topics/10.09.07.Path.md | 4 +-
juneau-docs-poc/docs/topics/10.09.08.Request.md | 4 +-
juneau-docs-poc/docs/topics/10.09.09.Response.md | 4 +-
juneau-docs-poc/docs/topics/10.09.Interceptors.md | 4 +-
juneau-docs-poc/docs/topics/10.10.Proxies.md | 8 +-
.../docs/topics/10.11.LoggingAndDebugging.md | 4 +-
.../docs/topics/10.12.CustomizingHttpClient.md | 4 +-
.../docs/topics/10.13.01.AuthenticationBASIC.md | 4 +-
.../docs/topics/10.13.ExtendingRestClient.md | 4 +-
.../docs/topics/11.02.MockRestClient.md | 8 +-
juneau-docs-poc/docs/topics/12.04.Args.md | 8 +-
juneau-docs-poc/docs/topics/12.05.Manifest.md | 8 +-
juneau-docs-poc/docs/topics/13.06.Config.md | 8 +-
juneau-docs-poc/docs/topics/TODO.md | 4 +-
juneau-docs-poc/fix-remaining-examples.js | 64 +++++++++
94 files changed, 733 insertions(+), 285 deletions(-)
diff --git a/juneau-docs-poc/convert-example-headers.js
b/juneau-docs-poc/convert-example-headers.js
new file mode 100644
index 000000000..0df2a0b9f
--- /dev/null
+++ b/juneau-docs-poc/convert-example-headers.js
@@ -0,0 +1,153 @@
+#!/usr/bin/env node
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+const fs = require('fs');
+const path = require('path');
+
+function convertExampleHeaders(content) {
+ let lines = content.split('\n');
+ let converted = [];
+
+ for (let i = 0; i < lines.length; i++) {
+ const currentLine = lines[i];
+ const nextLine = i < lines.length - 1 ? lines[i + 1] : '';
+
+ // Check for ### Example: or ### Examples: headers
+ if (currentLine.match(/^### Examples?:?\s*$/)) {
+ const isPlural = currentLine.includes('Examples');
+ const exampleType = isPlural ? 'Examples' : 'Example';
+
+ // Convert to admonition
+ converted.push(`:::tip ${exampleType}`);
+ converted.push('');
+
+ // Skip the next line if it's blank (common pattern)
+ if (nextLine.trim() === '') {
+ i++; // Skip the blank line
+ }
+
+ // Look ahead to find the end of this example section
+ let j = i + 1;
+ let foundCodeBlocks = 0;
+ let inCodeBlock = false;
+ let exampleContent = [];
+
+ while (j < lines.length) {
+ const line = lines[j];
+
+ // Track code blocks
+ if (line.trim().startsWith('```')) {
+ if (!inCodeBlock) {
+ foundCodeBlocks++;
+ inCodeBlock = true;
+ } else {
+ inCodeBlock = false;
+ }
+ }
+
+ // Stop when we hit another header or significant structural
element
+ if (line.match(/^#{1,6}\s+/) && !inCodeBlock) {
+ break;
+ }
+
+ // Stop when we hit another admonition
+ if (line.match(/^:::(note|tip|info|caution|danger)/) &&
!inCodeBlock) {
+ break;
+ }
+
+ // For single examples, stop after the first complete code
block
+ if (!isPlural && foundCodeBlocks >= 2 && !inCodeBlock) {
+ // Check if the next non-empty line is likely continuing
the example
+ let nextNonEmpty = j + 1;
+ while (nextNonEmpty < lines.length &&
lines[nextNonEmpty].trim() === '') {
+ nextNonEmpty++;
+ }
+
+ if (nextNonEmpty < lines.length) {
+ const nextContent = lines[nextNonEmpty];
+ // If it's a header or admonition, stop here
+ if (nextContent.match(/^#{1,6}\s+/) ||
nextContent.match(/^:::/)) {
+ break;
+ }
+ }
+ }
+
+ exampleContent.push(line);
+ j++;
+ }
+
+ // Add the example content
+ converted.push(...exampleContent);
+ converted.push(':::');
+ converted.push('');
+
+ // Update the main loop counter
+ i = j - 1;
+ } else {
+ converted.push(currentLine);
+ }
+ }
+
+ return converted.join('\n');
+}
+
+function processFile(filePath) {
+ try {
+ console.log(`Processing: ${filePath}`);
+ const content = fs.readFileSync(filePath, 'utf8');
+
+ // Check if file contains example headers to convert
+ if (content.match(/^### Examples?:?\s*$/m)) {
+ const converted = convertExampleHeaders(content);
+ fs.writeFileSync(filePath, converted, 'utf8');
+ console.log(` ✅ Converted example headers in
${path.basename(filePath)}`);
+ } else {
+ console.log(` ⏭️ No example headers found in
${path.basename(filePath)}`);
+ }
+ } catch (error) {
+ console.error(`❌ Error processing ${filePath}:`, error.message);
+ }
+}
+
+function processDirectory(directory) {
+ const files = fs.readdirSync(directory);
+
+ for (const file of files) {
+ const filePath = path.join(directory, file);
+ const stat = fs.statSync(filePath);
+
+ if (stat.isDirectory()) {
+ processDirectory(filePath);
+ } else if (path.extname(filePath) === '.md') {
+ processFile(filePath);
+ }
+ }
+}
+
+function main() {
+ console.log('Converting ### Example and ### Examples headers to admonition
blocks...\n');
+
+ const docsDir = '/Users/james.bognar/git/juneau/juneau-docs-poc/docs';
+
+ if (fs.existsSync(docsDir)) {
+ processDirectory(docsDir);
+ console.log('\n✅ Example header conversion complete!');
+ } else {
+ console.error('❌ docs directory not found');
+ }
+}
+
+if (require.main === module) {
+ main();
+}
diff --git a/juneau-docs-poc/docs/topics/01.01.Overview.md
b/juneau-docs-poc/docs/topics/01.01.Overview.md
index 8e8557561..e17938ea6 100644
--- a/juneau-docs-poc/docs/topics/01.01.Overview.md
+++ b/juneau-docs-poc/docs/topics/01.01.Overview.md
@@ -6,6 +6,7 @@ title: "Overview"
Apache Juneau™ is a single cohesive Java ecosystem for marshalling Java
objects to a wide variety of
language types and creating annotation-based REST end-to-end server and client
APIs.
+
The Juneau ecosystem consists of the following parts:
| Category | Maven Artifacts | Description | Prerequisites |
@@ -36,7 +37,6 @@ The easiest way to pull in the library is through the
following maven dependency
</dependency>
```
-
If you would like to work with the bleeding-edge code, you can access the
`9.0.2-SNAPSHOT`
version through the following repository:
@@ -56,8 +56,7 @@ version through the following repository:
Each of the components are also packaged as stand-alone OSGi modules.
-### Features
-
+:::note Features
- Fast memory-efficient serialization.
- Fast, safe, memory-efficient parsing. Parsers are not susceptible to
deserialization attacks.
- KISS is our mantra! No auto-wiring. No code generation. No dependency
injection. Just add it to your classpath and use it. Extremely simple unit
testing!
@@ -68,3 +67,4 @@ Each of the components are also packaged as stand-alone OSGi
modules.
- Minimal library dependencies making it ideal for use in uber-jars.
- Built on top of Servlet and Apache HttpClient APIs that allow you to use the
newest HTTP/2 features such as request/response multiplexing and server push.
- All modules work with Java 8 through at least 18.
+:::
\ No newline at end of file
diff --git a/juneau-docs-poc/docs/topics/01.02.Marshalling.md
b/juneau-docs-poc/docs/topics/01.02.Marshalling.md
index da164f0a3..5e91f0a97 100644
--- a/juneau-docs-poc/docs/topics/01.02.Marshalling.md
+++ b/juneau-docs-poc/docs/topics/01.02.Marshalling.md
@@ -6,7 +6,7 @@ The juneau-marshall library includes easy-to-use and highly
customizable seriali
a common API. It allows you to marshall Java POJOs directly to and from a
wide variety of language types
without the need for intermediate Document Object Models making them extremely
efficient.
-Supported languages include:
+:::note Supported languages
- JSON
- XML
- HTML
@@ -22,11 +22,11 @@ Supported languages include:
- N-Triple
- Turtle
- N3
+:::
+
-:::note
The marshalling support can be thought of as similar to Jackson except for
support of a wide variety of languages.
Additionally, JSON marshalling is about 20% faster than Jackson yet supports
the same usecases.
-:::
The default serializers can often be used to serialize POJOs in a single line
of code:
@@ -40,7 +40,6 @@ public class Person {
// Produces:
// "{"name":"John Smith","age":21}"
String json = Json.of(new Person());
-
```
Parsing back into POJOs is equally simple for any of the supported languages.
@@ -51,7 +50,6 @@ Language fragments are also supported.
// Parse a JSON object as a bean.
String json = "{\"name\":\"John Smith\","\age\":21}";
Person person = Json.to(json, Person.class);
-
```
Marshalling support is provided for a wide variety of POJO types including:
@@ -63,7 +61,6 @@ Marshalling support is provided for a wide variety of POJO
types including:
:::info See Also
- [TODO: Pojo Categories](TODO.md) for an exhaustive list of categories
supported out-of-the-box.
-
:::
### Serializer/Parser Builders
@@ -94,7 +91,6 @@ JsonSerializer serializer = JsonSerializer
.build();
```
-
Many POJOs such as primitives, beans, collections, arrays, and classes with
various known constructors and methods are serializable out-of-the-box.
[TODO: Swaps](TODO.md) allow you to replace non-serializable objects with
serializable equivalents.
@@ -111,17 +107,16 @@ JsonSerializer serializer = JsonSerializer
CalendarSwap.ISO8601DT.class // Calendars swapped with
ISO8601-compliant strings
)
.build();
-
```
Any POJO that doesn't fit into the category of a
bean/collection/array/primitive and doesn't have a swap
associated with it is converted to simple strings.
+
By default, various instance and static methods and constructors on POJO
classes are automatically detected and supported
for marshalling a POJO to and from a string.
:::info See Also
- [TODO: ](TODO.md) for more information.
-
:::
### Bean Annotations
@@ -137,7 +132,6 @@ public class Address { ... }
// Specify an implementation class for an interface.
@Marshalled(implClass=AutomobileImpl.class)
public interface Automobile { ... }
-
```
As a general rule, any capabilities provided by bean annotations can be
programmatically specified
@@ -146,7 +140,6 @@ that you have access to, or external code where you only
have access to binaries
:::info See Also
- [TODO: Java Beans Support](TODO.md) for more information.
-
:::
### Configuration Annotations
@@ -164,16 +157,15 @@ JsonSerializer serializer = JsonSerializer
.create()
.applyAnnotations(MyAnnotatedClass.class)
.build();
-
```
Config annotations are extensively used in the REST Servlet APIs to configure
how POJOs are marshalled through REST interfaces.
+
Config variables also support embedded variables for resolving settings at
runtime.
```java
// Sort properties depending on value of system property "sortProperties".
@BeanConfig(sortProperties="$S{sortProperties,false}")
-
```
Default values for config settings can be overridden via system properties or
environment variables.
@@ -187,10 +179,8 @@ Bean annotations can also be programmatically attached to
POJOs using config ann
public class MyAnnotatedClass {...}
```
-
:::info See Also
- [TODO: Context Annotations](TODO.md) for more information.
-
:::
### JSON 5 Marshalling
@@ -214,7 +204,6 @@ Map map = JsonMap.of(
);
```
-
```json
// Serialized to standard JSON
{
@@ -227,7 +216,6 @@ Map map = JsonMap.of(
}
```
-
```json
{
foo: 'x1',
@@ -239,7 +227,6 @@ Map map = JsonMap.of(
}
```
-
:::
JSON 5 is still valid Javascript.
@@ -249,12 +236,10 @@ This is particularly useful in cases such as unit testing
where you can easily v
```java
WriterSerializer serializer = Json5Serializer.DEFAULT;
assertString(serializer.toString(myPojo)).is("{foo:'bar',baz:123}");
-
```
:::info See Also
- [TODO: JSON 5](TODO.md) for more information.
-
:::
### UON Marshalling
@@ -284,12 +269,10 @@ This allows POJOs to be converted directly into these
HTTP constructs which is n
)
)
)
-
```
:::info See Also
- [TODO: UON Details](TODO.md) for more information.
-
:::
### OpenAPI Marshalling
@@ -312,7 +295,6 @@ Object value = new long[][]{{1,2,3},{4,5,6},{7,8,9}};
// Produces "1,2,3|4,5,6|7,8,9"
String output = OpenApi.of(schema, value);
-
```
Schema-based serialization and parsing is used heavily in both the server and
client REST APIs with built-in schema
@@ -325,12 +307,10 @@ public void doGet(
@Query(name="myParam", schema=@Schema(min=1, max=32)) int myParam,
@Header("MyHeader", schema=@Schema(pattern="foo.*")) String p2
) {...}
-
```
:::info See Also
- [TODO: OpenAPI Details](TODO.md) for more information.
-
:::
### JsonMap/JsonList
@@ -348,7 +328,6 @@ String myList = JsonList.of("foo", 123, null,
jsonObject).asJson();
// Parse directly from JSON into generic DOMs.
Map myMap = JsonMap.ofJson("{foo:'bar'}");
List myList = JsonList.ofJson("['foo',123,null]");
-
```
These classes provide lots of convenience methods including:
@@ -357,7 +336,6 @@ These classes provide lots of convenience methods including:
:::info See Also
- [TODO: JsonMap and JsonList](TODO.md) for more information.
-
:::
### Serializer and Parser Sets
@@ -391,12 +369,10 @@ ParserSet parserSet = ParserSet
Person person = parserSet
.getParser("text/json")
.parse(myReader, Person.class);
-
```
:::info See Also
- [TODO: SerializerSets and ParserSets](TODO.md) for more information.
-
:::
### SVL Variables
@@ -404,14 +380,13 @@ Person person = parserSet
The [svl](../apidocs/org/apache/juneau/svl.html) package defines an API for a
language called "Simple Variable Language".
In a nutshell, Simple Variable Language (or SVL) is text that contains
variables of the form
"$varName\{varKey\}".
-Variables can be recursively nested within the varKey (e.g.
"$FOO\{$BAR\{xxx\},$BAZ\{xxx\}\}").
-Variables can also return values that themselves contain more variables.
+ - Variables can be recursively nested within the varKey (e.g.
"$FOO\{$BAR\{xxx\},$BAZ\{xxx\}\}").
+ - Variables can also return values that themselves contain more variables.
```java
// Use the default variable resolver to resolve a string that
// contains $S (system property) variables
String myProperty = VarResolver.DEFAULT.resolve("The Java home directory is
$S{java.home}");
-
```
The SVL variables are used widely throughout various annotations defined in
Juneau allowing many features to be configured
@@ -420,5 +395,4 @@ extensible allowing for the addition of new types of
variables.
:::info See Also
- [TODO: Simple Variable Language](TODO.md) for more information.
-
:::
diff --git a/juneau-docs-poc/docs/topics/01.04.RestServer.md
b/juneau-docs-poc/docs/topics/01.04.RestServer.md
index 91791e57d..4c082df26 100644
--- a/juneau-docs-poc/docs/topics/01.04.RestServer.md
+++ b/juneau-docs-poc/docs/topics/01.04.RestServer.md
@@ -2,7 +2,7 @@
title: "REST Server"
---
-### @Rest-Annotated Resources
+### `@Rest`-Annotated Resources
A REST resource is simply a Java class annotated with
[Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html).
The most common case is a class that extends
[BasicRestServlet](../apidocs/org/apache/juneau/rest/servlet/BasicRestServlet.html),
which itself is simply an
@@ -21,8 +21,7 @@ extension of
[HttpServlet](../apidocs/jakarta/servlet/http/HttpServlet.html) whi
"options: servlet:/?method=OPTIONS"
},
aside={
- "",
- " This page shows a resource that simply response with a 'Hello
world!' message",
+ "This page shows a resource that simply response with a 'Hello world!'
message",
"The POJO serialized is a simple String.",
}
)
@@ -44,18 +43,16 @@ http://localhost:10000/helloWorld
- Parsers for request bodies are selected based on the request `Content-Type`
header.
- Serializers for response bodies are selected based on the request `Accept`
header.
-- In this case, it's the
[HtmlDocSerializer](../apidocs/org/apache/juneau/html/HtmlDocSerializer.html)
serializer based on the
-
-browser's default `Accept` header that's asking for HTML.
-REST resource classes and methods can be annotated with configuration
annotations for the serializers and parsers (such as @HtmlConfig and
@BeanConfig shown above).
+- In this case, it's the
[HtmlDocSerializer](../apidocs/org/apache/juneau/html/HtmlDocSerializer.html)
serializer based on the browser's default `Accept` header that's asking for
HTML.
+REST resource classes and methods can be annotated with configuration
annotations for the serializers and parsers (such as `@HtmlConfig` and
`@BeanConfig` shown above).
- Annotations such as the title, summary, and descriptions shown above are
used for auto-generated Swagger UI pages (described later).
### REST Children
Child Resources are REST servlets or objects that are linked to parent
resources through the
[@Rest(children)](../apidocs/org/apache/juneau/rest/annotation/Rest.html#children())
annotation.
-### Example:
+:::tip Example
```java
/** Parent Resource */
@@ -68,7 +65,6 @@ Child Resources are REST servlets or objects that are linked
to parent resources
public MyParentResource extends BasicRestServlet {...}
```
-
```java
/** Child Resource */
@Rest(
@@ -79,14 +75,18 @@ public MyChildResource implements BasicRestObject {
...
}
```
-
+:::
The path of the child resource gets appended to the path of the parent
resource.
So in the example above, the child resource is accessed through the URL
/parent/child.
+
The advantage of using child resources is that they do not need to be declared
in the JEE web.xml
file.
+
Initialization of and access to the child resources occurs through the parent
resource.
+
Children can be nested arbitrary deep to create complex REST interfaces with a
single top-level REST servlet.
+
### Predefined Configuration Interfaces
The servlets in the previous section implemented the
[BasicUniversalConfig](../apidocs/org/apache/juneau/rest/config/BasicUniversalConfig.html)
which simply defines
@@ -96,7 +96,6 @@ a preconfigured set of annotations that get inherited by the
child classes:
/**
* Predefined configuration for a REST resource that supports all languages
* and provides common default configuration values.
-
*/
@Rest(
@@ -135,11 +134,9 @@ a preconfigured set of annotations that get inherited by
the child classes:
public interface BasicUniversalConfig extends DefaultConfig, DefaultHtmlConfig
{}
```
-
```java
/**
* Predefined REST configuration that defines common default values for all
configurations.
-
*/
@Rest(
// Configuration file.
@@ -255,11 +252,9 @@ public interface BasicUniversalConfig extends
DefaultConfig, DefaultHtmlConfig {
public interface DefaultConfig {}
```
-
```java
/**
* Predefined REST configuration that defines common default values the HTML
Doc serializer.
-
*/
@HtmlDocConfig(
@@ -294,10 +289,10 @@ public interface DefaultConfig {}
public interface DefaultHtmlConfig {}
```
-
The [config](../apidocs/org/apache/juneau/rest/config.html) package contains
other basic configurations for use.
Annotations are aggregated from child-to-parent order allowing for these basic
configurations
to be extended and modified, or you can create your own annotations from
scratch.
+
### REST Group Pages
The
[BasicRestServletGroup](../apidocs/org/apache/juneau/rest/servlet/BasicRestServletGroup.html)
class provides a default "router" page for
@@ -307,7 +302,6 @@ The RootResources class in the Samples project is an
example of a router page:
```java
/**
* Sample REST resource showing how to implement a "router" resource page.
-
*/
@Rest(
path="/",
@@ -327,7 +321,6 @@ public class RootResources extends BasicRestServletGroup {
}
```
-
When you bring up this resource in a browser, you see the following that
provides a list
of navigable links to your child resources:
@@ -335,12 +328,11 @@ of navigable links to your child resources:
http://localhost:10000
```
-
### REST Resource Methods
The real power behind the REST server API is the ability to define Java
methods as REST endpoints.
-### Example:
+:::tip Example
```java
@RestPost(path="/pets", guards=AdminGuard.class)
@@ -353,7 +345,7 @@ public Ok addPet(
return Ok.OK;
}
```
-
+:::
Java methods on
[@Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html)-annotated
classes have the following format:
@@ -365,14 +357,11 @@ public method() throws {
}
```
-
The various parts require their own topics to fully appreciate the scope of
abilities but the following is a summary:
- Annotated with
[@RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html).
- Also available:
[@RestGet](../apidocs/org/apache/juneau/rest/annotation/RestGet.html) /
[@RestPut](../apidocs/org/apache/juneau/rest/annotation/RestPut.html) /
[@RestPost](../apidocs/org/apache/juneau/rest/annotation/RestPost.html) /
[@RestDelete](../apidocs/org/apache/juneau/rest/annotation/RestDelete.html).
- Annotation optional if using standard naming conventions (e.g. `getFoo()`
equivalent to `@RestGet(path="/foo")`).
-- Optionally annotated with config annotations such as
[@BeanConfig](../apidocs/org/apache/juneau/annotation/BeanConfig.html) and
[@HtmlDocConfig](../apidocs/org/apache/juneau/html/annotation/HtmlDocConfig.html)
that
-
-customize the behavior of serializers and parsers at the method level.
+- Optionally annotated with config annotations such as
[@BeanConfig](../apidocs/org/apache/juneau/annotation/BeanConfig.html) and
[@HtmlDocConfig](../apidocs/org/apache/juneau/html/annotation/HtmlDocConfig.html)
that customize the behavior of serializers and parsers at the method level.
- Returned object gets serialized as the HTTP response body.
- Typically a POJO serialized based on
[Accept](../apidocs/org/apache/juneau/http/header/Accept.html) request header.
- Support for raw values such as `Readers` and `InputStreams` (among others).
@@ -407,9 +396,11 @@ When the servlet init() method is called, it triggers the
code to find and proce
annotations on that class and all child classes.
These get constructed into a
[RestContext](../apidocs/org/apache/juneau/rest/RestContext.html) object that
holds all the configuration
information about your resource in a read-only object.
+
Most developers are not going to be using the RestServlet class itself, and
instead will
extend from one of the preconfigured default servlets such as
[BasicRestServlet](../apidocs/org/apache/juneau/rest/servlet/BasicRestServlet.html)
and
[BasicRestServletGroup](../apidocs/org/apache/juneau/rest/servlet/BasicRestServletGroup.html)
which provides universal language support, basic instrumentation, and
auto-generated Swagger UI.
+
### Deploying in Spring Boot
The
[BasicSpringRestServlet](../apidocs/org/apache/juneau/rest/springboot/BasicSpringRestServlet.html)
class is typically entry point for your REST resources
@@ -419,11 +410,12 @@ when working within a Spring Boot environment. It
extends from
- Various capabilities within the REST Server library (e.g. logging,
instrumentation, call handling, API extensions) can be defined via
Spring beans and automatically pulled into the framework.
+
Most developers are not going to be using the RestServlet class itself, and
instead will
extend from one of the preconfigured default servlets such as
[BasicSpringRestServlet](../apidocs/org/apache/juneau/rest/springboot/BasicSpringRestServlet.html)
and
[BasicSpringRestServletGroup](../apidocs/org/apache/juneau/rest/springboot/BasicSpringRestServletGroup.html)
that have the same capabilites as the
[BasicRestServlet](../apidocs/org/apache/juneau/rest/servlet/BasicRestServlet.html)
and
[BasicRestServletGroup](../apidocs/org/apache/juneau/rest/servlet/BasicRestServletGroup.html)
counterparts.
-### Example configuration file:
+:::tip Example configuration file
```java
@Configuration
@@ -434,7 +426,6 @@ public class MySpringConfiguration {
* Note that this must extend from SpringRestServlet so that child
resources can be
* resolved as Spring beans.
* All REST objects are attached to this bean using the
[Rest#children()](../apidocs/org/apache/juneau/rest/annotation/Rest.html#children())
annotation.
-
*/
@Bean
public RootResources getRootResources() {
@@ -443,7 +434,6 @@ public class MySpringConfiguration {
/**
* Optionally return the HelloWorldResource object as an injectable bean.
-
*/
@Bean
public HelloWorldResource getHelloWorldResource() {
@@ -452,7 +442,6 @@ public class MySpringConfiguration {
/**
* Map our servlet to a path.
-
*/
@Bean
public ServletRegistrationBean getRootServlet(RootResources rootResources)
{
@@ -461,7 +450,6 @@ public class MySpringConfiguration {
}
```
-
```java
@Rest(
children={
@@ -472,10 +460,7 @@ public class RootResources extends
BasicSpringRestServletGroup {
// No code!
}
```
-
-
-### Additional Information
-
+:::
:::info See Also
juneau-rest-server for more information.
diff --git a/juneau-docs-poc/docs/topics/01.05.RestClient.md
b/juneau-docs-poc/docs/topics/01.05.RestClient.md
index 6f49c7477..c7952fab2 100644
--- a/juneau-docs-poc/docs/topics/01.05.RestClient.md
+++ b/juneau-docs-poc/docs/topics/01.05.RestClient.md
@@ -4,9 +4,8 @@ title: "REST Client"
Built upon the feature-rich Apache HttpClient library, the Juneau RestClient
API adds support for fluent-style
REST calls and the ability to perform marshalling of POJOs to and from HTTP
parts.
-### Example:
-
+:::tip Example
```java
// Create a basic REST client with JSON support and download a bean.
MyBean bean = RestClient.create()
@@ -18,16 +17,15 @@ MyBean bean = RestClient.create()
.assertHeader("Content-Type").matchesSimple("application/json*")
.getContent().as(MyBean.class);
```
-
+:::
### REST Testing Framework
The
[MockRestClient](../apidocs/org/apache/juneau/rest/mock/MockRestClient.html)
class is used for performing serverless unit testing of
[@Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html)-annotated
and [@Remote](../apidocs/org/apache/juneau/http/remote/Remote.html)-annotated
classes. It perform full serialization and parsing of the HTTP request and
responses,
but bypasses the network layer to significantly improve speed while still
performing real testing.
-### Example:
-
+:::tip Example
```java
public class MockTest {
@@ -68,10 +66,7 @@ public class MockTest {
}
}
```
-
-
-### Additional Information
-
+:::
:::info See Also
juneau-rest-client for more information.
diff --git a/juneau-docs-poc/docs/topics/01.06.Dtos.md
b/juneau-docs-poc/docs/topics/01.06.Dtos.md
index e2e11837f..04735dcec 100644
--- a/juneau-docs-poc/docs/topics/01.06.Dtos.md
+++ b/juneau-docs-poc/docs/topics/01.06.Dtos.md
@@ -4,16 +4,17 @@ title: "DTOs"
The juneau-dto library contains several predefined POJOs for generating
commonly-used document types that
are designed to be used with the Juneau Marshaller APIs for both serializing
and parsing.
+
### HTML5
The Juneau HTML5 DTOs are simply beans with fluent-style setters that allow
you to quickly construct HTML
fragments as Java objects. These object can then be serialized to HTML using
one of the existing HTML
serializers, or to other languages such as JSON using the JSON serializers.
+
The [HtmlBuilder](../apidocs/org/apache/juneau/dto/html5/HtmlBuilder.html)
class is a utility class with predefined static methods
that allow you to easily construct DTO instances in a minimal amount of code.
-### Examples:
-
+:::tip Examples
```java
import static org.apache.juneau.dto.html5.HtmlBuilder.*;
@@ -33,20 +34,19 @@ Object mytable =
String html = Html.of(mytable);
```
-
```xml
-<table>
- <tr>
- <th>c1</th>
- <th>c2</th>
- </tr>
- <tr>
- <td>v1</td>
- <td>v2</td>
- </tr>
-</table>
+<table>
+ <tr>
+ <th>c1</th>
+ <th>c2</th>
+ </tr>
+ <tr>
+ <td>v1</td>
+ <td>v2</td>
+ </tr>
+</table>
```
-
+:::
:::info See Also
HTML5 for more information.
@@ -57,9 +57,8 @@ HTML5 for more information.
The Juneau ATOM feed DTOs are simply beans with fluent-style setters.
The following code shows a feed being created programmatically using the
[AtomBuilder](../apidocs/org/apache/juneau/dto/atom/AtomBuilder.html) class.
-### Example:
-
+:::tip Example
```java
import static org.apache.juneau.dto.atom.AtomBuilder.*;
@@ -91,17 +90,17 @@ Feed feed =
content("xhtml")
.lang("en")
.base("http://www.apache.org/")
- .text("[Update: Juneau supports ATOM.]
-```
-
-
-")
-)
-);
-| // Create a serializer with readable output, no namespaces yet.
+ .text("[Update: Juneau supports ATOM.]")
+ )
+ );
+
+// Create a serializer with readable output, no namespaces yet.
XmlSerializer serializer = XmlSerializer.create().sq().ws().build();
-| // Serialize to ATOM/XML
+
+// Serialize to ATOM/XML
String atomXml = serializer.serialize(feed);
+```
+:::
:::info See Also
Atom for more information.
@@ -113,9 +112,8 @@ The Juneau Swagger DTOs are simply beans with fluent-style
setters that allow yo
Swagger documents as Java objects.
These object can then be serialized to JSON using one of the existing JSON
serializers, or to other
languages such as XML or HTML using the other serializers.
-### Example:
-
+:::tip Example
```java
static import org.apache.juneau.dto.swagger.SwaggerBuilder.*;
@@ -163,7 +161,7 @@ String swaggerJson = Json.of(swagger);
// Or just use toString() or asJson().
String swaggerJson = swagger.asJson();
```
-
+:::
:::info See Also
Swagger for more information.
@@ -173,7 +171,8 @@ Swagger for more information.
The [SwaggerUI](../apidocs/org/apache/juneau/dto/swagger/ui/SwaggerUI.html)
class is a DTO class for generating Swagger user interfaces
from [Swagger](../apidocs/org/apache/juneau/dto/swagger/Swagger.html) beans.
-The `PetStore` example described later provides an example of auto-generated
Swagger JSON:
+
+The `PetStore` example described later provides an example of auto-generated
Swagger JSON.
Using [SwaggerUI](../apidocs/org/apache/juneau/dto/swagger/ui/SwaggerUI.html),
we're able to render that JSON as a Swagger user interface
when the request is asking for HTML:
diff --git a/juneau-docs-poc/docs/topics/01.07.ConfigFiles.md
b/juneau-docs-poc/docs/topics/01.07.ConfigFiles.md
index 0b02f7be0..219823a7d 100644
--- a/juneau-docs-poc/docs/topics/01.07.ConfigFiles.md
+++ b/juneau-docs-poc/docs/topics/01.07.ConfigFiles.md
@@ -3,9 +3,8 @@ title: "Config Files"
---
The juneau-config library contains a powerful API for creating and using
INI-style config files.
-### Example configuration file:
-
+:::tip Example configuration file
```ini
# A set of entries
@@ -27,10 +26,11 @@ key3 = 1,2,3
key4 = http://bar
```
-
+:::
Config files are accessed through the
[Config](../apidocs/org/apache/juneau/config/Config.html) class which
are created through the
[Builder](../apidocs/org/apache/juneau/config/Config/Builder.html) class.
+
Builder creator methods are provided on the `Config` class:
```java
@@ -44,7 +44,6 @@ int[] key3 = config.getObject("Section1/key3", int[].class);
URL key4 = config.getObject("Section1/key4", URL.class);
```
-
The config language may look simple but it is a very powerful feature with
many capabilities.
:::info See Also
diff --git a/juneau-docs-poc/docs/topics/01.08.FluentAssertions.md
b/juneau-docs-poc/docs/topics/01.08.FluentAssertions.md
index 820d5fd20..be79d47da 100644
--- a/juneau-docs-poc/docs/topics/01.08.FluentAssertions.md
+++ b/juneau-docs-poc/docs/topics/01.08.FluentAssertions.md
@@ -3,14 +3,14 @@ title: "Fluent Assertions"
---
The juneau-assertions module in Juneau is a powerful API for performing fluent
style assertions.
+
Fluent assertions have two types of methods:
- `"asX"` methods which perform transformations.
- `"isX"` methods which perform assertions.
Multiple transformations and assertions can be performed per statement.
-### Examples:
-
+:::tip Examples
```java
import static org.apache.juneau.assertions.Assertions.*;
import static org.apache.juneau.assertions.AssertionPredicates.*;
@@ -46,12 +46,11 @@ assertThrown(()->myBean.runBadMethod())
.isExactType(RuntimeException.class)
.asMessage().is("foo");
```
-
+:::
The Assertions APIs are used throughout the REST client and server APIs for
performing inline assertions on REST requests and responses.
-### Example:
-
+:::tip Example
```java
// Create a basic REST client with JSON support and download a bean.
MyBean bean = RestClient.create()
@@ -64,7 +63,7 @@ MyBean bean = RestClient.create()
.getContent().assertValue().asString().isContains("OK")
.getContent().as(MyBean.class);
```
-
+:::
:::info See Also
Fluent Assertions for more information.
diff --git a/juneau-docs-poc/docs/topics/01.09.GeneralDesign.md
b/juneau-docs-poc/docs/topics/01.09.GeneralDesign.md
index 64fe26b59..dc30f421d 100644
--- a/juneau-docs-poc/docs/topics/01.09.GeneralDesign.md
+++ b/juneau-docs-poc/docs/topics/01.09.GeneralDesign.md
@@ -8,6 +8,7 @@ The Juneau framework uses the design pattern of builders,
context, and session o
- Sessions - Modifiable objects usually meant for one-time use.
This is a general design pattern used throughout the framework including the
REST client and server APIs.
+
The following shows the general pattern for creating sessions:
```java
@@ -27,7 +28,6 @@ WriterSerializerSession session = serializer
String json = session.serialize(myBean);
```
-
Typically developers will not deal with session objects and will just use
convenience
methods on the context classes themselves that handle creation of sessions:
@@ -36,7 +36,6 @@ methods on the context classes themselves that handle
creation of sessions:
String json = serializer.serialize(myBean);
```
-
Most context objects also have static default instances that can be used in
leu of
creating new contexts as well:
@@ -45,7 +44,6 @@ creating new contexts as well:
String json = JsonSerializer.DEFAULT.serialize(myBean);
```
-
Most context classes also have the ability to clone and modify existing
context objects:
```java
@@ -57,9 +55,9 @@ WriterSerializer serializer = JsonSerializer
.build(); // Creates a context.
```
-
The default values of many context settings can also be set via system
properties and environment variables.
The javadocs on these settings will identify when this is possible.
+
The framework makes heavy use of caching of existing context objects with the
same builder settings.
This is a critical reason why Juneau achieve impressive performance.
Using Java reflection to find out all information about a bean type is
expensive.
diff --git a/juneau-docs-poc/docs/topics/02.02.Marshallers.md
b/juneau-docs-poc/docs/topics/02.02.Marshallers.md
index e59fef2ab..abf7373d7 100644
--- a/juneau-docs-poc/docs/topics/02.02.Marshallers.md
+++ b/juneau-docs-poc/docs/topics/02.02.Marshallers.md
@@ -22,7 +22,7 @@ and [Parser](../apidocs/org/apache/juneau/parser/Parser.html)
with convenience m
- `byte[]`
[write(Object)](../apidocs/org/apache/juneau/marshaller/StreamMarshaller.html#write(Object))
- [MsgPack](../apidocs/org/apache/juneau/marshaller/MsgPack.html)
-### Examples:
+:::tip Examples
```java
@@ -58,7 +58,9 @@ perform marshalling on POJOs:
- `String`
*[of(Object)](../apidocs/org/apache/juneau/marshaller/Json.html#of(Object))*
`T` *\{@link oaj.marshaller.Json#to(Object,Class) to(Object,Class)\}*
-### Examples:
+:::
+
+:::tip Examples
```java
@@ -67,3 +69,5 @@ MyPojo myPojo = Json.to(jsonString, MyPojo.class);
String json = Json.of(myPojo);
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
b/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
index 96e9fc65d..0becda4d6 100644
--- a/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
+++ b/juneau-docs-poc/docs/topics/02.04.BeanContexts.md
@@ -8,7 +8,7 @@ All serializers and parsers (and their builders) extend from
the bean context AP
One important feature of the bean context API is the ability to wrap Java
beans inside maps to allow
properties to be accessed through a Map layer. Although this is used
internally by all the serializers and parsers,
it's often useful to use this feature by itself.
-### Example:
+:::tip Example
```java
@@ -21,6 +21,8 @@ int myProperty = myBeanMap.get("myProperty", int.class);
The bean context API provides many settings that fine-tune how POJOs should be
handled during marshalling.
+:::
+
:::info See Also
- [Builder](../apidocs/org/apache/juneau/BeanContext/Builder.html)
diff --git a/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
b/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
index 934d48b88..287652dd1 100644
--- a/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
+++ b/juneau-docs-poc/docs/topics/02.18.ReadingContinuousStreams.md
@@ -12,7 +12,7 @@ classes can read continuous streams by using the
[Builder#unbuffered()](../apido
setting.
This prevents the parsers from using an internal buffer that would read past
the end of the currently
parsed POJO.
-### Examples:
+:::tip Examples
```java
@@ -43,3 +43,5 @@ For obvious reasons, do not use the following properties when
reading continuous
The [MsgPackParser](../apidocs/org/apache/juneau/msgpack/MsgPackParser.html)
class doesn't use any internal buffering to begin with, so it can be used with
continuous streams without any special properties.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.21.02.VarResolvers.md
b/juneau-docs-poc/docs/topics/02.21.02.VarResolvers.md
index 2ac4d916e..cb048c93e 100644
--- a/juneau-docs-poc/docs/topics/02.21.02.VarResolvers.md
+++ b/juneau-docs-poc/docs/topics/02.21.02.VarResolvers.md
@@ -23,7 +23,7 @@ Beans are accessible through the following method:
Var resolvers can be cloned and extended by using the
[VarResolver#copy()](../apidocs/org/apache/juneau/svl/VarResolver.html#copy())
method.
Cloning a resolver will copy it's
[Var](../apidocs/org/apache/juneau/svl/Var.html) class names and context
objects.
-### Example:
+:::tip Example
```java
@@ -35,3 +35,5 @@ VarResolver myVarResolver = VarResolver
.build();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.22.SimpleVariableLanguage.md
b/juneau-docs-poc/docs/topics/02.22.SimpleVariableLanguage.md
index 14ae51d4e..d9de531c5 100644
--- a/juneau-docs-poc/docs/topics/02.22.SimpleVariableLanguage.md
+++ b/juneau-docs-poc/docs/topics/02.22.SimpleVariableLanguage.md
@@ -26,7 +26,7 @@ The following logic variables are also provided:
- [LenVar](../apidocs/org/apache/juneau/svl/vars/LenVar.html) -
`$LN\{arg[,delimiter]\}`
- [SubstringVar](../apidocs/org/apache/juneau/svl/vars/SubstringVar.html) -
`$ST\{arg,start[,end]\}`
-### Example:
+:::tip Example
```java
@@ -46,3 +46,5 @@ The following shows how variables can be arbitrarily nested...
String property =
VarResolver.DEFAULT.resolve("$E{MYPROPERTY,$S{my.property,not found}}");
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.23.Encoders.md
b/juneau-docs-poc/docs/topics/02.23.Encoders.md
index d84d00d1c..9ffe4a6df 100644
--- a/juneau-docs-poc/docs/topics/02.23.Encoders.md
+++ b/juneau-docs-poc/docs/topics/02.23.Encoders.md
@@ -21,7 +21,7 @@ Encoders are tried in the order they appear in the set. The
\{@link oaj.encoder
methods prepend the values to the list to allow them the opportunity to
override encoders already in the list.
For example, calling builder.add(E1.class,E2.class).add(E3.class,
E4.class) will result in the order `E3, E4, E1, E2`.
-### Example:
+:::tip Example
```java
@@ -39,6 +39,8 @@ Encoder encoder = encoders.getEncoder(matchedCoding);
```
+:::
+
### Encoder API
The [Encoder](../apidocs/org/apache/juneau/encoders/Encoder.html) interface is
used for enabling decompression on requests and compression on responses, such
as support for GZIP compression.
diff --git a/juneau-docs-poc/docs/topics/02.24.03.Json5.md
b/juneau-docs-poc/docs/topics/02.24.03.Json5.md
index e7b92d8c1..7b01e5de8 100644
--- a/juneau-docs-poc/docs/topics/02.24.03.Json5.md
+++ b/juneau-docs-poc/docs/topics/02.24.03.Json5.md
@@ -7,7 +7,7 @@ JSON 5 is similar to JSON except for the following:
- JSON attributes are only quoted when necessary.
- Uses single-quotes for quoting.
-### Examples:
+:::tip Examples
```java
@@ -58,6 +58,8 @@ assertEquals("{foo:'bar',baz:123}",
serializer.toString(myPojo));
```
+:::
+
:::info See Also
- [Builder](../apidocs/org/apache/juneau/json/JsonSerializer/Builder.html)
-
[json5()](../apidocs/org/apache/juneau/json/JsonSerializer/Builder.html#json5())
diff --git a/juneau-docs-poc/docs/topics/02.24.05.JsonAnnotation.md
b/juneau-docs-poc/docs/topics/02.24.05.JsonAnnotation.md
index 478a43f9b..d4fba3d44 100644
--- a/juneau-docs-poc/docs/topics/02.24.05.JsonAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.24.05.JsonAnnotation.md
@@ -10,7 +10,7 @@ The annotation can be applied to beans as well as other
objects serialized to ot
The
[@Json(wrapperAttr)](../apidocs/org/apache/juneau/json/annotation/Json.html#wrapperAttr())
annotation
can be used to wrap beans inside a JSON object with a specified attribute name.
-### Example:
+:::tip Example
@Json(wrapperAttr="personBean")
public class Person \{
@@ -27,3 +27,5 @@ personBean: \{
name: 'John Smith'
\}
\}
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.24.ObjectTools.md
b/juneau-docs-poc/docs/topics/02.24.ObjectTools.md
index ce83984b3..2090274fc 100644
--- a/juneau-docs-poc/docs/topics/02.24.ObjectTools.md
+++ b/juneau-docs-poc/docs/topics/02.24.ObjectTools.md
@@ -28,7 +28,7 @@ Use
[get()](../apidocs/org/apache/juneau/objecttools/ObjectRest.html#get(String)
Use \{@link oaj.objecttools.ObjectRest#put(String,Object) put()\} to create
(or overwrite) an element in a JSON tree.
Use \{@link oaj.objecttools.ObjectRest#post(String,Object) post()\} to add an
element to a list in a JSON tree.
Use
[delete()](../apidocs/org/apache/juneau/objecttools/ObjectRest.html#delete(String))
to remove an element from a JSON tree.
-### Example:
+:::tip Example
```java
@@ -97,7 +97,9 @@ johnSmith.put("additionalInfo/medicalInfo", medicalInfo);
In the special case of collections/arrays of maps/beans, a special XPath-like
selector notation can be used in lieu
of index numbers on GET requests to return a map/bean with a specified
attribute value.
The syntax is \{@code @attr=val\}, where attr is the attribute name on the
child map, and val is the matching value.
-### Example:
+:::
+
+:::tip Example
```java
@@ -106,6 +108,8 @@ Map map = objectRest.getMap("/items/@name=foo");
```
+:::
+
:::note
This class is used in the
[Traversable](../apidocs/org/apache/juneau/rest/converter/Traversable.html)
REST response converter.
:::
@@ -114,7 +118,7 @@ This class is used in the
[Traversable](../apidocs/org/apache/juneau/rest/conver
The
[ObjectSearcher](../apidocs/org/apache/juneau/objecttools/ObjectSearcher.html)
class is designed to provide searches across arrays and collections of maps or
beans.
It allows you to quickly filter beans and maps using simple yet sophisticated
search arguments.
-### Example:
+:::tip Example
```java
@@ -164,6 +168,8 @@ The
[TimeMatcherFactory](../apidocs/org/apache/juneau/objecttools/TimeMatcherFac
"property=>2011","property=>=2011","property=<2011","property=<=2011"
- Open-ended ranges
"property=2011 - 2013-06-30" - Closed ranges
+:::
+
:::note
This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converter/Queryable.html) REST
response converter.
:::
@@ -171,7 +177,7 @@ This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converte
### ObjectSorter
The [ObjectSorter](../apidocs/org/apache/juneau/objecttools/ObjectSorter.html)
class is designed to sort arrays and collections of maps or beans.
-### Example:
+:::tip Example
```java
@@ -189,6 +195,8 @@ The tool can be used against the following data types:
The arguments are a simple comma-delimited list of property names optionally
suffixed with '+' and '-' to
denote ascending/descending order.
+:::
+
:::note
This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converter/Queryable.html) REST
response converter.
:::
@@ -196,7 +204,7 @@ This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converte
### ObjectViewer
The [ObjectViewer](../apidocs/org/apache/juneau/objecttools/ObjectViewer.html)
class is designed to extract properties from collections of maps or beans.
-### Example:
+:::tip Example
```java
@@ -212,6 +220,8 @@ The tool can be used against the following data types:
- Singular maps or beans.
+:::
+
:::note
This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converter/Queryable.html) REST
response converter.
:::
@@ -219,7 +229,7 @@ This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converte
### ObjectPaginator
The
[ObjectPaginator](../apidocs/org/apache/juneau/objecttools/ObjectPaginator.html)
class is designed to extract sublists from arrays/collections of maps or beans.
-### Example:
+:::tip Example
```java
@@ -235,6 +245,8 @@ The tool can be used against the following data types:
- Arrays/collections of maps or beans.
+:::
+
:::note
This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converter/Queryable.html) REST
response converter.
:::
@@ -242,7 +254,7 @@ This class is used in the
[Queryable](../apidocs/org/apache/juneau/rest/converte
### ObjectIntrospector
The
[ObjectIntrospector](../apidocs/org/apache/juneau/objecttools/ObjectIntrospector.html)
class is used to invoke methods on \{@code Objects\} using arguments in
serialized form.
-### Example:
+:::tip Example
```java
@@ -256,6 +268,8 @@ String string2 = ObjectIntrospector
The arguments passed to the identified method are POJOs serialized in JSON
format. Arbitrarily complex arguments can be passed
in as arguments.
+:::
+
:::note
This class is used in the
[Introspectable](../apidocs/org/apache/juneau/rest/converter/Introspectable.html)
REST response converter.
:::
diff --git a/juneau-docs-poc/docs/topics/02.26.04.XmlBeanTypeNameAnnotation.md
b/juneau-docs-poc/docs/topics/02.26.04.XmlBeanTypeNameAnnotation.md
index a41c16fbf..ecdd9232f 100644
--- a/juneau-docs-poc/docs/topics/02.26.04.XmlBeanTypeNameAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.26.04.XmlBeanTypeNameAnnotation.md
@@ -10,7 +10,7 @@ Types names serve two distinct purposes:
The following examples show how type names can be used to override element
names:
-### Example 1
+:::tip Example 1
```java
public class Person {
@@ -18,13 +18,13 @@ public class Person {
public int age;
}
-// Produces:
+// Produces
// <person><name>John Smith</name><age>21</age></person>
String xml = XmlSerializer.DEFAULT.serialize(new Person());
```
-### Example 2
+:::tip Example 2
```java
@Bean(typeName="person")
@@ -33,7 +33,7 @@ public class Person {
public int age;
}
-// Produces:
+// Produces
// <person><name>John Smith</name><age>21</age></person>
String xml = XmlSerializer.DEFAULT.serialize(new Person());
diff --git a/juneau-docs-poc/docs/topics/02.26.05.XmlChildNameAnnotation.md
b/juneau-docs-poc/docs/topics/02.26.05.XmlChildNameAnnotation.md
index 8d9667555..ad2907cbc 100644
--- a/juneau-docs-poc/docs/topics/02.26.05.XmlChildNameAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.26.05.XmlChildNameAnnotation.md
@@ -4,7 +4,7 @@ title: "@Xml(childName) Annotation"
The
[@Xml(childName)](../apidocs/org/apache/juneau/xml/annotation/Xml.html#childName())
annotation can be used to
specify the name of XML child elements for bean properties of type collection
or array.
-### Example
+:::tip Example
Data type
JSON example
@@ -49,3 +49,5 @@ bar
foo
bar
|
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.26.06.XmlFormatAnnotation.md
b/juneau-docs-poc/docs/topics/02.26.06.XmlFormatAnnotation.md
index e8817e416..ca5483e6c 100644
--- a/juneau-docs-poc/docs/topics/02.26.06.XmlFormatAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.26.06.XmlFormatAnnotation.md
@@ -9,7 +9,7 @@ This annotation can be applied to both classes and bean
properties.
The
[XmlFormat#ATTR](../apidocs/org/apache/juneau/xml/annotation/XmlFormat.html#ATTR)
format can be applied to bean properties to
serialize them as XML attributes instead of elements.
Note that this only supports properties of simple types (e.g. strings,
numbers, booleans).
-### Example
+:::tip Example
Data type
JSON example
@@ -26,7 +26,9 @@ a: 'foo'
| a='foo'/>
The
[XmlFormat#ATTRS](../apidocs/org/apache/juneau/xml/annotation/XmlFormat.html#ATTRS)
format can be applied to bean classes to
force all bean properties to be serialized as XML attributes instead of child
elements.
-### Example
+:::
+
+:::tip Example
Data type
JSON example
@@ -47,7 +49,9 @@ b: 123
The
[XmlFormat#ELEMENT](../apidocs/org/apache/juneau/xml/annotation/XmlFormat.html#ELEMENT)
format can be applied to bean properties
to override the
[XmlFormat#ATTRS](../apidocs/org/apache/juneau/xml/annotation/XmlFormat.html#ATTRS)
format applied on the bean
class.
-### Example
+:::
+
+:::tip Example
Data type
JSON example
@@ -72,7 +76,9 @@ property of type `Map` to denote arbitrary XML attribute
values on the
element.
These can be mixed with other
[XmlFormat#ATTR](../apidocs/org/apache/juneau/xml/annotation/XmlFormat.html#ATTR)
annotated
properties but there must not be an overlap in bean property names and map
keys.
-### Example
+:::
+
+:::tip Example
Data type
JSON example
@@ -383,3 +389,5 @@ a: 'Some **XML** text'
\}
Some <b>XML</b> text
Some **XML** text
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.27.04.HtmlAnnotation.md
b/juneau-docs-poc/docs/topics/02.27.04.HtmlAnnotation.md
index 539738624..cdd7ad3b1 100644
--- a/juneau-docs-poc/docs/topics/02.27.04.HtmlAnnotation.md
+++ b/juneau-docs-poc/docs/topics/02.27.04.HtmlAnnotation.md
@@ -12,7 +12,7 @@ The
[@Html](../apidocs/org/apache/juneau/html/annotation/Html.html) annotation c
- [render](../apidocs/org/apache/juneau/html/annotation/Html.html#render())
The [@Html(link)](../apidocs/org/apache/juneau/html/annotation/Html.html#link)
annotation adds a hyperlink to a bean property when rendered as HTML.
-### Example:
+:::tip Example
```java
@@ -25,7 +25,9 @@ public class FileSpace {
The
[@Html(anchorText)](../apidocs/org/apache/juneau/html/annotation/Html.html#anchorText)
annotation is used to specify the anchor text of a hyperlink.
-### Example:
+:::
+
+:::tip Example
```java
@@ -41,7 +43,9 @@ public class FileSpace {
The
[@Html(format)](../apidocs/org/apache/juneau/html/annotation/Html.html#format)
annotation is used to specify what format to use for HTML elements.
For example, the HTML beans defined in the
[html5](../apidocs/org/apache/juneau/dto/html5.html) package use `format=XML`
so that
the beans get serialized as standard XML:
-### Example:
+:::
+
+:::tip Example
```java
@@ -53,3 +57,5 @@ public abstract class HtmlElement {...}
The
[@Html(noTableHeaders)](../apidocs/org/apache/juneau/html/annotation/Html.html#noTableHeaders)
annotation is used to prevent beans from being serialized with table headers.
The
[@Html(noTables)](../apidocs/org/apache/juneau/html/annotation/Html.html#noTables)
annotation is used to force beans to be serialized as trees instead of tables
+
+:::
diff --git a/juneau-docs-poc/docs/topics/02.27.06.HtmlDocSerializer.md
b/juneau-docs-poc/docs/topics/02.27.06.HtmlDocSerializer.md
index 943ab9235..664a26288 100644
--- a/juneau-docs-poc/docs/topics/02.27.06.HtmlDocSerializer.md
+++ b/juneau-docs-poc/docs/topics/02.27.06.HtmlDocSerializer.md
@@ -17,7 +17,7 @@ The class hierarchy for the builder of this serializer is:
Refer to the builder javadocs for configurable settings.
This class is used extensively in the creation of POJO-based user interfaces
in the REST API.
-### Example:
+:::tip Example
```java
@@ -48,3 +48,5 @@ public class HelloWorldResource extends BasicRestServlet
\{...\}
The
[Builder#template(Class)](../apidocs/org/apache/juneau/html/HtmlDocSerializer/Builder.html#template(Class))
setting defines
a template for the HTML page being generated.
The default template is described next.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/04.03.Atom.md
b/juneau-docs-poc/docs/topics/04.03.Atom.md
index 7b46bec9b..2d3be9da2 100644
--- a/juneau-docs-poc/docs/topics/04.03.Atom.md
+++ b/juneau-docs-poc/docs/topics/04.03.Atom.md
@@ -45,7 +45,7 @@ Feed feed =
)
);
To serialize this to ATOM, use the
[XmlSerializer](../apidocs/org/apache/juneau/xml/XmlSerializer.html) class:
-### Example with no namespaces
+:::tip Example with no namespaces
```java
diff --git a/juneau-docs-poc/docs/topics/05.02.03.JCFObjects.md
b/juneau-docs-poc/docs/topics/05.02.03.JCFObjects.md
index 10ce4d48f..1441fd184 100644
--- a/juneau-docs-poc/docs/topics/05.02.03.JCFObjects.md
+++ b/juneau-docs-poc/docs/topics/05.02.03.JCFObjects.md
@@ -29,7 +29,7 @@ Produces: `LinkedHashMap`
- `to(HashMap.class, Integer.class, ArrayList.class, MyBean[].class)`
Produces: `LinkedHashMap>`
-### Example:
+:::tip Example
```ini
@@ -64,3 +64,5 @@ JsonMap map = config.get("key1").asMap().orElse(null);
JsonList list = config.get("key2").asList().orElse(null);
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.02.Overview.md
b/juneau-docs-poc/docs/topics/05.02.Overview.md
index e0b3973f6..6e0dc28c3 100644
--- a/juneau-docs-poc/docs/topics/05.02.Overview.md
+++ b/juneau-docs-poc/docs/topics/05.02.Overview.md
@@ -3,9 +3,7 @@ title: "Overview"
---
The `juneau-config` library contains a powerful API for creating and using
INI-style config files.
-### Example configuration file:
-
-
+:::tip Example configuration file
```ini
# A set of entries
diff --git a/juneau-docs-poc/docs/topics/05.04.Variables.md
b/juneau-docs-poc/docs/topics/05.04.Variables.md
index b8bff01da..03c27c55c 100644
--- a/juneau-docs-poc/docs/topics/05.04.Variables.md
+++ b/juneau-docs-poc/docs/topics/05.04.Variables.md
@@ -3,7 +3,7 @@ title: "Variables"
---
Config files can contain variables that get resolved dynamically using the
previously-described
[VarResolver](../apidocs/org/apache/juneau/svl/VarResolver.html) API.
-### Example:
+:::tip Example
```ini
@@ -58,3 +58,5 @@ The variable resolver is controlled via the following setting:
Additionally, the following method can be used to retrieve a `Config` with a
different variable resolver:
- [Config](../apidocs/org/apache/juneau/config/Config.html)
-
[resolving(VarResolverSession)](../apidocs/org/apache/juneau/config/Config.html#resolving(VarResolverSession))
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.06.Sections.md
b/juneau-docs-poc/docs/topics/05.06.Sections.md
index 9fd99363f..ece15abad 100644
--- a/juneau-docs-poc/docs/topics/05.06.Sections.md
+++ b/juneau-docs-poc/docs/topics/05.06.Sections.md
@@ -14,7 +14,7 @@ Config sections can be retrieved in-bulk using the
The [asMap()](../apidocs/org/apache/juneau/config/Section.html#asMap())
method allows you to access a section as simple key/value pairs.
-### Example:
+:::tip Example
```ini
@@ -42,8 +42,10 @@ int zip = map.getInt("zip");
Maps created this way are snapshot copies of the section at the time of the
method call.
Config files can also be used to directly populate beans using
+:::
+
[asBean()](../apidocs/org/apache/juneau/config/Section.html#asBean(Class)) or
\{@link oaj.config.Section#writeToBean(Object,boolean) writeToBean()\}.
-### Example:
+:::tip Example
```ini
@@ -74,8 +76,10 @@ Like maps, beans created this way are snapshot copies of the
section at the time
Config sections can also be accessed via interface proxies using
[Section#asInterface(Class)](../apidocs/org/apache/juneau/config/Section.html#asInterface(Class)).
While section maps and beans retrieve copies of the configuration data at the
time of the method
+:::
+
call, section interfaces can also be use to set values in the underlying
configuration.
-### Example:
+:::tip Example
```ini
@@ -128,3 +132,5 @@ intf.setBean(new MyBean());
config.commit();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.10.02.FileStore.md
b/juneau-docs-poc/docs/topics/05.10.02.FileStore.md
index d5df9344e..abc836f67 100644
--- a/juneau-docs-poc/docs/topics/05.10.02.FileStore.md
+++ b/juneau-docs-poc/docs/topics/05.10.02.FileStore.md
@@ -11,7 +11,7 @@ It provides the following configurable settings:
-
[enableWatcher()](../apidocs/org/apache/juneau/config/store/FileStore/Builder.html#enableWatcher())
-
[watcherSensitivity(WatcherSensitivity)](../apidocs/org/apache/juneau/config/store/FileStore/Builder.html#watcherSensitivity(WatcherSensitivity))
-### Example:
+:::tip Example
```java
@@ -30,3 +30,5 @@ Config config = Config
.build();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.10.03.CustomStores.md
b/juneau-docs-poc/docs/topics/05.10.03.CustomStores.md
index f2b292389..65b9b641a 100644
--- a/juneau-docs-poc/docs/topics/05.10.03.CustomStores.md
+++ b/juneau-docs-poc/docs/topics/05.10.03.CustomStores.md
@@ -6,9 +6,7 @@ The `ConfigStore` API has been written to allow easy
development of custom confi
The example below shows a starting point for an implementation based on
polling a relational database.
The source can be found here:
[SqlStore](../apidocs/org/apache/juneau/examples/core/config/store/SqlStore.html).
Completing it is left as an exercise:
-### Example Store Class:
-
-
+:::tip Example Store Class
```java
public class SqlStore extends ConfigStore {
diff --git a/juneau-docs-poc/docs/topics/05.10.ConfigImports.md
b/juneau-docs-poc/docs/topics/05.10.ConfigImports.md
index c9d4427b6..616213d5d 100644
--- a/juneau-docs-poc/docs/topics/05.10.ConfigImports.md
+++ b/juneau-docs-poc/docs/topics/05.10.ConfigImports.md
@@ -18,7 +18,7 @@ A configuration can contain zero or more imports anywhere in
the file.
However, for clarity, imports should normally be placed in the default section
of the configuration file.
The resolved configuration is retrieved from the configuration store used for
the child configuration.
Configuration imports can be nested arbitrarily deep.
-### Example:
+:::tip Example
```ini
@@ -44,8 +44,10 @@ String foo = config.get("Foo/bar").get(); // == "baz"
```
+:::
+
Values can be overridden by child configurations.
-### Example:
+:::tip Example
```ini
@@ -129,3 +131,5 @@ assertTrue(triggered[0]);
Dynamically removing an import has the same effect as removing keys and
generates REMOVE_ENTRY events.
Note that when dynamically adding or removing imports, overridden keys in the
child config will be filtered
from the change events.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.11.ConfigStores.md
b/juneau-docs-poc/docs/topics/05.11.ConfigStores.md
index 3108cd358..22f9a908a 100644
--- a/juneau-docs-poc/docs/topics/05.11.ConfigStores.md
+++ b/juneau-docs-poc/docs/topics/05.11.ConfigStores.md
@@ -51,7 +51,7 @@ The store is defined on the `Config` object via the following
setting:
- [Builder](../apidocs/org/apache/juneau/config/Config/Builder.html)
-
[store(ConfigStore)](../apidocs/org/apache/juneau/config/Config/Builder.html#store(ConfigStore))
-### Example:
+:::tip Example
```java
@@ -62,3 +62,5 @@ Config config =
Config.create("MyConfig.cfg").store(ConfigMemoryStore.DEFAULT).b
The default store used is
[FileStore#DEFAULT](../apidocs/org/apache/juneau/config/store/FileStore.html#DEFAULT)
which defines
the execution directory as the file system directory to store and retrieve
files.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.12.ReadOnlyConfigs.md
b/juneau-docs-poc/docs/topics/05.12.ReadOnlyConfigs.md
index 07265a74f..ccfbc3072 100644
--- a/juneau-docs-poc/docs/topics/05.12.ReadOnlyConfigs.md
+++ b/juneau-docs-poc/docs/topics/05.12.ReadOnlyConfigs.md
@@ -6,7 +6,7 @@ The following settings can be used to create read-only `Config`
objects:
- [Builder](../apidocs/org/apache/juneau/config/Config/Builder.html)
-
[readOnly()](../apidocs/org/apache/juneau/config/Config/Builder.html#readOnly())
-### Example:
+:::tip Example
```java
@@ -16,3 +16,5 @@ Config config =
Config.create("MyConfig.cfg").readOnly().build();
This causes all methods that make modifications to throw
[UnsupportedOperationException](../apidocs/java/lang/UnsupportedOperationException.html).
+
+:::
diff --git a/juneau-docs-poc/docs/topics/05.13.ClosingConfigs.md
b/juneau-docs-poc/docs/topics/05.13.ClosingConfigs.md
index 94cc57084..9bc98ace0 100644
--- a/juneau-docs-poc/docs/topics/05.13.ClosingConfigs.md
+++ b/juneau-docs-poc/docs/topics/05.13.ClosingConfigs.md
@@ -4,7 +4,7 @@ title: "Closing Configs"
In general, it's good practice to close Config if you're only creating them
temporarily so that
their listeners get unregistered from the underlying storage APIs.
-### Example:
+:::tip Example
```java
@@ -17,3 +17,5 @@ Config config = Config.create("MyConfig.cfg").build();
config.close();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/06.02.Overview.md
b/juneau-docs-poc/docs/topics/06.02.Overview.md
index 8f5ea3a93..c3086ca9a 100644
--- a/juneau-docs-poc/docs/topics/06.02.Overview.md
+++ b/juneau-docs-poc/docs/topics/06.02.Overview.md
@@ -4,7 +4,7 @@ title: "Overview"
The [assertions](../apidocs/org/apache/juneau/assertions.html) package in
Juneau is a powerful API for performing fluent style assertions.
It is used throughout the REST client and server APIs for performing inline
assertions on REST requests and responses.
-### Example:
+:::tip Example
```java
@@ -21,6 +21,8 @@ MyBean bean = RestClient.create()
```
+:::
+
:::note
The REST API is described later in the documentation.
The assertions API is designed to be used in both code (as it's done in the
REST APIs) or for standalone
@@ -68,7 +70,7 @@ Assertions have 3 categories of methods:
- Transform methods (`asX` methods)
- Configuration methods (`setX` methods)
-### Examples:
+:::tip Examples
```java
@@ -110,7 +112,9 @@ assertThrown(()->myBean.runBadMethod())
Testing methods (`isX` methods) perform an assertion on the specified value
and throws a [AssertionError](../apidocs/java/lang/AssertionError.html) if
the test fails. Otherwise, the method returns the original assertion object
to allow you to chain the command.
-### Example:
+:::
+
+:::tip Example
```java
@@ -123,7 +127,9 @@ assertString(myString)
Transform methods (`asX` methods) allow you to convert assertions of one type
to another type or to convert the tested value to
some other form wrapped in another assertion.
-### Example:
+:::
+
+:::tip Example
```java
@@ -138,7 +144,9 @@ assertString(myString)
Configuration methods (`setX` methods) allow you to tailor the behavior of
assertions when they fail. They always return the same assertion object.
Transformed assertions inherit the configurations of the created-by
assertions. Configuration methods start with `set`.
-### Example:
+:::
+
+:::tip Example
```java
@@ -169,3 +177,5 @@ which return the assertion itself, meaning the test method
returns the original
so that multiple tests can be performed per assertion.
For more information about the capabilities of the Assertions API, refer to
the methods on the
[Assertions](../apidocs/org/apache/juneau/assertions/Assertions.html) methods
above.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/07.02.HelperClasses.md
b/juneau-docs-poc/docs/topics/07.02.HelperClasses.md
index d92feafcd..9b72dbd23 100644
--- a/juneau-docs-poc/docs/topics/07.02.HelperClasses.md
+++ b/juneau-docs-poc/docs/topics/07.02.HelperClasses.md
@@ -14,7 +14,7 @@ standard HTTP components using static imports.
The [HttpHeaders](../apidocs/org/apache/juneau/http/HttpHeaders.html) class
contains many convenience static methods and fields for working with standard
HTTP request and response headers
and header lists.
-### Example:
+:::tip Example
```java
@@ -61,7 +61,9 @@ other HttpComponent-defined header classes:
- \{@link oaj.http.HttpHeaders#header(Class,String,Object)
header(Class,String,Object)\}
- \{@link oaj.http.HttpHeaders#header(Class,Object)
header(Class,String,Object)\}
-### Example:
+:::
+
+:::tip Example
```java
@@ -78,10 +80,12 @@ Lists of headers can be produced with the following methods:
- \{@link oaj.http.HttpHeaders#headerList(String...) headerList(String...)\}
The capabilities of the
[HeaderList](../apidocs/org/apache/juneau/http/header/HeaderList.html) class is
described later.
+:::
+
### HttpParts
The [HttpParts](../apidocs/org/apache/juneau/http/HttpParts.html) class
contains convenience static methods for generating query/form-data/path parts
and part lists.
-### Example:
+:::tip Example
```java
@@ -116,6 +120,8 @@ Lists of parts can be produced with the following methods:
- \{@link oaj.http.HttpParts#partList(String...) partList(String...)\}
The capabilities of the
[PartList](../apidocs/org/apache/juneau/http/part/PartList.html) class is
described later.
+:::
+
### HttpEntities
The [HttpEntities](../apidocs/org/apache/juneau/http/HttpEntities.html) class
contains convenience static methods for generating HTTP message entities.
@@ -138,7 +144,7 @@ either static values or values from
[Suppliers](../apidocs/java/util/function/Su
-
[stringEntity](../apidocs/org/apache/juneau/http/HttpEntities.html#stringEntity(String))
HTTP entities are automatically supported in both the server and client REST
APIs for requests and responses.
-### Example:
+:::tip Example
```java
@@ -151,6 +157,8 @@ public HttpEntity helloWold(...) {
```
+:::
+
### HttpResources
The [HttpResources](../apidocs/org/apache/juneau/http/HttpResources.html)
class contains convenience static methods for generating HTTP message resources.
@@ -165,7 +173,7 @@ either static values or values from
[Suppliers](../apidocs/java/util/function/Su
-
[stringResource](../apidocs/org/apache/juneau/http/HttpResources.html#stringResource(String))
The most common location where resources are used are as returned types of
REST operation methods described later.
-### Example:
+:::tip Example
```java
@@ -178,6 +186,8 @@ public HttpResource helloWold(...) {
```
+:::
+
### HttpResponses
The [HttpResponses](../apidocs/org/apache/juneau/http/HttpResponses.html)
class contains convenience static methods for standard HTTP responses.
@@ -240,7 +250,7 @@ The following methods are provided for creating entities:
-
[variantAlsoNegotiates](../apidocs/org/apache/juneau/http/HttpResponses.html#variantAlsoNegotiates())
The most common location where these responses are used are in REST operation
methods described later.
-### Example:
+:::tip Example
```java
@@ -255,3 +265,5 @@ public Ok doDelete(...) throws Unauthorized {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/07.04.HttpHeaders.md
b/juneau-docs-poc/docs/topics/07.04.HttpHeaders.md
index 6a3638e92..2df3c6ce8 100644
--- a/juneau-docs-poc/docs/topics/07.04.HttpHeaders.md
+++ b/juneau-docs-poc/docs/topics/07.04.HttpHeaders.md
@@ -76,7 +76,7 @@ These headers extend from the following classes that provide
data-type specific
-
[BasicUriHeader](../apidocs/org/apache/juneau/http/header/BasicUriHeader.html)
These subclasses provide various convenience methods to allow for easy
fluent-style coding.
-### Examples
+:::tip Examples
```java
@@ -88,10 +88,12 @@ restClient
```
+:::
+
### HeaderList
The [HeaderList](../apidocs/org/apache/juneau/http/header/HeaderList.html)
class is a list of HTTP headers.
-### Example
+:::tip Example
```java
@@ -144,8 +146,10 @@ In general, try to use these over the
[getAll()](../apidocs/org/apache/juneau/ht
The
[get(String)](../apidocs/org/apache/juneau/http/header/HeaderList.html#get(String))
method is special in that it will collapse multiple headers with the same name
into
a single comma-delimited list (see RFC 2616 Section 4.2 for rules).
The
[get(Class)](../apidocs/org/apache/juneau/http/header/HeaderList.html#get(Class))
and \{@link oaj.http.header.HeaderList#get(String,Class) get(String,Class)\}
methods are provided for working with
[Header](../apidocs/org/apache/juneau/http/annotation/Header.html)-annotated
+:::
+
beans.
-### Example
+:::tip Example
```java
@@ -160,7 +164,9 @@ By default, header names are treated as case-insensitive.
This can be changed u
method.
A [VarResolver](../apidocs/org/apache/juneau/svl/VarResolver.html) can be
associated with this builder to create header values with embedded variables
that
are resolved at runtime.
-### Example
+:::
+
+:::tip Example
```java
@@ -180,7 +186,9 @@ assertObject(headers).isString("[X1: bar, X2: bar]");
The [HeaderList](../apidocs/org/apache/juneau/http/header/HeaderList.html)
object can be extended to defined pre-packaged lists of headers which can be
used in various
annotations throughout the framework.
-### Example
+:::
+
+:::tip Example
```java
@@ -204,3 +212,5 @@ public interface PetStore {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/07.05.HttpParts.md
b/juneau-docs-poc/docs/topics/07.05.HttpParts.md
index 59dd8fb02..0c8fdcd81 100644
--- a/juneau-docs-poc/docs/topics/07.05.HttpParts.md
+++ b/juneau-docs-poc/docs/topics/07.05.HttpParts.md
@@ -18,7 +18,7 @@ be used for query/form-data/path parts and part lists.
### PartList
The [PartList](../apidocs/org/apache/juneau/http/part/PartList.html) class is
a list of HTTP parts (form-data, query-parameters, path-parameters).
-### Example
+:::tip Example
```java
@@ -74,8 +74,10 @@ In general, try to use these over the
[getAll()](../apidocs/org/apache/juneau/ht
Similar to the way multiple headers can be collapsed into a single value, the
[get(String)](../apidocs/org/apache/juneau/http/part/PartList.html#get(String))
method is special in that it will collapse multiple parts with the same name
into
a single comma-delimited list.
The
[get(Class)](../apidocs/org/apache/juneau/http/part/PartList.html#get(Class))
and \{@link oaj.http.part.PartList#get(String,Class) get(String,Class)\}
methods are provided for working with
[FormData](../apidocs/org/apache/juneau/http/annotation/FormData.html) /
[Query](../apidocs/org/apache/juneau/http/annotation/Query.html) /
[Path](../apidocs/org/apache/juneau/http/annotation/Path.html)-annotated
+:::
+
beans.
-### Example
+:::tip Example
```java
@@ -85,7 +87,9 @@ MyQueryBean foo = parts.get(MyQueryBean.class);
A [VarResolver](../apidocs/org/apache/juneau/svl/VarResolver.html) can be
associated with this builder to create part values with embedded variables that
are resolved at runtime.
-### Example
+:::
+
+:::tip Example
```java
@@ -105,7 +109,9 @@ assertObject(parts).isString("X1=bar&X2=bar");
The [PartList](../apidocs/org/apache/juneau/http/part/PartList.html) object
can be extended to defined pre-packaged lists of parts which can be used in
various
annotations throughout the framework.
-### Example
+:::
+
+:::tip Example
```java
@@ -117,3 +123,5 @@ public class MyPartList extends PartList {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/07.06.HttpEntitiesAndResources.md
b/juneau-docs-poc/docs/topics/07.06.HttpEntitiesAndResources.md
index ed6157ad7..b6b8ac37e 100644
--- a/juneau-docs-poc/docs/topics/07.06.HttpEntitiesAndResources.md
+++ b/juneau-docs-poc/docs/topics/07.06.HttpEntitiesAndResources.md
@@ -23,7 +23,7 @@ arbitrary headers added beyond the standard content headers.
-
[ReaderResource](../apidocs/org/apache/juneau/http/resource/ReaderResource.html)
-
[StringResource](../apidocs/org/apache/juneau/http/resource/StringResource.html)
-### Example
+:::tip Example
```java
@@ -43,6 +43,8 @@ HttpEntity entity = byteArrayEntity(payload,
ContentType.APPLICATION_OCTET_STREA
HTTP entities and resources can be used by both the server and client side
APIs described in later sections.
+:::
+
### Server-side example:
diff --git a/juneau-docs-poc/docs/topics/07.07.HttpResponses.md
b/juneau-docs-poc/docs/topics/07.07.HttpResponses.md
index 98c09cb11..1209b3b18 100644
--- a/juneau-docs-poc/docs/topics/07.07.HttpResponses.md
+++ b/juneau-docs-poc/docs/topics/07.07.HttpResponses.md
@@ -67,7 +67,7 @@ These are built upon existing HttpComponents APIs:
-
[BasicHttpException](../apidocs/org/apache/juneau/http/response/BasicHttpException.html)
- 400+ response codes
The most common location where these responses are used are in REST operation
methods described later.
-### Example:
+:::tip Example
```java
@@ -82,3 +82,5 @@ public Ok doDelete(@Path int id) throws NotFound,
Unauthorized {
The following classes are also provided for constructing your own custom
responses:
-
[BasicHttpException](../apidocs/org/apache/juneau/http/response/BasicHttpException.html)
-
[BasicHttpResponse](../apidocs/org/apache/juneau/http/response/BasicHttpResponse.html)
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.02.02.ChildResources.md
b/juneau-docs-poc/docs/topics/08.02.02.ChildResources.md
index 8232aff53..11a0395f4 100644
--- a/juneau-docs-poc/docs/topics/08.02.02.ChildResources.md
+++ b/juneau-docs-poc/docs/topics/08.02.02.ChildResources.md
@@ -4,7 +4,7 @@ title: "Child Resources"
Child Resources are REST servlets or objects that are linked to parent
resources through the
[@Rest(children)](../apidocs/org/apache/juneau/rest/annotation/Rest.html#children())
annotation.
-### Example:
+:::tip Example
```java
@@ -37,3 +37,5 @@ As explained earlier, child REST objects typically extend
from [BasicRestObject]
and not from one of the servlet classes. They also technically don't even
need to extend from those classes
and can instead just be a normal class annotated with the bare-minimum
[@Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html) and
[@RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)
annotations.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.02.03.PathVariables.md
b/juneau-docs-poc/docs/topics/08.02.03.PathVariables.md
index 7f46d0d28..9a7aad90f 100644
--- a/juneau-docs-poc/docs/topics/08.02.03.PathVariables.md
+++ b/juneau-docs-poc/docs/topics/08.02.03.PathVariables.md
@@ -4,7 +4,7 @@ title: "Path Variables"
The path can contain variables that get resolved to
[@Path](../apidocs/org/apache/juneau/http/annotation/Path.html) parameters
or access through the
[RestRequest#getPathParams()](../apidocs/org/apache/juneau/rest/RestRequest.html#getPathParams())
method.
-### Example:
+:::tip Example
```java
@@ -24,3 +24,5 @@ public class MyResource extends BasicRestServlet {
Variables can be used on either top-level or child resources and can be
defined on multiple levels.
Path variables resolved in parent resource paths are also available to the
child resources.
All variables in the path must be specified or else the target will not
resolve and a `404` will result.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.02.04.Deployment.md
b/juneau-docs-poc/docs/topics/08.02.04.Deployment.md
index 51386e2d3..5ce4e3646 100644
--- a/juneau-docs-poc/docs/topics/08.02.04.Deployment.md
+++ b/juneau-docs-poc/docs/topics/08.02.04.Deployment.md
@@ -24,7 +24,7 @@ Deployment in a Spring Boot environment involves defining
your top-level resourc
Top-level resources must extend from
[BasicSpringRestServlet](../apidocs/org/apache/juneau/rest/springboot/BasicSpringRestServlet.html)
or
[BasicSpringRestServletGroup](../apidocs/org/apache/juneau/rest/springboot/BasicSpringRestServletGroup.html)
so that Juneau can hook into the injection framework provided by Spring.
Child resource CAN be defined as injected Spring Beans
as well but it is not a requirement.
-### Example Spring Boot Configuration
+:::tip Example Spring Boot Configuration
```java
diff --git
a/juneau-docs-poc/docs/topics/08.03.01.InferredHttpMethodsAndPaths.md
b/juneau-docs-poc/docs/topics/08.03.01.InferredHttpMethodsAndPaths.md
index 9500e1ce5..9b9032883 100644
--- a/juneau-docs-poc/docs/topics/08.03.01.InferredHttpMethodsAndPaths.md
+++ b/juneau-docs-poc/docs/topics/08.03.01.InferredHttpMethodsAndPaths.md
@@ -15,7 +15,7 @@ The HTTP method can be inferred from the Java method by
starting the method name
- `patch`
If `path` is not defined, it's inferred from the Java method name (minus the
prefix above).
-### Examples:
+:::tip Examples
```java
@@ -62,3 +62,5 @@ public String post() {...}
If `name` and `path` are both specified, the Java method name can be anything.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.03.02.JavaMethodParameters.md
b/juneau-docs-poc/docs/topics/08.03.02.JavaMethodParameters.md
index e8db58ad3..743a8b219 100644
--- a/juneau-docs-poc/docs/topics/08.03.02.JavaMethodParameters.md
+++ b/juneau-docs-poc/docs/topics/08.03.02.JavaMethodParameters.md
@@ -118,7 +118,7 @@ Java methods can contain any of the following parameters in
any order:
- [Response](../apidocs/org/apache/juneau/http/annotation/Response.html)
In Spring Boot environments, any available Spring Beans can also be passed in
as parameters.
-### Example:
+:::tip Example
```java
@@ -147,7 +147,9 @@ public String doGetExample1(
Additional parameter types can be defined via the annotation
[Rest#restOpArgs()](../apidocs/org/apache/juneau/rest/annotation/Rest.html#restOpArgs())
or by calling \{@link oajr.RestContext.Builder#restOpArgs(Class...)\}.
-### Example:
+:::
+
+:::tip Example
```java
@@ -164,3 +166,5 @@ public class MyResource extends BasicRestObject {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.03.03.JavaMethodReturnTypes.md
b/juneau-docs-poc/docs/topics/08.03.03.JavaMethodReturnTypes.md
index 41778e854..9549d52f6 100644
--- a/juneau-docs-poc/docs/topics/08.03.03.JavaMethodReturnTypes.md
+++ b/juneau-docs-poc/docs/topics/08.03.03.JavaMethodReturnTypes.md
@@ -5,7 +5,7 @@ title: "Java Method Return Types"
The return type of the Java method can be any serializable POJO as defined in
[TODO: POJO Categories](TODO.md).
It can also be void if the method is not sending any output (e.g. a request
redirect) or is
setting the output using the
[RestResponse#setContent(Object)](../apidocs/org/apache/juneau/rest/RestResponse.html#setContent(Object))
method.
-### Example:
+:::tip Example
```java
@@ -96,7 +96,9 @@ By calling
[RestResponse#setContent(Object)](../apidocs/org/apache/juneau/rest/R
-
By accessing the [Writer](../apidocs/java/io/Writer.html) directly by calling
[RestResponse#getNegotiatedWriter()](../apidocs/org/apache/juneau/rest/RestResponse.html#getNegotiatedWriter())
and writing the output yourself.
-### Example:
+:::
+
+:::tip Example
```java
@@ -117,7 +119,9 @@ public void doGet2(RestResponse res, @Path("personId") UUID
personId) {
Additional parameter types can be defined via the annotation
[Rest#responseProcessors()](../apidocs/org/apache/juneau/rest/annotation/Rest.html#responseProcessors())
or by calling \{@link oajr.RestContext.Builder#responseProcessors(Class...)\}.
-### Example:
+:::
+
+:::tip Example
```java
@@ -134,3 +138,5 @@ public class MyResource extends BasicRestObject {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.03.04.JavaMethodThrowableTypes.md
b/juneau-docs-poc/docs/topics/08.03.04.JavaMethodThrowableTypes.md
index cb14c0856..fdd2fc2a1 100644
--- a/juneau-docs-poc/docs/topics/08.03.04.JavaMethodThrowableTypes.md
+++ b/juneau-docs-poc/docs/topics/08.03.04.JavaMethodThrowableTypes.md
@@ -52,7 +52,7 @@ Any class named "*AccessDenied*" or "*Unauthorized*"
Any class named "*Empty*" or "*NotFound*"
- Anything else processed as 500/Internal Server Error.
-### Example:
+:::tip Example
```java
@@ -69,3 +69,5 @@ public Ok login(
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.03.06.Matchers.md
b/juneau-docs-poc/docs/topics/08.03.06.Matchers.md
index a10186cb8..81fde0db5 100644
--- a/juneau-docs-poc/docs/topics/08.03.06.Matchers.md
+++ b/juneau-docs-poc/docs/topics/08.03.06.Matchers.md
@@ -5,7 +5,7 @@ title: "Matchers"
[RestMatchers](../apidocs/org/apache/juneau/rest/matcher/RestMatcher.html) are
used to allow multiple Java methods to be
tied to the same HTTP method and path but differentiated by some request
attribute such as a specific
header value.
-### Example:
+:::tip Example
```java
@@ -33,6 +33,8 @@ public class IsAdminMatcher extends RestMatcher {
return req.isUserInRole("ADMINS_GROUP");
}
}
+:::
+
```
diff --git a/juneau-docs-poc/docs/topics/08.04.02.HttpPartAnnotations.md
b/juneau-docs-poc/docs/topics/08.04.02.HttpPartAnnotations.md
index 594839868..07348cb82 100644
--- a/juneau-docs-poc/docs/topics/08.04.02.HttpPartAnnotations.md
+++ b/juneau-docs-poc/docs/topics/08.04.02.HttpPartAnnotations.md
@@ -113,7 +113,7 @@ The
[@Header](../apidocs/org/apache/juneau/http/annotation/Header.html)/[@Query]
can be used on parameters of
[@RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)-annotated
methods to
get access to request headers, query parameters, form-data parameters, and
path parts.
The most typical scenario is to simply use the `value` field to define
parameter names:
-### Example:
+:::tip Example
```java
@@ -139,8 +139,10 @@ public void doGet(RestRequest req) {
The special name "*" (or blank) can be used to represent all values.
+:::
+
When used, the data type must be a `Map` or bean.
-### Examples:
+:::tip Examples
```java
@@ -165,7 +167,9 @@ public void doGet(@Query MyQueryBean bean) {...}
The [@Content](../apidocs/org/apache/juneau/http/annotation/Content.html)
annotation is used to identify POJOs to be used as the body of an HTTP request.
-### Examples:
+:::
+
+:::tip Examples
```java
@@ -239,7 +243,9 @@ Any [Optional](../apidocs/java/util/Optional.html) of
anything on this list.
When used in combination with the mutable
[Value](../apidocs/org/apache/juneau/Value.html) object, the
[@StatusCode](../apidocs/org/apache/juneau/http/annotation/StatusCode.html) and
[@Header](../apidocs/org/apache/juneau/http/annotation/Header.html) annotations
can be used on parameters
[@RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)-annotated
methods to
to define to response codes and headers.
-### Example:
+:::
+
+:::tip Example
```java
@@ -320,8 +326,10 @@ Schema-based marshalling works for both request and
response parts.
Input will be converted based on the types and formats defined in the schema
definition.
Input validations such as `minLength/maxLength` that don't match the input
will result in automatic `400 Bad Request` responses.
The part and schema annotations are also used for supplying swagger
information about the HTTP part.
+:::
+
This information is used to populate the auto-generated Swagger documentation
and UI.
-### Example:
+:::tip Example
```java
@@ -336,7 +344,9 @@ This information is used to populate the auto-generated
Swagger documentation an
SVL Variables (e.g. "$L\{my.localized.variable\}") are supported on annotation
fields as well.
Among other things, this allow for annotation values to be defined externally
and the ability to produce localized swagger documents
based on the `Accept-Language` on a request.
-### Example:
+:::
+
+:::tip Example
```java
@@ -413,3 +423,5 @@ public class MyPojo3 {
As you can see, the complexity of possible input types expands significantly.
For more information about valid parameter types, see [TODO: OpenAPI
Parsers](TODO.md).
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.04.03.DefaultParts.md
b/juneau-docs-poc/docs/topics/08.04.03.DefaultParts.md
index edafca259..a340b158a 100644
--- a/juneau-docs-poc/docs/topics/08.04.03.DefaultParts.md
+++ b/juneau-docs-poc/docs/topics/08.04.03.DefaultParts.md
@@ -69,7 +69,7 @@ A third option is to specify default values via the
[Rest](../apidocs/org/apache
-
[defaultRequestQueryData](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#defaultRequestQueryData())
-
[defaultResponseHeaders](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#defaultResponseHeaders())
-### Example:
+:::tip Example
```java
@@ -110,3 +110,5 @@ Default parts can also be specified programmatically
through any of the followin
- \{@link oajr.RestOpContext.Builder#defaultRequestQueryData(NameValuePair...)
defaultRequestQueryData(NameValuePair...)\}
-
[defaultResponseHeaders()](../apidocs/org/apache/juneau/rest/RestOpContext/Builder.html#defaultResponseHeaders())
- \{@link oajr.RestOpContext.Builder#defaultResponseHeaders(Header...)
defaultResponseHeaders(Header...)\}
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.04.04.RequestBeans.md
b/juneau-docs-poc/docs/topics/08.04.04.RequestBeans.md
index 710664331..4062156ea 100644
--- a/juneau-docs-poc/docs/topics/08.04.04.RequestBeans.md
+++ b/juneau-docs-poc/docs/topics/08.04.04.RequestBeans.md
@@ -11,7 +11,7 @@ HTTP requests in combination with the following annotations
used on methods:
- [Content](../apidocs/org/apache/juneau/http/annotation/Content.html)
- [Schema](../apidocs/org/apache/juneau/annotation/Schema.html)
-### Example:
+:::tip Example
```java
@@ -54,8 +54,10 @@ The return types of the getters must be the supported
parameter types for the HT
Schema-based serialization and parsing is used just as if used as individual
parameter types.
Annotations used are the exact same used on REST parameters and have all the
same feature support including automatic Swagger validation and documentation.
+:::
+
Part names can either be explicitly specified or automatically inferred from
the getter names.
-### Example:
+:::tip Example
```java
@@ -83,7 +85,9 @@ public interface MyRequest {
For clarity, the @Request annotation can be defined on the parameter, class,
or both.
-### Example:
+:::
+
+:::tip Example
```java
@@ -94,3 +98,5 @@ public void addPet(@Request UpdatePetBean updatePet) {...}
public interface UpdatePetBean {...}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.04.06.HttpPartApis.md
b/juneau-docs-poc/docs/topics/08.04.06.HttpPartApis.md
index 2c746a3ce..2ea50815b 100644
--- a/juneau-docs-poc/docs/topics/08.04.06.HttpPartApis.md
+++ b/juneau-docs-poc/docs/topics/08.04.06.HttpPartApis.md
@@ -9,7 +9,7 @@ can be passed in as parameters or access through
[RestRequest](../apidocs/org/ap
-
[RequestFormParams](../apidocs/org/apache/juneau/rest/httppart/RequestFormParams.html)
-
[RequestPathParams](../apidocs/org/apache/juneau/rest/httppart/RequestPathParams.html)
-### Example:
+:::tip Example
```java
@@ -30,7 +30,9 @@ public Object myMethod(RequestHeaders headers) {
Built in to these APIs are various convenience methods such as converting
parts to
different types or inline fluent assertions:
-### Example:
+:::
+
+:::tip Example
```java
@@ -41,3 +43,5 @@ String foo = request
.get();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.04.RestOpAnnotatedMethods.md
b/juneau-docs-poc/docs/topics/08.04.RestOpAnnotatedMethods.md
index c06e1d60d..41e2847ef 100644
--- a/juneau-docs-poc/docs/topics/08.04.RestOpAnnotatedMethods.md
+++ b/juneau-docs-poc/docs/topics/08.04.RestOpAnnotatedMethods.md
@@ -35,7 +35,7 @@ The annotation allows the framework to identify the available
REST methods throu
- [swagger](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#swagger())
- [value](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#value())
-### Example:
+:::tip Example
```java
@@ -52,7 +52,9 @@ The following specialized annotations are also provided for
specific HTTP method
- [RestPost](../apidocs/org/apache/juneau/rest/annotation/RestPost.html)
- [RestDelete](../apidocs/org/apache/juneau/rest/annotation/RestDelete.html)
-### Example:
+:::
+
+:::tip Example
```java
@@ -62,3 +64,5 @@ public String sayHello() {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.05.HttpParts.md
b/juneau-docs-poc/docs/topics/08.05.HttpParts.md
index a178d6009..65e5d4017 100644
--- a/juneau-docs-poc/docs/topics/08.05.HttpParts.md
+++ b/juneau-docs-poc/docs/topics/08.05.HttpParts.md
@@ -4,7 +4,7 @@ title: "HTTP Parts"
In previous examples we showed the ability to pass in annotated parameters on
[RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)-annotated
methods
to parse standard HTTP parts:
-### Example:
+:::tip Example
```java
@@ -41,6 +41,8 @@ The annotations used for defining the schema for request HTTP
parts are:
These annotation can be used on method parameters or on the parameter types
themselves, or a combination
of both.
+:::
+
:::note
When defined on types, annotations are aggregated from parent to child with
child values
taking precedence. When defined on both, annotations are aggregated with
values on parameters
diff --git a/juneau-docs-poc/docs/topics/08.06.Marshalling.md
b/juneau-docs-poc/docs/topics/08.06.Marshalling.md
index 974de9256..24887d8ba 100644
--- a/juneau-docs-poc/docs/topics/08.06.Marshalling.md
+++ b/juneau-docs-poc/docs/topics/08.06.Marshalling.md
@@ -16,7 +16,7 @@ Serializers and parsers can be associated with REST servlets
using the following
Request bodies are parsed and passed in via
[@Content](../apidocs/org/apache/juneau/http/annotation/Content.html)-annotated
parameters,
and response bodies are returned or thrown by
[@RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)-annotated
methods
and serialized.
-### Example:
+:::tip Example
```java
@@ -129,6 +129,8 @@ Config annotations are defined for all serializers and
parsers:
-
[SoapXmlConfig](../apidocs/org/apache/juneau/soap/annotation/SoapXmlConfig.html)
- [UonConfig](../apidocs/org/apache/juneau/uon/annotation/UonConfig.html)
-
[UrlEncodingConfig](../apidocs/org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html)
+:::
+
- [XmlConfig](../apidocs/org/apache/juneau/xml/annotation/XmlConfig.html)
diff --git a/juneau-docs-poc/docs/topics/08.07.HandlingFormPosts.md
b/juneau-docs-poc/docs/topics/08.07.HandlingFormPosts.md
index 1ee419bdc..9a798e633 100644
--- a/juneau-docs-poc/docs/topics/08.07.HandlingFormPosts.md
+++ b/juneau-docs-poc/docs/topics/08.07.HandlingFormPosts.md
@@ -81,7 +81,7 @@ public class SpringBootAppConfig {
The Juneau framework does not natively support multipart form posts.
However, it can be done in conjunction with the Apache Commons File Upload
library or through the Servlet 3.0 API directly.
The following is an example that uses the File Upload library to allow files
to be uploaded as multipart form posts.
-### Example:
+:::tip Example
```java
@@ -143,3 +143,5 @@ public SeeOtherRoot uploadFile(RestRequest req) throws
Exception {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.08.Guards.md
b/juneau-docs-poc/docs/topics/08.08.Guards.md
index 482dc3af9..ecf8b0e6b 100644
--- a/juneau-docs-poc/docs/topics/08.08.Guards.md
+++ b/juneau-docs-poc/docs/topics/08.08.Guards.md
@@ -13,7 +13,7 @@ Guards are associated with resource classes and methods via
the following:
- [RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)
- [guards](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#guards())
-### Example:
+:::tip Example
```java
@@ -79,9 +79,11 @@ A simplified format is available for matching based on the
user role on the requ
- [Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html)
-
[roleGuard](../apidocs/org/apache/juneau/rest/annotation/Rest.html#roleGuard())
- [RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)
+:::
+
-
[roleGuard](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#roleGuard())
-### Example:
+:::tip Example
```java
@@ -94,3 +96,5 @@ public class MyResource extends BasicRestServlet {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.09.Converters.md
b/juneau-docs-poc/docs/topics/08.09.Converters.md
index 70013c066..dd4535092 100644
--- a/juneau-docs-poc/docs/topics/08.09.Converters.md
+++ b/juneau-docs-poc/docs/topics/08.09.Converters.md
@@ -9,7 +9,7 @@ Converters are associated with resource classes and methods via
the following:
- [RestOp](../apidocs/org/apache/juneau/rest/annotation/RestOp.html)
-
[converters](../apidocs/org/apache/juneau/rest/annotation/RestOp.html#converters())
-### Example:
+:::tip Example
```java
@@ -41,3 +41,5 @@ the request.
[Introspectable](../apidocs/org/apache/juneau/rest/converter/Introspectable.html)
Allows method calls to be made on the response POJO, and for the result of
that method call to be
serialized as the response.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.10.LocalizedMessages.md
b/juneau-docs-poc/docs/topics/08.10.LocalizedMessages.md
index f98d8d958..f5ba7097f 100644
--- a/juneau-docs-poc/docs/topics/08.10.LocalizedMessages.md
+++ b/juneau-docs-poc/docs/topics/08.10.LocalizedMessages.md
@@ -24,7 +24,7 @@ Request-localized messages are also available by passing
either of the following
The value can be a relative path like "nls/Messages", indicating to look for
the resource bundle
"com.foo.sample.nls.Messages" if the resource class is in "com.foo.sample", or
it can be an
absolute path like "com.foo.sample.nls.Messages"
-### Examples:
+:::tip Examples
```ini
@@ -75,3 +75,5 @@ MyResource.HelloMessage = Hello {0}!
Messages are automatically inherited from super classes. If a string cannot
be found in the bundle of the current
class, it will be searched for up the class hierarchy.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.11.Encoders.md
b/juneau-docs-poc/docs/topics/08.11.Encoders.md
index 1b4ac987d..b999b8689 100644
--- a/juneau-docs-poc/docs/topics/08.11.Encoders.md
+++ b/juneau-docs-poc/docs/topics/08.11.Encoders.md
@@ -6,7 +6,7 @@ The
[@Rest(encoders)](../apidocs/org/apache/juneau/rest/annotation/Rest.html#enc
be used to associate character encoders with a servlet class.
Encoders can be used to enable various kinds of compression (e.g. "gzip") on
requests and responses
based on the request Accept-Encoding and Content-Encoding headers.
-### Example:
+:::tip Example
```java
@@ -23,3 +23,5 @@ Juneau defines the following encoders out-of-the-box:
[GzipEncoder](../apidocs/org/apache/juneau/encoders/GzipEncoder.html)
-
[IdentityEncoder](../apidocs/org/apache/juneau/encoders/IdentityEncoder.html)
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.12.ConfigurationFiles.md
b/juneau-docs-poc/docs/topics/08.12.ConfigurationFiles.md
index 9b3708c7b..7142e0918 100644
--- a/juneau-docs-poc/docs/topics/08.12.ConfigurationFiles.md
+++ b/juneau-docs-poc/docs/topics/08.12.ConfigurationFiles.md
@@ -7,7 +7,7 @@ configuration properties can be defined in external files. It
uses the followin
- [Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html)
- [config](../apidocs/org/apache/juneau/rest/annotation/Rest.html#config())
-### Example:
+:::tip Example
```java
@@ -21,7 +21,9 @@ public class MyResource {...}
In recap, the Configuration API provides support for INI-style configuration
files with embedded string variables:
-### Example:
+:::
+
+:::tip Example
```ini
@@ -193,6 +195,8 @@ public class HelloWorldResource extends BasicRestServlet {
return config.get("HelloWorldResource/message").get();
}
}
+:::
+
```
diff --git a/juneau-docs-poc/docs/topics/08.13.SvlVariables.md
b/juneau-docs-poc/docs/topics/08.13.SvlVariables.md
index 0b64e0c83..411e7c1e8 100644
--- a/juneau-docs-poc/docs/topics/08.13.SvlVariables.md
+++ b/juneau-docs-poc/docs/topics/08.13.SvlVariables.md
@@ -176,7 +176,7 @@ Custom variables can be defined on resources via the
following API:
- \{@link oajr.RestContext.Builder#vars(Class...) vars(Class...)\}
- \{@link oajr.RestContext.Builder#vars(Var...) vars(Var...)\}
-### Example:
+:::tip Example
```java
@@ -211,3 +211,5 @@ The methods involved with variables are:
-
[getVarResolver()](../apidocs/org/apache/juneau/rest/RestContext.html#getVarResolver())
- [RestRequest](../apidocs/org/apache/juneau/rest/RestRequest.html)
-
[getVarResolverSession()](../apidocs/org/apache/juneau/rest/RestRequest.html#getVarResolverSession())
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.15.ClientVersioning.md
b/juneau-docs-poc/docs/topics/08.15.ClientVersioning.md
index 940d3b76a..e560b7bc2 100644
--- a/juneau-docs-poc/docs/topics/08.15.ClientVersioning.md
+++ b/juneau-docs-poc/docs/topics/08.15.ClientVersioning.md
@@ -12,7 +12,7 @@ The APIs involved with defining client version headers are:
- [Builder](../apidocs/org/apache/juneau/rest/RestContext/Builder.html)
-
[clientVersionHeader(String)](../apidocs/org/apache/juneau/rest/RestContext/Builder.html#clientVersionHeader(String))
-### Example:
+:::tip Example
```java
@@ -40,3 +40,5 @@ public class MyResource {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.17.02.HtmlWidgets.md
b/juneau-docs-poc/docs/topics/08.17.02.HtmlWidgets.md
index 554a237ac..4b2ee2dff 100644
--- a/juneau-docs-poc/docs/topics/08.17.02.HtmlWidgets.md
+++ b/juneau-docs-poc/docs/topics/08.17.02.HtmlWidgets.md
@@ -8,7 +8,7 @@ They are registered in the following location:
-
[HtmlDocConfig](../apidocs/org/apache/juneau/html/annotation/HtmlDocConfig.html)
-
[widgets](../apidocs/org/apache/juneau/html/annotation/HtmlDocConfig.html#widgets())
-### Example:
+:::tip Example
```java
@@ -73,3 +73,5 @@ public class MyWidget extends Widget {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/08.19.LoggingAndDebugging.md
b/juneau-docs-poc/docs/topics/08.19.LoggingAndDebugging.md
index f16d414b0..5e9cbcca0 100644
--- a/juneau-docs-poc/docs/topics/08.19.LoggingAndDebugging.md
+++ b/juneau-docs-poc/docs/topics/08.19.LoggingAndDebugging.md
@@ -19,7 +19,7 @@ The possible annotation values are:
"true" - Debug is enabled for all requests.
"false" - Debug is disabled for all requests.
"conditional" - Debug is enabled only for requests that have a Debug: true
header.
-### Example
+:::tip Example
```java
@@ -73,6 +73,8 @@ HTTP calls can be logged with the following levels of
granularity:
-
[HEADER](../apidocs/org/apache/juneau/rest/logger/CallLoggingDetail.html#HEADER)
-
[ENTITY](../apidocs/org/apache/juneau/rest/logger/CallLoggingDetail.html#ENTITY)
+:::
+
The following examples show the output format for each detail type:
### STATUS_LINE
diff --git a/juneau-docs-poc/docs/topics/10.01.Juneau-rest-client.md
b/juneau-docs-poc/docs/topics/10.01.Juneau-rest-client.md
index 746d321fe..3929c090d 100644
--- a/juneau-docs-poc/docs/topics/10.01.Juneau-rest-client.md
+++ b/juneau-docs-poc/docs/topics/10.01.Juneau-rest-client.md
@@ -15,7 +15,7 @@ juneau-rest-client-9.0.1.jar
org.apache.juneau.rest.client_9.0.1.jar
Built upon the feature-rich Apache HttpClient library, the Juneau RestClient
API adds support for fluent-style
REST calls and the ability to perform marshalling of POJOs to and from HTTP
parts.
-### Example:
+:::tip Example
```java
@@ -48,8 +48,10 @@ MyBean bean = content.as(MyBean.class);
```
+:::
+
It additionally provides support for creating remote proxy interfaces using
REST as the transport medium.
-### Example:
+:::tip Example
```java
@@ -84,7 +86,9 @@ Instances of this class are built using the
[Builder](../apidocs/org/apache/june
the
[RestClient.create()](../apidocs/org/apache/juneau/rest/client/RestClient.html#create())
method as shown above.
Clients are typically created with a root URI so that relative URIs can be
used when making requests.
This is done using the
[Builder#rootUrl(Object)](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#rootUrl(Object))
method.
-### Example:
+:::
+
+:::tip Example
```java
@@ -128,3 +132,5 @@ String content =
client.get(URI).run().getContent().asString();
int status = client.get(URI).complete().getStatusCode();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.02.PojoMarshalling.md
b/juneau-docs-poc/docs/topics/10.02.PojoMarshalling.md
index 5aa2f89b4..f8e928a9b 100644
--- a/juneau-docs-poc/docs/topics/10.02.PojoMarshalling.md
+++ b/juneau-docs-poc/docs/topics/10.02.PojoMarshalling.md
@@ -15,7 +15,7 @@ Other languages can be specified using any of the following
builder methods:
-
[urlEnc()](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#urlEnc())
-
[openApi()](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#openApi())
-### Example:
+:::tip Example
```java
@@ -26,7 +26,9 @@ RestClient client = RestClient.create().json5().build();
Clients can also support multiple languages:
-### Example:
+:::
+
+:::tip Example
```java
@@ -67,8 +69,10 @@ client.post(URI, myBean)
The
[Builder](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html)
class provides convenience methods for setting common serializer and parser
+:::
+
settings.
-### Example:
+:::tip Example
```java
@@ -90,3 +94,5 @@ and
[HttpPartParser](../apidocs/org/apache/juneau/httppart/HttpPartParser.html)
- [Builder](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html)
- [partSerializer(Class\<? extends
HttpPartSerializer\>)](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#partSerializer(Class))
- [partParser(Class\<? extends
HttpPartParser\>)](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#partParser(Class))
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.03.RequestParts.md
b/juneau-docs-poc/docs/topics/10.03.RequestParts.md
index 70a832f24..738df61fc 100644
--- a/juneau-docs-poc/docs/topics/10.03.RequestParts.md
+++ b/juneau-docs-poc/docs/topics/10.03.RequestParts.md
@@ -53,7 +53,7 @@ Convenience methods are also provided for quickly adding
parts:
-
[pathDataBean(Object)](../apidocs/org/apache/juneau/rest/client/RestRequest.html#pathDataBean(Object))
- \{@link oajrc.RestRequest#pathDataPairs(String...) pathDataPairs(String...)\}
-### Example:
+:::tip Example
```java
@@ -67,7 +67,9 @@ String response =
client.get(URI).header("Foo","bar").run().getContent().asStrin
The supplier methods are particularly useful for header values whose values
may change over time (such as `Authorization` headers
which may need to change every few minutes).
-### Example:
+:::
+
+:::tip Example
```java
@@ -76,6 +78,8 @@ RestClient client =
RestClient.create().header("Authorization", ()->getMyAuthTok
```
+:::
+
:::info See Also
- [header](../apidocs/org/apache/juneau/http/header.html) - Predefined
[Header](../apidocs/org/apache/http/Header.html) beans.
diff --git a/juneau-docs-poc/docs/topics/10.04.RequestContent.md
b/juneau-docs-poc/docs/topics/10.04.RequestContent.md
index 2aaa92fc5..89e264f13 100644
--- a/juneau-docs-poc/docs/topics/10.04.RequestContent.md
+++ b/juneau-docs-poc/docs/topics/10.04.RequestContent.md
@@ -21,7 +21,7 @@ The request body can be any of the following types:
[PartList](../apidocs/org/apache/juneau/http/part/PartList.html) - Converted
to a URL-encoded FORM post.
-
[Supplier](../apidocs/java/util/function/Supplier.html) - A supplier of
anything on this list.
-### Examples:
+:::tip Examples
```java
@@ -54,3 +54,5 @@ client
If the serializer on the client or request is explicitly set to null, POJOs
will be converted to strings
using the registered part serializer as content type "text/plain. If the part
serializer is also null,
POJOs will be converted to strings using
[ClassMeta#toString(Object)](../apidocs/org/apache/juneau/ClassMeta.html#toString(Object))
which typically just calls
[Object#toString()](../apidocs/java/lang/Object.html#toString()).
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.05.ResponseStatus.md
b/juneau-docs-poc/docs/topics/10.05.ResponseStatus.md
index cf4b176ac..6c3794f5d 100644
--- a/juneau-docs-poc/docs/topics/10.05.ResponseStatus.md
+++ b/juneau-docs-poc/docs/topics/10.05.ResponseStatus.md
@@ -10,7 +10,7 @@ to get the response status:
-
`[getReasonPhrase()](../apidocs/org/apache/juneau/rest/client/RestResponse.html#getReasonPhrase())
returns String`
-
`[assertStatus()](../apidocs/org/apache/juneau/rest/client/RestResponse.html#assertStatus())
returns
[FluentResponseStatusLineAssertion](../apidocs/org/apache/juneau/rest/client/assertion/FluentResponseStatusLineAssertion.html)`
-### Example:
+:::tip Example
```java
@@ -20,7 +20,9 @@ int statusCode = client.get(URI).complete().getStatusCode();
Equivalent methods with mutable parameters are provided to allow access to
status values without breaking fluent call chains.
-### Example:
+:::
+
+:::tip Example
```java
@@ -33,6 +35,8 @@ System.err.println("statusCode="+statusCode.get()+",
reasonPhrase="+reasonPhrase
```
+:::
+
:::note
If you are only interested in the response status and not the response body,
be sure to use
[RestRequest#complete()](../apidocs/org/apache/juneau/rest/client/RestRequest.html#complete())
instead
of
[RestRequest#run()](../apidocs/org/apache/juneau/rest/client/RestRequest.html#run())
to make sure the response body gets automatically cleaned up. Otherwise you
must
@@ -40,7 +44,7 @@ consume the response yourself.
:::
The assertion method is provided for quickly asserting status codes in fluent
calls.
-### Example:
+:::tip Example
```java
@@ -57,3 +61,5 @@ String content2 = client.get(URI)
.getContent().asString();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.06.ResponseHeaders.md
b/juneau-docs-poc/docs/topics/10.06.ResponseHeaders.md
index 78383cc48..b4fee1495 100644
--- a/juneau-docs-poc/docs/topics/10.06.ResponseHeaders.md
+++ b/juneau-docs-poc/docs/topics/10.06.ResponseHeaders.md
@@ -15,7 +15,7 @@ Response headers are accessed through the following methods:
Unlike
[RestResponse#getFirstHeader(String)](../apidocs/org/apache/juneau/rest/client/RestResponse.html#getFirstHeader(String))
and
[RestResponse#getLastHeader(String)](../apidocs/org/apache/juneau/rest/client/RestResponse.html#getLastHeader(String)),
the
[RestResponse#getHeader(String)](../apidocs/org/apache/juneau/rest/client/RestResponse.html#getHeader(String))
method returns an empty
[ResponseHeader](../apidocs/org/apache/juneau/rest/client/ResponseHeader.html)
object instead of returning null.
This allows it to be used more easily in fluent calls.
-### Example:
+:::tip Example
```java
@@ -56,7 +56,9 @@ methods:
The
[ResponseHeader#schema(HttpPartSchema)](../apidocs/org/apache/juneau/rest/client/ResponseHeader.html#schema(HttpPartSchema))
method allows you to perform parsing of OpenAPI formats for
header parts.
-### Example:
+:::
+
+:::tip Example
```java
@@ -77,7 +79,9 @@ Assertion methods are also provided for fluent-style calls:
Note how in the following example, the fluent assertion returns control to the
[RestResponse](../apidocs/org/apache/juneau/rest/client/RestResponse.html)
object after
the assertion has been completed:
-### Example:
+:::
+
+:::tip Example
```java
@@ -88,3 +92,5 @@ String content = client.get(URI)
.getContent().asString();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.07.ResponseContent.md
b/juneau-docs-poc/docs/topics/10.07.ResponseContent.md
index 213ace81a..1289bf67f 100644
--- a/juneau-docs-poc/docs/topics/10.07.ResponseContent.md
+++ b/juneau-docs-poc/docs/topics/10.07.ResponseContent.md
@@ -26,7 +26,7 @@ methods:
-
`[asMatcher(Pattern)](../apidocs/org/apache/juneau/rest/client/ResponseContent.html#asMatcher(Pattern))
returns [Matcher](../apidocs/java/util/regex/Matcher.html)`
-
`[asMatcher(String)](../apidocs/org/apache/juneau/rest/client/ResponseContent.html#asMatcher(String))
returns [Matcher](../apidocs/java/util/regex/Matcher.html)`
-### Examples:
+:::tip Examples
```java
@@ -92,7 +92,9 @@ Assertion methods are also provided for fluent-style calls:
-
`[assertObject(Class)](../apidocs/org/apache/juneau/rest/client/ResponseContent.html#assertObject(Class))
returns
[FluentObjectAssertion](../apidocs/org/apache/juneau/assertions/FluentObjectAssertion.html)`
- `\{@link oajrc.ResponseContent#assertObject(Type,Type...)
assertObject(Type,Type...)\} returns
[FluentObjectAssertion](../apidocs/org/apache/juneau/assertions/FluentObjectAssertion.html)`
-### Example:
+:::
+
+:::tip Example
```java
@@ -107,7 +109,9 @@ String content = client
Object assertions allow you to parse the response body into a POJO and then
perform various tests on that resulting
POJO.
-### Example:
+:::
+
+:::tip Example
```java
@@ -118,3 +122,5 @@ MyBean bean = client.get(URI)
.getContent().as(MyBean.class);
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.08.CustomCallHandlers.md
b/juneau-docs-poc/docs/topics/10.08.CustomCallHandlers.md
index f706ac876..e4d629d7f 100644
--- a/juneau-docs-poc/docs/topics/10.08.CustomCallHandlers.md
+++ b/juneau-docs-poc/docs/topics/10.08.CustomCallHandlers.md
@@ -8,7 +8,7 @@ The
[RestCallHandler](../apidocs/org/apache/juneau/rest/client/RestCallHandler.h
-
[RestCallHandler](../apidocs/org/apache/juneau/rest/client/RestCallHandler.html)
- `\{@link oajrc.RestCallHandler#run(HttpHost,HttpRequest,HttpContext)
run(HttpHost,HttpRequest,HttpContext)\} returns HttpResponse`
-### Example:
+:::tip Example
```java
@@ -43,3 +43,5 @@ RestClient client = RestClient()
Note that there are other ways of accomplishing this such as extending the
[RestClient](../apidocs/org/apache/juneau/rest/client/RestClient.html) class
and overriding
the \{@link oajrc.RestClient#run(HttpHost,HttpRequest,HttpContext)\} method
or by defining your own
[HttpRequestExecutor](../apidocs/org/apache/http/protocol/HttpRequestExecutor.html).
Using this interface is often simpler though.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.09.01.Remote.md
b/juneau-docs-poc/docs/topics/10.09.01.Remote.md
index 6f30456ac..013969654 100644
--- a/juneau-docs-poc/docs/topics/10.09.01.Remote.md
+++ b/juneau-docs-poc/docs/topics/10.09.01.Remote.md
@@ -16,7 +16,7 @@ The @Remote annotation is optional but often included for
code readability.
The [@Remote(path)](../apidocs/org/apache/juneau/http/remote/Remote.html#path)
annotation is used to define the
HTTP path of the REST service.
The path can be an absolute path to your REST service.
-### Example:
+:::tip Example
```java
@@ -30,8 +30,10 @@ PetStore store = client.getRemote(PetStore.class);
```
+:::
+
[TODO: VarResolver.DEFAULT](TODO.md) can also be used in the path.
-### Example:
+:::tip Example
```java
@@ -42,7 +44,9 @@ public interface PetStore {...}
When a relative path is specified, it's relative to the root-url defined on
the `RestClient` used to instantiate the interface.
-### Example:
+:::
+
+:::tip Example
```java
@@ -62,8 +66,10 @@ PetStore store = client.getRemote(PetStore.class);
```
+:::
+
When no path is specified, the root-url defined on the `RestClient` is used.
-### Example:
+:::tip Example
```java
@@ -80,6 +86,8 @@ RestClient client = RestClient
.build();
PetStore store = client.getRemote(PetStore.class);
+:::
+
```
@@ -87,7 +95,7 @@ PetStore store = client.getRemote(PetStore.class);
The
[@Remote(headers)](../apidocs/org/apache/juneau/http/remote/Remote.html#headers)
and
[@Remote(headerList)](../apidocs/org/apache/juneau/http/remote/Remote.html#headerList)
annotations are used to add headers on all requests.
-### Example:
+:::tip Example
```java
@@ -108,6 +116,8 @@ public interface PetStore {...}
public class MyHeaderList extends HeaderList {
...
}
+:::
+
```
@@ -116,7 +126,7 @@ public class MyHeaderList extends HeaderList {
The
[@Remote(version)](../apidocs/org/apache/juneau/http/remote/Remote.html#version)
and
[@Remote(versionHeader)](../apidocs/org/apache/juneau/http/remote/Remote.html#versionHeader)
annotations are used to specify the client-side version of this interface that
can be used on the server side
to perform version-specific handling.
-### Example:
+:::tip Example
```java
@@ -143,6 +153,8 @@ public Object foo() {...}
// Call this method if Client-Version is less than 1.1.
@RestGet(clientVersion="[0,1.1)")
public Object foo() {...}
+:::
+
```
diff --git a/juneau-docs-poc/docs/topics/10.09.02.RemoteMethod.md
b/juneau-docs-poc/docs/topics/10.09.02.RemoteMethod.md
index 06943a733..aa85d0c0a 100644
--- a/juneau-docs-poc/docs/topics/10.09.02.RemoteMethod.md
+++ b/juneau-docs-poc/docs/topics/10.09.02.RemoteMethod.md
@@ -19,7 +19,7 @@ Specialized sub-annotations are provided for common HTTP
methods:
### @RemoteOp(method/path)
The HTTP method and path are mapped to a Java method using the `method` and
`path` annotations.
-### Example:
+:::tip Example
```java
@@ -34,6 +34,8 @@ public interface PetStore {
The Java method name can be anything.
+:::
+
### Inferred method/path
In such cases, `method` and `path` annotations are optional if you follow
certain naming
@@ -64,7 +66,7 @@ do(?i)(get|put|post|delete|options|head|connect|trace|patch)
```
-### Examples:
+:::tip Examples
Java method name
Inferred HTTP method
@@ -90,6 +92,8 @@ GET
doFoo()
[default]
/doFoo
+:::
+
### @RemoteOp(returns)
The return type of the Java methods of can be any of the following:
@@ -121,7 +125,7 @@ Any
[@Response](../apidocs/org/apache/juneau/http/annotation/Response.html)-anno
A [Future](../apidocs/java/util/concurrent/Future.html) or
[CompletableFuture](../apidocs/java/util/concurrent/CompletableFuture.html) of
anything on this list.
If you're only interested in the HTTP status code of the response, you can use
the [returns](../apidocs/org/apache/juneau/http/remote/RemoteOp.html#returns())
annotation with a value of
[STATUS](../apidocs/org/apache/juneau/http/remote/RemoteReturn.html#STATUS):
-### Example:
+:::tip Example
```java
@@ -138,3 +142,5 @@ public interface PetStore {
If your `RestClient` does not have a parser associated with it, then the value
is converted directly from a String using
the rules defined in [TODO: POJO Categories](TODO.md).
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.09.03.Content.md
b/juneau-docs-poc/docs/topics/10.09.03.Content.md
index 9a170d32d..49795e909 100644
--- a/juneau-docs-poc/docs/topics/10.09.03.Content.md
+++ b/juneau-docs-poc/docs/topics/10.09.03.Content.md
@@ -7,7 +7,7 @@ to denote that they are the HTTP body of the request.
- [Content](../apidocs/org/apache/juneau/http/annotation/Content.html)
- [schema](../apidocs/org/apache/juneau/http/annotation/Content.html#schema())
-### Examples:
+:::tip Examples
```java
@@ -95,3 +95,5 @@ String addCommaDelimitedPipeDelimitedInts(
See [TODO: OpenAPI Serializers](TODO.md) for information about supported data
types in OpenAPI serialization.
If your `RestClient` class does not have a serializer associated with it, the
body will automatically be serialized to a
string using the rules defined in [TODO: POJO Categories](TODO.md).
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.09.04.FormData.md
b/juneau-docs-poc/docs/topics/10.09.04.FormData.md
index 382f222c3..751037700 100644
--- a/juneau-docs-poc/docs/topics/10.09.04.FormData.md
+++ b/juneau-docs-poc/docs/topics/10.09.04.FormData.md
@@ -8,7 +8,7 @@ to denote that they are form-data parameters on the request.
- [name](../apidocs/org/apache/juneau/http/annotation/FormData.html#name()) -
Form data entry name.
-
[serializer](../apidocs/org/apache/juneau/http/annotation/FormData.html#serializer())
- Override the part serializer.
-### Example:
+:::tip Example
```java
@@ -67,6 +67,8 @@ Values serialized using the registered
[HttpPartSerializer](../apidocs/org/apach
`CharSequence` - Used directly as am "application/x-www-form-urlencoded"
entity.
See the link below for information about supported data types in OpenAPI
serialization.
+:::
+
:::info See Also
- [TODO: OpenAPI Serializers](TODO.md)
diff --git a/juneau-docs-poc/docs/topics/10.09.05.Query.md
b/juneau-docs-poc/docs/topics/10.09.05.Query.md
index 7780bc8d1..1f59b11fc 100644
--- a/juneau-docs-poc/docs/topics/10.09.05.Query.md
+++ b/juneau-docs-poc/docs/topics/10.09.05.Query.md
@@ -8,7 +8,7 @@ to denote that they are query parameters on the request.
- [name](../apidocs/org/apache/juneau/http/annotation/Query.html#name()) -
Query parameter name.
-
[serializer](../apidocs/org/apache/juneau/http/annotation/Query.html#serializer())
- Override the part serializer.
-### Example:
+:::tip Example
```java
@@ -68,6 +68,8 @@ Values serialized using the registered
[HttpPartSerializer](../apidocs/org/apach
`CharSequence` - Serialized directly a query string.
See the link below for information about supported data types in OpenAPI
serialization.
+:::
+
:::info See Also
- [TODO: OpenAPI Serializers](TODO.md)
diff --git a/juneau-docs-poc/docs/topics/10.09.06.Header.md
b/juneau-docs-poc/docs/topics/10.09.06.Header.md
index f3468eece..22ddbd09e 100644
--- a/juneau-docs-poc/docs/topics/10.09.06.Header.md
+++ b/juneau-docs-poc/docs/topics/10.09.06.Header.md
@@ -8,7 +8,7 @@ to denote that they are header parameters on the request.
- [name](../apidocs/org/apache/juneau/http/annotation/Header.html#name()) -
Header name.
-
[serializer](../apidocs/org/apache/juneau/http/annotation/Header.html#serializer())
- Override the part serializer.
-### Example:
+:::tip Example
```java
@@ -54,6 +54,8 @@ Bean - Converted to key-value pairs.
Values serialized using the registered
[HttpPartSerializer](../apidocs/org/apache/juneau/httppart/HttpPartSerializer.html)
([OpenApiSerializer](../apidocs/org/apache/juneau/oapi/OpenApiSerializer.html)
by default).
See the link below for information about supported data types in OpenAPI
serialization.
+:::
+
:::info See Also
- [TODO: OpenAPI Serializers](TODO.md)
diff --git a/juneau-docs-poc/docs/topics/10.09.07.Path.md
b/juneau-docs-poc/docs/topics/10.09.07.Path.md
index 5fa8e4f73..7f88b3c74 100644
--- a/juneau-docs-poc/docs/topics/10.09.07.Path.md
+++ b/juneau-docs-poc/docs/topics/10.09.07.Path.md
@@ -8,7 +8,7 @@ to denote that they are path parameters on the request.
- [name](../apidocs/org/apache/juneau/http/annotation/Path.html#name()) - Path
variable name.
-
[serializer](../apidocs/org/apache/juneau/http/annotation/Path.html#serializer())
- Override the part serializer.
-### Example:
+:::tip Example
```java
@@ -53,6 +53,8 @@ Bean - Converted to key-value pairs.
Values serialized using the registered
[HttpPartSerializer](../apidocs/org/apache/juneau/httppart/HttpPartSerializer.html)
([OpenApiSerializer](../apidocs/org/apache/juneau/oapi/OpenApiSerializer.html)
by default).
See the link below for information about supported data types in OpenAPI
serialization.
+:::
+
:::info See Also
- [TODO: OpenAPI Serializers](TODO.md)
diff --git a/juneau-docs-poc/docs/topics/10.09.08.Request.md
b/juneau-docs-poc/docs/topics/10.09.08.Request.md
index ce962d89e..4ee2eec12 100644
--- a/juneau-docs-poc/docs/topics/10.09.08.Request.md
+++ b/juneau-docs-poc/docs/topics/10.09.08.Request.md
@@ -7,7 +7,7 @@ to identify it as a bean for setting HTTP parts through a
bean-like interface.
- [Request](../apidocs/org/apache/juneau/http/annotation/Request.html)
-
[serializer](../apidocs/org/apache/juneau/http/annotation/Request.html#serializer())
- Override the part serializer.
-### Example:
+:::tip Example
```java
@@ -109,3 +109,5 @@ public class CreatePetRequestImpl implements
CreatePetRequest {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.09.09.Response.md
b/juneau-docs-poc/docs/topics/10.09.09.Response.md
index d74e55c0a..8d81874ef 100644
--- a/juneau-docs-poc/docs/topics/10.09.09.Response.md
+++ b/juneau-docs-poc/docs/topics/10.09.09.Response.md
@@ -7,7 +7,7 @@ The
[@Response](../apidocs/org/apache/juneau/http/annotation/Response.html) anno
-
[parser](../apidocs/org/apache/juneau/http/annotation/Response.html#parser()) -
Override the part parser.
The @Response annotation can be used to define interfaces for retrieving
response parts using a bean-like proxy.
-### Example:
+:::tip Example
```java
@@ -54,3 +54,5 @@ Any of the following annotations can be used on the methods:
- [StatusCode](../apidocs/org/apache/juneau/http/annotation/StatusCode.html)
The behavior and functionality of all of the annotations are the same as if
they were used on method arguments directly. This means full support for
OpenAPI serialization and validation.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.09.Interceptors.md
b/juneau-docs-poc/docs/topics/10.09.Interceptors.md
index 0d2226d9e..f4d174a15 100644
--- a/juneau-docs-poc/docs/topics/10.09.Interceptors.md
+++ b/juneau-docs-poc/docs/topics/10.09.Interceptors.md
@@ -13,7 +13,7 @@ the existing
[HttpRequestInterceptor](../apidocs/org/apache/http/HttpRequestInte
- \{@link oajrc.RestCallInterceptor#onConnect(RestRequest,RestResponse)
onConnect(RestRequest,RestResponse)\}
- \{@link oajrc.RestCallInterceptor#onClose(RestRequest,RestResponse)
onClose(RestRequest,RestResponse)\}
-### Example:
+:::tip Example
```java
@@ -43,3 +43,5 @@ RestClient client = RestClient
.build();
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.10.Proxies.md
b/juneau-docs-poc/docs/topics/10.10.Proxies.md
index da9aa09a3..c567cc40b 100644
--- a/juneau-docs-poc/docs/topics/10.10.Proxies.md
+++ b/juneau-docs-poc/docs/topics/10.10.Proxies.md
@@ -24,7 +24,7 @@ post parameters, or request/response bodies.
- [Request](../apidocs/org/apache/juneau/http/annotation/Request.html)
- [Response](../apidocs/org/apache/juneau/http/annotation/Response.html)
-### Example:
+:::tip Example
```java
@@ -70,8 +70,10 @@ E-Tag: 475588d4-0b27-4f56-9296-cc683251d314
The @RemoteOp annotations can be eliminated if you use specific naming
conventions on your
+:::
+
method names to identify the HTTP method and path.
-### Example:
+:::tip Example
```java
@@ -83,3 +85,5 @@ public interface PetStore {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.11.LoggingAndDebugging.md
b/juneau-docs-poc/docs/topics/10.11.LoggingAndDebugging.md
index acd4b2cd5..62b2fcf3b 100644
--- a/juneau-docs-poc/docs/topics/10.11.LoggingAndDebugging.md
+++ b/juneau-docs-poc/docs/topics/10.11.LoggingAndDebugging.md
@@ -9,7 +9,7 @@ The following methods provide logging of requests and responses:
- \{@link oajrc.RestClient.Builder#logRequests(DetailLevel,Level,BiPredicate)
logRequests(DetailLevel,Level,BiPredicate)\}
The following example shows the results of logging all requests that end with
`/bean`.
-### Examples:
+:::tip Examples
```java
@@ -58,3 +58,5 @@ Additionally, the following method is also provided for
enabling debug mode:
Enabling debug mode has the following effects:
-
[Builder#logToConsole()](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#logToConsole())
is called.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.12.CustomizingHttpClient.md
b/juneau-docs-poc/docs/topics/10.12.CustomizingHttpClient.md
index 6dc66b792..92cb68747 100644
--- a/juneau-docs-poc/docs/topics/10.12.CustomizingHttpClient.md
+++ b/juneau-docs-poc/docs/topics/10.12.CustomizingHttpClient.md
@@ -10,7 +10,7 @@ Several methods are provided for customizing the underlying
HTTP client and clie
-
[createConnectionManager()](../apidocs/org/apache/juneau/rest/client/RestClient/Builder.html#createConnectionManager())
- Override to create the connection management.
Additionally, all methods on the `HttpClientBuilder` class have been extended
with fluent setters.
-### Example:
+:::tip Example
```java
@@ -25,3 +25,5 @@ MyBean bean = RestClient
Refer to the \{@code org.apache.http.client.impl.HttpClientBuilder\} docs for
more information.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.13.01.AuthenticationBASIC.md
b/juneau-docs-poc/docs/topics/10.13.01.AuthenticationBASIC.md
index 940abb53c..b34fc001b 100644
--- a/juneau-docs-poc/docs/topics/10.13.01.AuthenticationBASIC.md
+++ b/juneau-docs-poc/docs/topics/10.13.01.AuthenticationBASIC.md
@@ -4,7 +4,7 @@ title: "BASIC Authentication"
The \{@link oajrc.RestClient.Builder#basicAuth(String,int,String,String)\}
method
can be used to quickly enable BASIC authentication support.
-### Example:
+:::tip Example
```java
@@ -26,3 +26,5 @@ provider.setCredentials(scope, up);
builder.setDefaultCredentialsProvider(provider);
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/10.13.ExtendingRestClient.md
b/juneau-docs-poc/docs/topics/10.13.ExtendingRestClient.md
index 2e07315d2..0d7775697 100644
--- a/juneau-docs-poc/docs/topics/10.13.ExtendingRestClient.md
+++ b/juneau-docs-poc/docs/topics/10.13.ExtendingRestClient.md
@@ -4,7 +4,7 @@ title: "Extending RestClient"
The `RestClient` API has been designed to allow for the ability to be easily
extended.
The following example that overrides the primary run method shows how this can
be done.
-### Example:
+:::tip Example
```java
@@ -28,3 +28,5 @@ MyRestClient client =
RestClient.create().json().build(MyRestClient.class);
The [RestRequest](../apidocs/org/apache/juneau/rest/client/RestRequest.html)
and [RestResponse](../apidocs/org/apache/juneau/rest/client/RestResponse.html)
objects can also be extended and integrated by overriding the
\{@link oajrc.RestClient#createRequest(URI, String, boolean)\} and \{@link
oajrc.RestClient#createResponse(RestRequest, HttpResponse, Parser)\} methods.
+
+:::
diff --git a/juneau-docs-poc/docs/topics/11.02.MockRestClient.md
b/juneau-docs-poc/docs/topics/11.02.MockRestClient.md
index 139b3bb42..fa8880cf6 100644
--- a/juneau-docs-poc/docs/topics/11.02.MockRestClient.md
+++ b/juneau-docs-poc/docs/topics/11.02.MockRestClient.md
@@ -130,7 +130,7 @@ public class MockTest {
The
[MockRestRequest](../apidocs/org/apache/juneau/rest/mock/MockRestRequest.html)
object has convenience methods provided to allow you to set properties
directly on the underlying
[HttpServletRequest](../apidocs/jakarta/servlet/http/HttpServletRequest.html)
object. The following example shows how
this can be used to directly set roles on the request object to perform
security testing.
-### Example:
+:::tip Example
```java
@@ -166,8 +166,10 @@ MockRestClient client = MockRestClient
The
[MockRestClient](../apidocs/org/apache/juneau/rest/mock/MockRestClient.html)
class can also be used for testing of
[Remote](../apidocs/org/apache/juneau/http/remote/Remote.html)-annotated
+:::
+
interfaces against
[@Rest](../apidocs/org/apache/juneau/rest/annotation/Rest.html)-annotated
resources.
-### Example:
+:::tip Example
```java
@@ -201,3 +203,5 @@ public void testProxy() {
}
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/12.04.Args.md
b/juneau-docs-poc/docs/topics/12.04.Args.md
index 9f5ccd51e..490e451d0 100644
--- a/juneau-docs-poc/docs/topics/12.04.Args.md
+++ b/juneau-docs-poc/docs/topics/12.04.Args.md
@@ -3,7 +3,7 @@ title: "Args"
---
Command-line arguments can be associated with a microservice using the \{@link
oaj.microservice.Microservice.Builder#args(String...)\} method.
-### Example:
+:::tip Example
```java
@@ -61,8 +61,10 @@ List a2 = args.getArgs("a2"); // Contains ["v2a","v2b"]
Specifying the command-line arguments also makes them available through
[$A](../apidocs/org/apache/juneau/svl/vars/ArgsVar.html) SVL variables.
+:::
+
These can be used in the configuration file and throughout various Juneau
annotations.
-### Example:
+:::tip Example
```java
@@ -80,3 +82,5 @@ System.out.println(varResolver.resolve("Arg #1 is set to
$A{1}"));
)
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/12.05.Manifest.md
b/juneau-docs-poc/docs/topics/12.05.Manifest.md
index 10a06b730..be4047a80 100644
--- a/juneau-docs-poc/docs/topics/12.05.Manifest.md
+++ b/juneau-docs-poc/docs/topics/12.05.Manifest.md
@@ -24,7 +24,7 @@ The manifest file can be retrieved using the the
[Microservice#getManifest()](..
provides an API for accessing manifest file entries.
This method returns an instance of
[ManifestFile](../apidocs/org/apache/juneau/utils/ManifestFile.html) which
extends from [JsonMap](../apidocs/org/apache/juneau/collections/JsonMap.html)
allowing
you to retrieve entries as any data types supported by that class.
-### Example:
+:::tip Example
```java
@@ -37,7 +37,9 @@ boolean myBoolean = manifestFile.getBoolean("My-Boolean");
The manifest is also used for the
[$MF](../apidocs/org/apache/juneau/svl/vars/ManifestFileVar.html) SVL variable.
-### Examples:
+:::
+
+:::tip Examples
```java
@@ -55,3 +57,5 @@ System.out.println(vr.resolve("The main class is
$MF{Main-Class}"));
)
```
+
+:::
diff --git a/juneau-docs-poc/docs/topics/13.06.Config.md
b/juneau-docs-poc/docs/topics/13.06.Config.md
index fedb19a26..b81685c54 100644
--- a/juneau-docs-poc/docs/topics/13.06.Config.md
+++ b/juneau-docs-poc/docs/topics/13.06.Config.md
@@ -86,9 +86,7 @@ Any initialization-time variables can be used.
-
[RestContext#getConfig()](../apidocs/org/apache/juneau/rest/RestContext.html#getConfig())
Any initialization-time variables can be used.
-### Example usage:
-
-
+:::tip Example usage
```ini
#----------------------------------
# Configuration for MyHelloResource
@@ -126,9 +124,7 @@ and using the oajr.RestContext.Builder.vars(Class...)
method.
- An instance method to access it from inside a REST method.
Any initialization-time or request-time variables can be used.
-### Example usage:
-
-
+:::tip Example usage
```ini
#----------------------------------
# Configuration for MyHelloResource
diff --git a/juneau-docs-poc/docs/topics/TODO.md
b/juneau-docs-poc/docs/topics/TODO.md
index d550b1d72..be0df0252 100644
--- a/juneau-docs-poc/docs/topics/TODO.md
+++ b/juneau-docs-poc/docs/topics/TODO.md
@@ -26,12 +26,14 @@ The following sections are planned but not yet linked:
- juneau-rest-client
- juneau-rest-mock
-### Examples
+:::tip Examples
- juneau-examples-core
- juneau-examples-rest
- my-springboot-microservice
+:::
+
### Detailed Topics
- PojoCategories
diff --git a/juneau-docs-poc/fix-remaining-examples.js
b/juneau-docs-poc/fix-remaining-examples.js
new file mode 100644
index 000000000..6a37e71b7
--- /dev/null
+++ b/juneau-docs-poc/fix-remaining-examples.js
@@ -0,0 +1,64 @@
+#!/usr/bin/env node
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+const fs = require('fs');
+const path = require('path');
+
+function fixRemainingExamples(content) {
+ // Handle "### Example configuration file:" and similar patterns
+ return content.replace(
+ /^### Example ([^:]*):?\s*$/gm,
+ ':::tip Example $1'
+ ).replace(
+ /^### Examples ([^:]*):?\s*$/gm,
+ ':::tip Examples $1'
+ );
+}
+
+// List of files that still have unconverted example headers
+const filesToFix = [
+ 'docs/topics/01.04.RestServer.md',
+ 'docs/topics/13.06.Config.md',
+ 'docs/topics/08.02.04.Deployment.md',
+ 'docs/topics/05.10.03.CustomStores.md',
+ 'docs/topics/05.02.Overview.md',
+ 'docs/topics/04.03.Atom.md',
+ 'docs/topics/01.07.ConfigFiles.md',
+ 'docs/topics/02.26.04.XmlBeanTypeNameAnnotation.md'
+];
+
+const baseDir = '/Users/james.bognar/git/juneau/juneau-docs-poc';
+
+console.log('Fixing remaining example headers...\n');
+
+for (const file of filesToFix) {
+ const filePath = path.join(baseDir, file);
+
+ if (fs.existsSync(filePath)) {
+ console.log(`Processing: ${file}`);
+ const content = fs.readFileSync(filePath, 'utf8');
+
+ if (content.match(/^### Examples?\b/m)) {
+ const fixed = fixRemainingExamples(content);
+ fs.writeFileSync(filePath, fixed, 'utf8');
+ console.log(` ✅ Fixed remaining example headers`);
+ } else {
+ console.log(` ⏭️ No remaining example headers found`);
+ }
+ } else {
+ console.log(`❌ File not found: ${file}`);
+ }
+}
+
+console.log('\n✅ Remaining example header fixes complete!');