This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch docs
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/docs by this push:
new 0192cd3998 Documentation sweep: fix stale APIs, class names, examples,
links across all 529 pages
0192cd3998 is described below
commit 0192cd3998378e62736011d005d6aa8e14b9379c
Author: James Bognar <[email protected]>
AuthorDate: Wed Jun 24 08:54:29 2026 -0400
Documentation sweep: fix stale APIs, class names, examples, links across
all 529 pages
- Fix stale class names: BasicRestObject→BasicRestResource,
BeanContext→MarshallingContext,
OMap→JsonMap, @Bean→@BeanType, @BeanIgnore→@MarshalledIgnore across ~20
pages
- Fix hardcoded Maven versions (9.5.0/10.0.0 → ${juneau.version}) across
~15 pages
- Fix 27 broken /site/topics/ → /docs/topics/ cross-reference links in
streaming pages
- Fix stale Marshaller API names: parseRecords→fromRecords, @URI→@Uri, etc.
- Fix compile errors in code examples (wrong extends/implements,
orElse(null) on primitives,
duplicate declarations, variable shadowing, wrong method/class names)
- Fix fake method calls: UUID.generatedUUID(), Section.as(),
ConfigMemoryStore, etc.
- Fix typos, grammar, missing slugs, and broken Javadoc URLs
- Remove 11 stale SVL Var class rows from active-variables tables
(02.22.02, 02.22.04)
- Remove stale VarHandle claim from native-image feasibility page
- Add new pages: 13.17.StreamingCursors.md, 13.18.ContentTypeNegotiation.md
- Update sidebars.ts with new Section 13 entries
Co-authored-by: Cursor <[email protected]>
---
pages/release-notes/10.0.0.md | 11 +-
pages/topics/01.02.Marshalling.md | 8 +-
pages/topics/01.04.RestServer.md | 2 +-
pages/topics/01.06.DtoBeans.md | 6 +-
pages/topics/01.09.GeneralDesign.md | 2 +-
pages/topics/01.11.WhyJuneau.md | 18 +-
pages/topics/02.02.Marshallers.md | 14 +-
pages/topics/02.11.04.PerMediaTypeSwaps.md | 8 +-
pages/topics/02.16.ParsingIntoGenericModels.md | 12 +-
pages/topics/02.19.MarshallingUris.md | 8 +-
pages/topics/02.21.PojoCategories.md | 2 +-
pages/topics/02.22.02.SvlVariables.md | 13 +-
pages/topics/02.22.04.DefaultVarResolver.md | 13 +-
pages/topics/02.27.07.XmlFormatAnnotation.md | 2 +-
pages/topics/02.27.08.XmlNamespaces.md | 2 +-
pages/topics/02.28.06.HtmlRenderAnnotation.md | 15 +-
pages/topics/02.32.01.MessagePackBasics.md | 12 ++
pages/topics/02.33.03.OpenApiSerializers.md | 18 +-
pages/topics/02.39.01.HjsonBasics.md | 4 +-
pages/topics/02.42.01.CborBasics.md | 30 ++++
pages/topics/02.43.01.HoconBasics.md | 2 +-
pages/topics/02.50.01.TokenStreamingBasics.md | 8 +-
pages/topics/02.50.02.RecordStreaming.md | 8 +-
pages/topics/02.50.03.TokenStreaming.md | 10 +-
pages/topics/02.50.04.ArrayRecordStreaming.md | 8 +-
pages/topics/02.50.05.RestStreamingIntegration.md | 10 +-
pages/topics/04.05.JuneauBeanOpenApi3.md | 4 +-
pages/topics/05.06.Sections.md | 2 +-
pages/topics/05.10.Imports.md | 2 +-
pages/topics/05.11.01.ConfigStoresBasics.md | 2 +-
pages/topics/05.11.03.FileStore.md | 2 +-
pages/topics/05.15.YamlConfigFiles.md | 3 +-
pages/topics/07.02.AssertionsOverview.md | 6 +-
pages/topics/10.03.03.ChildResources.md | 8 +-
pages/topics/10.03.06.LifecycleHooks.md | 4 +-
pages/topics/10.04.03.JavaMethodParameters.md | 2 +-
pages/topics/10.04.04.JavaMethodReturnTypes.md | 2 +-
pages/topics/10.06.Marshalling.md | 2 +-
pages/topics/10.08.RestServerComposition.md | 2 +-
.../topics/10.12.RestServerProgrammaticBuilder.md | 4 +-
pages/topics/10.19.SvlVariables.md | 2 +-
pages/topics/10.24.JspViewSupport.md | 2 +-
pages/topics/10.25.ThymeleafViewSupport.md | 2 +-
pages/topics/10.26.MustacheViewSupport.md | 2 +-
pages/topics/10.27.FreemarkerViewSupport.md | 2 +-
pages/topics/10.29.03.ApiDocsMixins.md | 6 +-
pages/topics/10.38.RestServerAuthGuards.md | 2 +-
pages/topics/10.40.RestServerObservability.md | 6 +-
pages/topics/10.43.SamlAuthSupport.md | 2 +-
pages/topics/10.44.OAuthAuthSupport.md | 2 +-
pages/topics/10.45.OidcRelyingParty.md | 2 +-
pages/topics/10.46.RestServerReactive.md | 4 +-
pages/topics/10.49.UsingWithOsgi.md | 4 +-
pages/topics/10.59.RestServerManagementLogging.md | 2 +-
pages/topics/11.01.JuneauRestServerMcpBasics.md | 2 +-
pages/topics/13.04.RequestContent.md | 2 +-
pages/topics/13.08.CustomCallHandlers.md | 4 +-
pages/topics/13.10.02.Remote.md | 2 +-
pages/topics/13.10.09.Request.md | 4 +-
pages/topics/13.10.11.DualPurposeInterfaces.md | 2 +-
pages/topics/13.17.StreamingCursors.md | 197 +++++++++++++++++++++
pages/topics/13.18.ContentTypeNegotiation.md | 164 +++++++++++++++++
pages/topics/14.02.MockRestClientOverview.md | 8 +-
pages/topics/15.02.MicroserviceCoreOverview.md | 2 +-
pages/topics/15.03.Args.md | 26 ++-
pages/topics/15.04.Manifest.md | 2 +-
pages/topics/15.06.VarResolver.md | 4 +-
pages/topics/15.07.ConsoleCommands.md | 2 +-
pages/topics/15.10.MicroserviceTesting.md | 2 +-
pages/topics/16.03.LifecycleMethods.md | 2 +-
pages/topics/16.06.Config.md | 6 +-
pages/topics/16.12.ManagementSurface.md | 2 +-
pages/topics/17.01.DependencyManagement.md | 4 +-
pages/topics/17.02.NativeImageAndLayeredJars.md | 2 +-
pages/topics/18.03.ScClientOverview.md | 9 +-
pages/topics/21.01.JuneauShadedOverview.md | 18 +-
pages/topics/23.01.V9MigrationGuide.md | 2 +-
pages/topics/24.01.V10MigrationGuide.md | 12 +-
sidebars.ts | 10 ++
79 files changed, 620 insertions(+), 201 deletions(-)
diff --git a/pages/release-notes/10.0.0.md b/pages/release-notes/10.0.0.md
index e79b85f9f5..dfd4955293 100644
--- a/pages/release-notes/10.0.0.md
+++ b/pages/release-notes/10.0.0.md
@@ -12,7 +12,7 @@ Juneau 10.0.0 is a major version release representing a
significant milestone fo
This is the first release in the 10.x line. The jump from 9.x to 10.0 reflects
accumulated breaking changes in the API surface and internal architecture that
warranted a major version boundary, following [Semantic
Versioning](https://semver.org/) conventions.
-Consumers upgrading from 9.5.0 should consult the [V10.0 Migration
Guide](/docs/topics/V10.0-migration-guide) for a complete list of breaking
changes.
+Consumers upgrading from 9.5.0 should consult the [V10.0 Migration
Guide](/docs/topics/V10MigrationGuide) for a complete list of breaking changes.
### Code quality improvements
@@ -540,6 +540,15 @@ _TBD — to be filled in as development continues._
- **Unaffected** — `MarshalledMap`/`MarshalledList` (and
`JsonMap`/`JsonList`) `getAt`/`putAt`/`postAt`/`deleteAt` are unchanged (now
backed by `PathTraversal`); the companion exception is now
`PathTraversalException` (public, renamed to match `PathTraversal`); the
`Traversable` REST response converter and Swagger/OpenAPI `$ref` (`#/`)
resolution behavior are unchanged.
- **New replacement APIs** — the new `MarshalledNode` typed tree façade and
`JsonPointer` (see New Features above) provide typed navigation and RFC 6901
JSON-Pointer addressing over the same collections model.
+- **`Marshaller` instance-method API renamed (TODO-188).** The top-level
convenience methods on `Marshaller`, `CharMarshaller`, and `StreamMarshaller`
have been renamed to align with the static shortcut names already used on
concrete marshallers (`Json.of(...)`, `Json.to(...)`):
+ - `Marshaller.read(Object, Class<T>)` / `read(Object, Type, Type...)` →
`to(Object, Class<T>)` / `to(Object, Type, Type...)`
+ - `Marshaller.write(Object, Object)` → `of(Object, Object)`
+ - `CharMarshaller.read(String, ...)` → `to(...)`;
`CharMarshaller.write(Object)` → `of(Object)`
+ - `StreamMarshaller.read(byte[], ...)` / `read(InputStream, ...)` →
`to(...)`; `StreamMarshaller.write(Object)` → `of(Object)`
+ - Six streaming cursor factory methods: `readTokens` → `fromTokens`,
`writeTokens` → `toTokens`, `readRecords` → `fromRecords`, `writeRecords` →
`toRecords`, `readArrayRecords` → `fromArrayRecords`, `writeArrayRecords` →
`toArrayRecords`
+
+ Note: the `RecordReader.read()` and `RecordWriter.write()` **cursor**
methods are **not** renamed; only the top-level factory methods on marshaller
instances changed. Update call sites by replacing `.read(` with `.to(` and
`.write(` with `.of(` on marshaller instances, and rename streaming factory
calls accordingly.
+
_Other entries TBD — to be filled in before release. See also the major
version bump note above._
### Deprecations
diff --git a/pages/topics/01.02.Marshalling.md
b/pages/topics/01.02.Marshalling.md
index cf6de12f81..1183d56c65 100644
--- a/pages/topics/01.02.Marshalling.md
+++ b/pages/topics/01.02.Marshalling.md
@@ -106,13 +106,13 @@ JSON5L (line-delimited JSON5) is a natural fit — each
line is an independent r
```java
// Write a large dataset line-by-line to an OutputStream.
-try (RecordWriter w = Json5l.DEFAULT.writeRecords(myOutputStream)) {
+try (RecordWriter w = Json5l.DEFAULT.toRecords(myOutputStream)) {
for (Person p : millionsOfPeople)
w.write(p);
}
// Read it back record-by-record — constant memory regardless of dataset size.
-try (RecordReader r = Json5l.DEFAULT.readRecords(myInputStream)) {
+try (RecordReader r = Json5l.DEFAULT.fromRecords(myInputStream)) {
Person p;
while ((p = r.read(Person.class)) != null)
process(p);
@@ -236,7 +236,7 @@ Default values for config settings can be overridden via
system properties or en
For example, the system property "MarshallingContext.sortProperties" or
environment variable "MARSHALLINGCONTEXT_SORTPROPERTIES" can
be used to set the default value for the sort properties setting.
-Bean annotations can also be programmatically attached to POJOs using config
annototations like so:
+Bean annotations can also be programmatically attached to POJOs using config
annotations like so:
```java
@BeanTypeApply(onClass=Address.class, value=@BeanType(sort=true,
excludeProperties="city,state"))
@@ -516,7 +516,7 @@ Person person = parserSet
#### SVL Variables
-/The <a
href="/site/apidocs/org/apache/juneau/commons/svl/package-summary.html"
target="_blank">org.apache.juneau.commons.svl</a> package defines an API for a
language called "Simple Variable
+The <a href="/site/apidocs/org/apache/juneau/commons/svl/package-summary.html"
target="_blank">org.apache.juneau.commons.svl</a> 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}`.
diff --git a/pages/topics/01.04.RestServer.md b/pages/topics/01.04.RestServer.md
index 9fa687a266..9398e7b71e 100644
--- a/pages/topics/01.04.RestServer.md
+++ b/pages/topics/01.04.RestServer.md
@@ -74,7 +74,7 @@ public MyParentResource extends BasicRestServlet {...}
path="/child" // Path relative to parent resource.
)
// Note that we don't need to extend from RestServlet.
-public MyChildResource implements BasicRestObject {
+public MyChildResource implements BasicRestResource {
...
}
```
diff --git a/pages/topics/01.06.DtoBeans.md b/pages/topics/01.06.DtoBeans.md
index 0e37fd65b4..063826ecfa 100644
--- a/pages/topics/01.06.DtoBeans.md
+++ b/pages/topics/01.06.DtoBeans.md
@@ -77,7 +77,7 @@ Feed feed =
.entries(
entry("tag:juneau.sample.com,2013:1.2345", "Juneau ATOM specification
snapshot", "2016-01-02T03:04:05Z")
.links(
- link"alternate", "text/html",
"http://juneau.apache.org/juneau.atom"),
+ link("alternate", "text/html",
"http://juneau.apache.org/juneau.atom"),
link("enclosure", "audio/mpeg",
"http://juneau.apache.org/audio/juneau_podcast.mp3").length(1337)
)
.published("2016-01-02T03:04:05Z")
@@ -116,7 +116,7 @@ XML or HTML using the other serializers.
:::tip Example
```java
-static import org.apache.juneau.bean.swagger.SwaggerBuilder.*;
+import static org.apache.juneau.bean.swagger.SwaggerBuilder.*;
Swagger swagger = swagger()
.swagger("2.0")
@@ -160,7 +160,7 @@ Swagger swagger = swagger()
String swaggerJson = Json.of(swagger);
// Or just use toString() or asJson().
-String swaggerJson = swagger.asJson();
+swaggerJson = swagger.asJson();
```
:::
diff --git a/pages/topics/01.09.GeneralDesign.md
b/pages/topics/01.09.GeneralDesign.md
index 2a3c2d64c7..a637eb085d 100644
--- a/pages/topics/01.09.GeneralDesign.md
+++ b/pages/topics/01.09.GeneralDesign.md
@@ -60,7 +60,7 @@ The default values of many context settings can also be set
via system propertie
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.
+This is a critical reason why Juneau achieves impressive performance.
Using Java reflection to find out all information about a bean type is
expensive.
By caching context objects, we only need to reflect that bean type once and
store that information in the context for
reuse by all serializers and parsers that share the same bean context
configuration settings.
diff --git a/pages/topics/01.11.WhyJuneau.md b/pages/topics/01.11.WhyJuneau.md
index 38de540249..e7f2ac9931 100644
--- a/pages/topics/01.11.WhyJuneau.md
+++ b/pages/topics/01.11.WhyJuneau.md
@@ -17,7 +17,7 @@ Unlike other frameworks that require multiple dependencies
and complex configura
```xml
<dependency>
<groupId>org.apache.juneau</groupId>
- <artifactId>juneau-all</artifactId>
+ <artifactId>juneau-shaded-all</artifactId>
<version>${juneau.version}</version>
</dependency>
```
@@ -76,7 +76,7 @@ public class UserResource extends BasicRestServlet {
}
@RestPost("/users")
- public User createUser(@Body User user) {
+ public User createUser(@Content User user) {
return userService.create(user);
}
}
@@ -91,11 +91,11 @@ Create type-safe client interfaces that feel like local
method calls:
```java
@Remote("http://api.example.com")
public interface UserService {
- @Get("/users/{id}")
+ @RemoteGet("/users/{id}")
User getUser(@Path String id);
- @Post("/users")
- User createUser(@Body User user);
+ @RemotePost("/users")
+ User createUser(@Content User user);
}
// Use like a regular Java interface
@@ -133,9 +133,9 @@ Juneau 10 introduces a low-level streaming API for
processing large datasets wit
```java
// Stream a large JSONL file record-by-record — O(1) memory
-try (RecordReader<Person> reader =
JsonlParser.DEFAULT.parseRecords(inputStream)) {
- while (reader.canRead())
- process(reader.read(Person.class));
+try (RecordReader r = Json5l.DEFAULT.fromRecords(inputStream)) {
+ while (r.canRead())
+ process(r.read(Person.class));
}
// Fine-grained structural token cursor (JSON, CBOR, MsgPack)
@@ -240,7 +240,7 @@ Ready to try Juneau? Here's how to get started:
```xml
<dependency>
<groupId>org.apache.juneau</groupId>
- <artifactId>juneau-all</artifactId>
+ <artifactId>juneau-shaded-all</artifactId>
<version>${juneau.version}</version>
</dependency>
```
diff --git a/pages/topics/02.02.Marshallers.md
b/pages/topics/02.02.Marshallers.md
index eb5e32fff6..a4ac216ff8 100644
--- a/pages/topics/02.02.Marshallers.md
+++ b/pages/topics/02.02.Marshallers.md
@@ -9,12 +9,12 @@ POJOs.
<tree>
<node-0><java-abstract-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/Marshaller.html"
target="_blank">Marshaller</a></java-abstract-class></node-0>
-<node-1><java-method>`T` <a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/Marshaller.html#read(java.lang.Object,java.lang.Class)"
target="_blank">read(Object,Class<T>)</a></java-method></node-1>
+<node-1><java-method>`T` <a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/Marshaller.html#to(java.lang.Object,java.lang.Class)"
target="_blank">to(Object,Class<T>)</a></java-method></node-1>
<node-2><java-abstract-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/CharMarshaller.html"
target="_blank">CharMarshaller</a></java-abstract-class></node-2>
-<node-3><java-method>`String` <a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/CharMarshaller.html#write(java.lang.Object)"
target="_blank">write(Object)</a></java-method></node-3>
+<node-3><java-method>`String` <a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/CharMarshaller.html#of(java.lang.Object)"
target="_blank">of(Object)</a></java-method></node-3>
<node-4><javac-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/Csv.html"
target="_blank">Csv</a></javac-class> <javac-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/Html.html"
target="_blank">Html</a></javac-class> <javac-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/Json.html"
target="_blank">Json</a></javac-class> <javac-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/OpenApi.html"
target="_blank">OpenApi</a [...]
<node-2><java-abstract-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/StreamMarshaller.html"
target="_blank">StreamMarshaller</a></java-abstract-class></node-2>
-<node-3><java-method>`byte[]` <a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/StreamMarshaller.html#write(java.lang.Object)"
target="_blank">write(Object)</a></java-method></node-3>
+<node-3><java-method>`byte[]` <a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/StreamMarshaller.html#of(java.lang.Object)"
target="_blank">of(Object)</a></java-method></node-3>
<node-4><javac-class><a
href="/site/apidocs/org/apache/juneau/marshall/marshaller/MsgPack.html"
target="_blank">MsgPack</a></javac-class></node-4>
</tree>
@@ -22,14 +22,14 @@ POJOs.
```java
// Using instance.
Json json = new Json();
-MyPojo myPojo = json.read(string, MyPojo.class);
-String string = json.write(myPojo);
+MyPojo myPojo = json.to(string, MyPojo.class);
+String string = json.of(myPojo);
```
```java
// Using DEFAULT instance.
-MyPojo myPojo = Json.DEFAULT.read(string, MyPojo.class);
-String string = Json.DEFAULT.write(myPojo);
+MyPojo myPojo = Json.DEFAULT.to(string, MyPojo.class);
+String string = Json.DEFAULT.of(myPojo);
```
:::
diff --git a/pages/topics/02.11.04.PerMediaTypeSwaps.md
b/pages/topics/02.11.04.PerMediaTypeSwaps.md
index e623cbfb6f..6af73dd34f 100644
--- a/pages/topics/02.11.04.PerMediaTypeSwaps.md
+++ b/pages/topics/02.11.04.PerMediaTypeSwaps.md
@@ -56,7 +56,7 @@ public class ObjectSwapTest {
@Test
public void doTest() throws Exception {
- SerializerSet serializers = SerializersSet.create()
+ SerializerSet serializers = SerializerSet.create()
.add(JsonSerializer.class, XmlSerializer.class,
HtmlSerializer.class)
.forEach(x -> x.swaps(MyJsonSwap.class, MyXmlSwap.class,
MyOtherSwap.class))
.forEachWS(x -> x.ws())
@@ -64,13 +64,13 @@ public class ObjectSwapTest {
MyPojo myPojo = new MyPojo();
- String json =
seralizers.getWriterSerializer("text/json").serialize(myPojo);
+ String json =
serializers.getWriterSerializer("text/json").serialize(myPojo);
assertEquals("'It\\'s JSON!'", json);
- String xml =
seralizers.getWriterSerializer("text/xml").serialize(myPojo);
+ String xml =
serializers.getWriterSerializer("text/xml").serialize(myPojo);
assertEquals("It's XML!", xml);
- String html =
seralizers.getWriterSerializer("text/html").serialize(myPojo);
+ String html =
serializers.getWriterSerializer("text/html").serialize(myPojo);
assertEquals("It's something else!", html);
}
}
diff --git a/pages/topics/02.16.ParsingIntoGenericModels.md
b/pages/topics/02.16.ParsingIntoGenericModels.md
index 5d728f9156..d08554aa12 100644
--- a/pages/topics/02.16.ParsingIntoGenericModels.md
+++ b/pages/topics/02.16.ParsingIntoGenericModels.md
@@ -7,16 +7,16 @@ The Juneau parsers are not limited to parsing back into the
original bean classe
If the bean classes are not available on the parsing side, the parser can also
be used to parse into a generic model
consisting of `Maps`, `Collections`, and primitive objects.
-You can parse into any `Map` type (e.g. `HashMap`, `TreeMap`) but using <a
href="/site/apidocs/org/apache/juneau/collections/JsonMap.html"
target="_blank">JsonMap</a> is recommended since it has many convenience
methods for converting values to various types.
+You can parse into any `Map` type (e.g. `HashMap`, `TreeMap`) but using <a
href="/site/apidocs/org/apache/juneau/marshall/collections/JsonMap.html"
target="_blank">JsonMap</a> is recommended since it has many convenience
methods for converting values to various types.
The same is true when parsing `collections`.
-You can use any `Collection<T>` (e.g. `HashSet<String>`, `LinkedList<MyBean>`)
or array (e.g. `Object[]`, `String[]`, `String[][]`) but using <a
href="/site/apidocs/org/apache/juneau/collections/JsonList.html"
target="_blank">JsonList</a> is recommended.
+You can use any `Collection<T>` (e.g. `HashSet<String>`, `LinkedList<MyBean>`)
or array (e.g. `Object[]`, `String[]`, `String[][]`) but using <a
href="/site/apidocs/org/apache/juneau/marshall/collections/JsonList.html"
target="_blank">JsonList</a> is recommended.
When the map or list type is not specified, or is the abstract
`Map<String,Object>`, `Collection<Object>`, or `List<Object>` types, the
runtime type the parser creates depends on the parser's flavor:
-- <a href="/site/apidocs/org/apache/juneau/marshall/json/JsonParser.html"
target="_blank">JsonParser</a> produces <a
href="/site/apidocs/org/apache/juneau/collections/JsonMap.html"
target="_blank">JsonMap</a> / <a
href="/site/apidocs/org/apache/juneau/collections/JsonList.html"
target="_blank">JsonList</a>.
+- <a href="/site/apidocs/org/apache/juneau/marshall/json/JsonParser.html"
target="_blank">JsonParser</a> produces <a
href="/site/apidocs/org/apache/juneau/marshall/collections/JsonMap.html"
target="_blank">JsonMap</a> / <a
href="/site/apidocs/org/apache/juneau/marshall/collections/JsonList.html"
target="_blank">JsonList</a>.
- <a href="/site/apidocs/org/apache/juneau/marshall/json5/Json5Parser.html"
target="_blank">Json5Parser</a> produces <a
href="/site/apidocs/org/apache/juneau/marshall/json5/Json5Map.html"
target="_blank">Json5Map</a> / <a
href="/site/apidocs/org/apache/juneau/marshall/json5/Json5List.html"
target="_blank">Json5List</a>.
-- All other parsers (`XmlParser`, `YamlParser`, `UonParser`, `HoconParser`,
`MsgPackParser`, `CborParser`, `BsonParser`, `HtmlParser`, `JsonlParser`,
`HjsonParser`, `MarkdownParser`, `CsvParser`, RDF parsers, etc.) currently
produce the neutral <a
href="/site/apidocs/org/apache/juneau/collections/MarshalledMap.html"
target="_blank">MarshalledMap</a> / <a
href="/site/apidocs/org/apache/juneau/collections/MarshalledList.html"
target="_blank">MarshalledList</a>.
+- All other parsers (`XmlParser`, `YamlParser`, `UonParser`, `HoconParser`,
`MsgPackParser`, `CborParser`, `BsonParser`, `HtmlParser`, `JsonlParser`,
`HjsonParser`, `MarkdownParser`, `CsvParser`, RDF parsers, etc.) currently
produce the neutral <a
href="/site/apidocs/org/apache/juneau/marshall/collections/MarshalledMap.html"
target="_blank">MarshalledMap</a> / <a
href="/site/apidocs/org/apache/juneau/marshall/collections/MarshalledList.html"
target="_blank">MarshalledList</a>.
All three pairs extend the same neutral `MarshalledMap` / `MarshalledList`
base, so the generic-model API shown in the examples below (`getString(...)`,
`getInt(...)`, `getMap(...)`, `getList(...)`, `cast(MyBean.class)`, etc.) works
identically whether the parser handed you a `JsonMap`, a `Json5Map`, or a
`MarshalledMap`. Typing variables as `MarshalledMap` / `MarshalledList` (or as
`Map<String,Object>` / `List<Object>`) keeps callers parser-flavor-agnostic. If
you specifically want the [...]
@@ -44,7 +44,7 @@ For example, given the following JSON:
}
```
-We can parse this into a generic <a
href="/site/apidocs/org/apache/juneau/collections/JsonMap.html"
target="_blank">JsonMap</a>:
+We can parse this into a generic <a
href="/site/apidocs/org/apache/juneau/marshall/collections/JsonMap.html"
target="_blank">JsonMap</a>:
```java
// Parse JSON into a generic POJO model.
@@ -80,7 +80,7 @@ into generic models.
}
```
-Once parsed into a generic model, various convenience methods are provided on
the <a href="/site/apidocs/org/apache/juneau/collections/JsonMap.html"
target="_blank">JsonMap</a> and <a
href="/site/apidocs/org/apache/juneau/collections/JsonList.html"
target="_blank">JsonList</a> classes to
+Once parsed into a generic model, various convenience methods are provided on
the <a href="/site/apidocs/org/apache/juneau/marshall/collections/JsonMap.html"
target="_blank">JsonMap</a> and <a
href="/site/apidocs/org/apache/juneau/marshall/collections/JsonList.html"
target="_blank">JsonList</a> classes to
retrieve values:
```java
diff --git a/pages/topics/02.19.MarshallingUris.md
b/pages/topics/02.19.MarshallingUris.md
index 57d6cefbf7..39cadb6517 100644
--- a/pages/topics/02.19.MarshallingUris.md
+++ b/pages/topics/02.19.MarshallingUris.md
@@ -33,7 +33,7 @@ public class TestURIs {
// Create a serializer.
WriterSerializer serializer = JsonSerializer
- create()
+ .create()
.simple()
.uriContext(
UriContext.of(
@@ -93,7 +93,7 @@ properties and class types so that they also get interpreted
as URIs.
:::tip Example
```java
// Applied to a class whose toString() method returns a URI.
-@URI
+@Uri
public class MyURI {
@Override /* Object */
public String toString() {
@@ -104,10 +104,10 @@ public class MyURI {
// Applied to bean properties
public class MyBean {
- @URI
+ @Uri
public String beanUri;
- @URI
+ @Uri
public String getParentUri() {
...
}
diff --git a/pages/topics/02.21.PojoCategories.md
b/pages/topics/02.21.PojoCategories.md
index 33ee28a283..6e820c0f2d 100644
--- a/pages/topics/02.21.PojoCategories.md
+++ b/pages/topics/02.21.PojoCategories.md
@@ -169,7 +169,7 @@ The following chart shows POJOs categorized into groups and
whether they can be
Java record classes (`record Foo(String bar, int baz) {}`). Record
components are treated as bean
properties. The canonical all-args constructor is used for parsing, so
all record components are
round-trip capable without any additional annotations.<br />
- The `@Bean`, `@BeanProp`, `@BeanIgnore`, and `@BeanCtor` annotations are
supported on record classes
+ The `@BeanType`, `@BeanProp`, `@MarshalledIgnore`, and `@BeanCtor`
annotations are supported on record classes
and their components.
</td>
<td style={{backgroundColor: 'lightgreen', textAlign:
'center'}}><b>yes</b></td>
diff --git a/pages/topics/02.22.02.SvlVariables.md
b/pages/topics/02.22.02.SvlVariables.md
index f3068aca6b..017a9bfe03 100644
--- a/pages/topics/02.22.02.SvlVariables.md
+++ b/pages/topics/02.22.02.SvlVariables.md
@@ -1,6 +1,6 @@
---
title: "SVL Variables"
-slug: MarshallSvlVariables
+slug: SvlVariables
---
Variables are defined through the <a
href="/site/apidocs/org/apache/juneau/commons/svl/Var.html"
target="_blank">Var</a> API.
@@ -57,17 +57,6 @@ The following is the list of default variables defined in
all modules:
| | <a href="/site/apidocs/org/apache/juneau/commons/svl/vars/DotenvVar.html"
target="_blank">DotenvVar</a> | `$DE{key[,default]}` |
| | <a href="/site/apidocs/org/apache/juneau/commons/svl/vars/ArgsVar.html"
target="_blank">ArgsVar</a> | `$A{key[,default]}` |
| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/ManifestFileVar.html"
target="_blank">ManifestFileVar</a> | `$MF{key[,default]}` |
-| | <a href="/site/apidocs/org/apache/juneau/commons/svl/vars/IfVar.html"
target="_blank">IfVar</a> | `$IF{arg,then[,else]}` |
-| | <a href="/site/apidocs/org/apache/juneau/commons/svl/vars/SwitchVar.html"
target="_blank">SwitchVar</a> | `$SW{arg,pattern1:then1[,pattern2:then2...]}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/CoalesceVar.html"
target="_blank">CoalesceVar</a> | `$CO{arg1[,arg2...]}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/PatternMatchVar.html"
target="_blank">PatternMatchVar</a> | `$PM{arg,pattern}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/PatternReplaceVar.html"
target="_blank">PatternReplaceVar</a> | `$PR{arg,pattern,replace}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/PatternExtractVar.html"
target="_blank">PatternExtractVar</a> | `$PE{arg,pattern,groupdIndex}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/NotEmptyVar.html"
target="_blank">NotEmptyVar</a> | `$NE{arg}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/UpperCaseVar.html"
target="_blank">UpperCaseVar</a> | `$UC{arg}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/LowerCaseVar.html"
target="_blank">LowerCaseVar</a> | `$LC{arg}` |
-| | <a href="/site/apidocs/org/apache/juneau/commons/svl/vars/LenVar.html"
target="_blank">LenVar</a> | `$LN{arg[,delimiter]}` |
-| | <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/SubstringVar.html"
target="_blank">SubstringVar</a> | `$ST{arg,start[,end]}` |
| | <a href="/site/apidocs/org/apache/juneau/marshall/html/HtmlWidgetVar.html"
target="_blank">HtmlWidgetVar</a> | `$W{name}` |
| **juneau-config** | <a
href="/site/apidocs/org/apache/juneau/config/vars/ConfigVar.html"
target="_blank">ConfigVar</a> | `$C{key[,default]}` |
| **juneau-rest-server** | <a
href="/site/apidocs/org/apache/juneau/rest/server/vars/FileVar.html"
target="_blank">FileVar</a> | `$F{path[,default]}` |
diff --git a/pages/topics/02.22.04.DefaultVarResolver.md
b/pages/topics/02.22.04.DefaultVarResolver.md
index 44e6853542..76b8be2201 100644
--- a/pages/topics/02.22.04.DefaultVarResolver.md
+++ b/pages/topics/02.22.04.DefaultVarResolver.md
@@ -11,15 +11,4 @@ default support for the following variables:
- `$EF{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/EnvFileVar.html"
target="_blank">EnvFileVar</a>
- `$DE{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/DotenvVar.html"
target="_blank">DotenvVar</a>
- `$A{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/ArgsVar.html"
target="_blank">ArgsVar</a>
-- `$MF{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/ManifestFileVar.html"
target="_blank">ManifestFileVar</a>
-- `$SW{stringArg,pattern:thenValue[,pattern:thenValue...]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/SwitchVar.html"
target="_blank">SwitchVar</a>
-- `$IF{arg,then[,else]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/IfVar.html"
target="_blank">IfVar</a>
-- `$CO{arg[,arg2...]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/CoalesceVar.html"
target="_blank">CoalesceVar</a>
-- `$PM{arg,pattern}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/PatternMatchVar.html"
target="_blank">PatternMatchVar</a>
-- `$PR{stringArg,pattern,replace}`- <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/PatternReplaceVar.html"
target="_blank">PatternReplaceVar</a>
-- `$PE{arg,pattern,groupIndex}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/PatternExtractVar.html"
target="_blank">PatternExtractVar</a>
-- `$UC{arg}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/UpperCaseVar.html"
target="_blank">UpperCaseVar</a>
-- `$LC{arg}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/LowerCaseVar.html"
target="_blank">LowerCaseVar</a>
-- `$NE{arg}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/NotEmptyVar.html"
target="_blank">NotEmptyVar</a>
-- `$LN{arg[,delimiter]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/LenVar.html"
target="_blank">LenVar</a>
-- `$ST{arg,start[,end]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/SubstringVar.html"
target="_blank">SubstringVar</a>
\ No newline at end of file
+- `$MF{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/ManifestFileVar.html"
target="_blank">ManifestFileVar</a>
\ No newline at end of file
diff --git a/pages/topics/02.27.07.XmlFormatAnnotation.md
b/pages/topics/02.27.07.XmlFormatAnnotation.md
index bda96fd060..1015a1d049 100644
--- a/pages/topics/02.27.07.XmlFormatAnnotation.md
+++ b/pages/topics/02.27.07.XmlFormatAnnotation.md
@@ -386,7 +386,7 @@ class MyBean {
The <a
href="/site/apidocs/org/apache/juneau/marshall/xml/XmlFormat.html#MIXED"
target="_blank">XmlFormat.MIXED</a> format is similar to <a
href="/site/apidocs/org/apache/juneau/marshall/xml/XmlFormat.html#ELEMENTS"
target="_blank">XmlFormat.ELEMENTS</a> except elements names on primitive types
(string/number/boolean/null) are stripped from the output.
This format particularly useful when combined with bean dictionaries to
produce mixed content.
-The bean dictionary isn't used during serializationbut it is needed during
parsing to resolve bean types.
+The bean dictionary isn't used during serialization, but it is needed during
parsing to resolve bean types.
The <a
href="/site/apidocs/org/apache/juneau/marshall/xml/XmlFormat.html#MIXED_PWS"
target="_blank">XmlFormat.MIXED_PWS</a> format identical to <a
href="/site/apidocs/org/apache/juneau/marshall/xml/XmlFormat.html#MIXED"
target="_blank">XmlFormat.MIXED</a> except whitespace characters are preserved
in the output.
<table class="code-table">
diff --git a/pages/topics/02.27.08.XmlNamespaces.md
b/pages/topics/02.27.08.XmlNamespaces.md
index 86d032c71c..05a46da153 100644
--- a/pages/topics/02.27.08.XmlNamespaces.md
+++ b/pages/topics/02.27.08.XmlNamespaces.md
@@ -94,7 +94,7 @@ Now when we run this code, we'll see namespaces added to our
output:
</per:person>
```
-Enabling the `XmlSerializer.XML_addNamespaceUrisToRootsetting` results in the
namespace URLs being added to the root
+Enabling the `XmlSerializer.XML_addNamespaceUrisToRoot` setting results in the
namespace URLs being added to the root
node:
```xml
diff --git a/pages/topics/02.28.06.HtmlRenderAnnotation.md
b/pages/topics/02.28.06.HtmlRenderAnnotation.md
index a4b58eabff..53859cbd84 100644
--- a/pages/topics/02.28.06.HtmlRenderAnnotation.md
+++ b/pages/topics/02.28.06.HtmlRenderAnnotation.md
@@ -46,8 +46,8 @@ public class FileSpace {
@Html(render=FileSpaceStatusRender.class)
public FileSpaceStatus getStatus() {
float pf = getPctFull();
- if (pf OK;
- if (pf WARNING;
+ if (pf < 80) return FileSpaceStatus.OK;
+ if (pf < 90) return FileSpaceStatus.WARNING;
return FileSpaceStatus.SEVERE;
}
}
@@ -62,11 +62,18 @@ public enum FileSpaceStatus {
```java
// Custom render for getPctFull() method
-public class FileSpacePctRender extends HtmlRender {
+public class FileSpacePctRender extends HtmlRender<Float> {
@Override
public String getStyle(SerializerSession session, Float value) {
- if (value = 90)
+ if (value >= 90) return "background-color:red;color:white;";
+ if (value >= 80) return "background-color:yellow;";
+ return null;
+ }
+
+ @Override
+ public Object getContent(SerializerSession session, Float value) {
+ if (value >= 90)
return div(
String.format("%.0f%%", value),
style("@keyframes color_change { from { background-color: red;
} to { background-color: yellow; }")
diff --git a/pages/topics/02.32.01.MessagePackBasics.md
b/pages/topics/02.32.01.MessagePackBasics.md
index e1a44fd27e..1e0b75f0c2 100644
--- a/pages/topics/02.32.01.MessagePackBasics.md
+++ b/pages/topics/02.32.01.MessagePackBasics.md
@@ -14,3 +14,15 @@ The serializer emits `Content-Type: application/msgpack`
(the RFC 6838-conformin
`org.apache.juneau.http.header.ContentType.APPLICATION_MSGPACK`).
The parser accepts both `application/msgpack` and the legacy `octal/msgpack`
value as a backward-compatibility
alias, so payloads produced by earlier Juneau releases continue to decode
without changes.
+
+## Token Streaming
+
+MessagePack is a **FULL**-capability streaming format. The `MsgPackParser`
implements `TokenReadable` and
+`ArrayRecordReadable`; the `MsgPackSerializer` implements `TokenWritable` and
`ArrayRecordWritable`.
+This means you can read and write MessagePack using fine-grained structural
token cursors in O(1) memory,
+without materializing the entire document.
+
+See [Token-Streaming Basics](/docs/topics/TokenStreamingBasics) for the full
capability matrix and API overview,
+[Token Streaming](/docs/topics/TokenStreaming) for the
`TokenReader`/`TokenWriter` API,
+and [Array-Record Streaming](/docs/topics/ArrayRecordStreaming) for
element-by-element access over top-level arrays
+(including the `serializeArrayRecords(output, expectedCount)` streaming count
overload for MsgPack).
diff --git a/pages/topics/02.33.03.OpenApiSerializers.md
b/pages/topics/02.33.03.OpenApiSerializers.md
index eeb079fdcd..6b577a6c08 100644
--- a/pages/topics/02.33.03.OpenApiSerializers.md
+++ b/pages/topics/02.33.03.OpenApiSerializers.md
@@ -414,15 +414,15 @@ Serializing this bean produces the following output:
(
f1=@('a,b',null),
f2=@(Zm9v,null),
- f4=@(2012-12-21T12:34:56Z,null),
- f5=@(666F6F,null),
- f6=@('66 6F 6F',null),
- f7=@(a,b,null),
- f8=@(1,2,null),
- f9=@(3,4,null),
- f10=@(1.0,2.0,null),
- f11=@(3.0,4.0,null),
- f12=@(true,false,null),
+ f3=@(666F6F,null),
+ f4=@('66 6F 6F',null),
+ f5=@(2012-12-21T12:34:56Z,null),
+ f6=@(a,b,null),
+ f7=@(1,2,null),
+ f8=@(3,4,null),
+ f9=@(1.0,2.0,null),
+ f10=@(3.0,4.0,null),
+ f11=@(true,false,null),
fExtra=@(1,2,null)
)
```
diff --git a/pages/topics/02.39.01.HjsonBasics.md
b/pages/topics/02.39.01.HjsonBasics.md
index 0fb22ec62e..06e76e9d33 100644
--- a/pages/topics/02.39.01.HjsonBasics.md
+++ b/pages/topics/02.39.01.HjsonBasics.md
@@ -62,10 +62,10 @@ Person bob = Hjson.to(rootBraceless, Person.class);
```java
// Readable mode (default) - newlines between members, quoteless strings
-String hjson = Hjson.DEFAULT.write(bean);
+String hjson = Hjson.DEFAULT.of(bean);
// Compact mode - single line, comma-separated
-String compact = Hjson.DEFAULT_COMPACT.write(bean);
+String compact = Hjson.DEFAULT_COMPACT.of(bean);
```
##### Hjson Syntax Highlights
diff --git a/pages/topics/02.42.01.CborBasics.md
b/pages/topics/02.42.01.CborBasics.md
index 271486373f..2b9f871d77 100644
--- a/pages/topics/02.42.01.CborBasics.md
+++ b/pages/topics/02.42.01.CborBasics.md
@@ -125,6 +125,36 @@ public class MyResource extends RestServlet implements
BasicUniversalConfig { ..
- **Half-precision float**: Serializer always uses float32/float64; parser
accepts float16 from external producers.
- **Semantic tags**: Parser ignores tag numbers; tagged value is parsed
normally. Tag output deferred to future release.
+##### Token Streaming
+
+CBOR is a **FULL**-capability streaming format. The `CborParser` implements
`TokenReadable` and
+`ArrayRecordReadable`; the `CborSerializer` implements `TokenWritable` and
`ArrayRecordWritable`.
+This means you can read and write CBOR using fine-grained structural token
cursors in O(1) memory,
+without materializing the entire document.
+
+```java
+// Read CBOR tokens one at a time
+try (TokenReader r = CborParser.DEFAULT.parseTokens(cborBytes)) {
+ while (r.next() != TokenType.END_OF_STREAM) {
+ // inspect r.getCurrentToken(), r.getString(), etc.
+ }
+}
+
+// Write CBOR tokens directly
+ByteArrayOutputStream baos = new ByteArrayOutputStream();
+try (TokenWriter w = CborSerializer.DEFAULT.serializeTokens(baos)) {
+ w.startObject();
+ w.fieldName("name");
+ w.string("Alice");
+ w.endObject();
+}
+```
+
+See [Token-Streaming Basics](/docs/topics/TokenStreamingBasics) for the full
capability matrix and API overview,
+[Token Streaming](/docs/topics/TokenStreaming) for the
`TokenReader`/`TokenWriter` API,
+and [Array-Record Streaming](/docs/topics/ArrayRecordStreaming) for
element-by-element streaming over top-level arrays
+(CBOR uses indefinite-length arrays on write, so the array-record writer needs
no element count).
+
##### See Also
- <a href="https://www.rfc-editor.org/rfc/rfc8949.html" target="_blank">RFC
8949 (CBOR)</a>
diff --git a/pages/topics/02.43.01.HoconBasics.md
b/pages/topics/02.43.01.HoconBasics.md
index 050b4b8297..f8a16bfcef 100644
--- a/pages/topics/02.43.01.HoconBasics.md
+++ b/pages/topics/02.43.01.HoconBasics.md
@@ -60,7 +60,7 @@ JsonMap config = Hocon.to(pathExpr, JsonMap.class);
```java
// Readable mode (default) - = separator, unquoted strings, root braces omitted
-String hocon = Hocon.DEFAULT.write(bean);
+String hocon = Hocon.DEFAULT.of(bean);
// With root braces
String braced = HoconSerializer.DEFAULT_BRACES.serialize(bean);
diff --git a/pages/topics/02.50.01.TokenStreamingBasics.md
b/pages/topics/02.50.01.TokenStreamingBasics.md
index 5e920857e6..c1721766e6 100644
--- a/pages/topics/02.50.01.TokenStreamingBasics.md
+++ b/pages/topics/02.50.01.TokenStreamingBasics.md
@@ -133,7 +133,7 @@ only on the POJO databind path, never at the token layer.
##### See also
-- <a href="/site/topics/RecordStreaming">Record Streaming</a> — whole-value
record cursor (all formats).
-- <a href="/site/topics/TokenStreaming">Token Streaming</a> — fine-grained
structural cursor (FULL formats).
-- <a href="/site/topics/ArrayRecordStreaming">Array-Record Streaming</a> —
opt-in element streaming for top-level arrays.
-- <a href="/site/topics/RestStreamingIntegration">REST Streaming
Integration</a> — using the cursors as `@RestOp` parameters.
+- <a href="/docs/topics/RecordStreaming">Record Streaming</a> — whole-value
record cursor (all formats).
+- <a href="/docs/topics/TokenStreaming">Token Streaming</a> — fine-grained
structural cursor (FULL formats).
+- <a href="/docs/topics/ArrayRecordStreaming">Array-Record Streaming</a> —
opt-in element streaming for top-level arrays.
+- <a href="/docs/topics/RestStreamingIntegration">REST Streaming
Integration</a> — using the cursors as `@RestOp` parameters.
diff --git a/pages/topics/02.50.02.RecordStreaming.md
b/pages/topics/02.50.02.RecordStreaming.md
index 52b81a7926..c90cf65e10 100644
--- a/pages/topics/02.50.02.RecordStreaming.md
+++ b/pages/topics/02.50.02.RecordStreaming.md
@@ -9,7 +9,7 @@ surface yields one whole-value record per call. It works
uniformly across every
that implements the <a
href="/site/apidocs/org/apache/juneau/marshall/stream/RecordReadable.html"
target="_blank">RecordReadable</a> /
<a href="/site/apidocs/org/apache/juneau/marshall/stream/RecordWritable.html"
target="_blank">RecordWritable</a> role.
-> See the <a
href="/site/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
+> See the <a
href="/docs/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
> for which formats support record reading/writing and whether the cursor
> streams O(1) or buffers.
##### Reading records
@@ -97,6 +97,6 @@ if (parser instanceof RecordReadable p) {
##### See also
-- <a href="/site/topics/TokenStreamingBasics">Token-Streaming Basics</a>
-- <a href="/site/topics/TokenStreaming">Token Streaming</a> — fine-grained
structural cursor.
-- <a href="/site/topics/ArrayRecordStreaming">Array-Record Streaming</a>.
+- <a href="/docs/topics/TokenStreamingBasics">Token-Streaming Basics</a>
+- <a href="/docs/topics/TokenStreaming">Token Streaming</a> — fine-grained
structural cursor.
+- <a href="/docs/topics/ArrayRecordStreaming">Array-Record Streaming</a>.
diff --git a/pages/topics/02.50.03.TokenStreaming.md
b/pages/topics/02.50.03.TokenStreaming.md
index b5c903cee4..ab10fc6e4d 100644
--- a/pages/topics/02.50.03.TokenStreaming.md
+++ b/pages/topics/02.50.03.TokenStreaming.md
@@ -11,7 +11,7 @@ surface exposes structural events one at a time —
`START_OBJECT`, `FIELD_NAME`
Available on formats that implement the <a
href="/site/apidocs/org/apache/juneau/marshall/stream/TokenReadable.html"
target="_blank">TokenReadable</a> /
<a href="/site/apidocs/org/apache/juneau/marshall/stream/TokenWritable.html"
target="_blank">TokenWritable</a> role: json, json5, jsonl, cbor, msgpack (read
+ write), plus jsonschema and jcs (writer-only).
-> See the <a
href="/site/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
+> See the <a
href="/docs/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
> for the full breakdown of which formats expose the token cursor for reading
> vs writing.
##### Pull side: TokenReader
@@ -84,7 +84,7 @@ CborTokenWriter w = (CborTokenWriter)
CborSerializer.DEFAULT.serializeTokens(out
```
Or declare them as `@RestOp` parameters — the framework picks the matching
parser automatically
-(see <a href="/site/topics/RestStreamingIntegration">REST Streaming
Integration</a>).
+(see <a href="/docs/topics/RestStreamingIntegration">REST Streaming
Integration</a>).
##### Settings propagation
@@ -102,6 +102,6 @@ These are explicitly NOT honored at the token layer —
they're databind-path-on
##### See also
-- <a href="/site/topics/TokenStreamingBasics">Token-Streaming Basics</a>
-- <a href="/site/topics/RecordStreaming">Record Streaming</a>
-- <a href="/site/topics/ArrayRecordStreaming">Array-Record Streaming</a>
+- <a href="/docs/topics/TokenStreamingBasics">Token-Streaming Basics</a>
+- <a href="/docs/topics/RecordStreaming">Record Streaming</a>
+- <a href="/docs/topics/ArrayRecordStreaming">Array-Record Streaming</a>
diff --git a/pages/topics/02.50.04.ArrayRecordStreaming.md
b/pages/topics/02.50.04.ArrayRecordStreaming.md
index dff696226a..3ce3ce9476 100644
--- a/pages/topics/02.50.04.ArrayRecordStreaming.md
+++ b/pages/topics/02.50.04.ArrayRecordStreaming.md
@@ -15,7 +15,7 @@ directly — the wire format IS already a sequence of records.
JSONL is also nat
line-delimited; its `parseArrayRecords` / `serializeArrayRecords` simply alias
that line
record stream (rather than wrapping the elements in a bracketed `[...]` array).
-> See the <a
href="/site/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
+> See the <a
href="/docs/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
> for which formats support array-record reading/writing and whether each
> streams O(1) or buffers.
##### Reading large arrays element-by-element
@@ -83,6 +83,6 @@ if (MsgPackSerializer.DEFAULT instanceof ArrayRecordWritable
w)
##### See also
-- <a href="/site/topics/TokenStreamingBasics">Token-Streaming Basics</a>
-- <a href="/site/topics/RecordStreaming">Record Streaming</a>
-- <a href="/site/topics/TokenStreaming">Token Streaming</a>
+- <a href="/docs/topics/TokenStreamingBasics">Token-Streaming Basics</a>
+- <a href="/docs/topics/RecordStreaming">Record Streaming</a>
+- <a href="/docs/topics/TokenStreaming">Token Streaming</a>
diff --git a/pages/topics/02.50.05.RestStreamingIntegration.md
b/pages/topics/02.50.05.RestStreamingIntegration.md
index f558f7ff79..365a235b08 100644
--- a/pages/topics/02.50.05.RestStreamingIntegration.md
+++ b/pages/topics/02.50.05.RestStreamingIntegration.md
@@ -8,7 +8,7 @@ slug: RestStreamingIntegration
the matching parser/serializer based on the request `Content-Type` / response
`Accept` and
hands you the cursor.
-> See the <a
href="/site/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
+> See the <a
href="/docs/topics/TokenStreamingBasics#per-format-capability-matrix">per-format
capability matrix</a>
> for which formats can satisfy a `RecordReader` / `TokenReader` /
> `RecordWriter` / `TokenWriter` parameter.
##### Server-side reader parameter
@@ -107,7 +107,7 @@ Writer-side output is `getNegotiatedWriter()` /
`getNegotiatedOutputStream()` si
##### See also
-- <a href="/site/topics/TokenStreamingBasics">Token-Streaming Basics</a>
-- <a href="/site/topics/RecordStreaming">Record Streaming</a>
-- <a href="/site/topics/TokenStreaming">Token Streaming</a>
-- <a href="/site/topics/ArrayRecordStreaming">Array-Record Streaming</a>
+- <a href="/docs/topics/TokenStreamingBasics">Token-Streaming Basics</a>
+- <a href="/docs/topics/RecordStreaming">Record Streaming</a>
+- <a href="/docs/topics/TokenStreaming">Token Streaming</a>
+- <a href="/docs/topics/ArrayRecordStreaming">Array-Record Streaming</a>
diff --git a/pages/topics/04.05.JuneauBeanOpenApi3.md
b/pages/topics/04.05.JuneauBeanOpenApi3.md
index cdb4261680..081b8a6647 100644
--- a/pages/topics/04.05.JuneauBeanOpenApi3.md
+++ b/pages/topics/04.05.JuneauBeanOpenApi3.md
@@ -82,7 +82,7 @@ The following is an example OpenAPI document:
This document can be generated by the following Java code:
```java
-static import org.apache.juneau.bean.openapi3.OpenApi3Builder.*;
+import static org.apache.juneau.bean.openapi3.OpenApi3Builder.*;
OpenApi3 openApi = openApi3()
.setOpenapi("3.0.0")
@@ -124,7 +124,7 @@ OpenApi3 openApi = openApi3()
String openApiJson = Json.of(openApi);
// Or just use toString().
-String openApiJson = openApi.toString();
+openApiJson = openApi.toString();
```
## OpenAPI UI
diff --git a/pages/topics/05.06.Sections.md b/pages/topics/05.06.Sections.md
index ddd551de18..e707d851ff 100644
--- a/pages/topics/05.06.Sections.md
+++ b/pages/topics/05.06.Sections.md
@@ -60,7 +60,7 @@ public class Address {
// Example usage
Config config = Config.create("MyConfig.cfg").build();
-Address myAddress =
config.getSection("MyAddress").as(Address.class).orElse(null);
+Address myAddress =
config.getSection("MyAddress").asBean(Address.class).orElse(null);
```
:::
diff --git a/pages/topics/05.10.Imports.md b/pages/topics/05.10.Imports.md
index 7757360a6d..4093c9f4b2 100644
--- a/pages/topics/05.10.Imports.md
+++ b/pages/topics/05.10.Imports.md
@@ -107,7 +107,7 @@ Config config = Config.create("MyConfig").build();
final boolean[] triggered = new boolean[1];
ConfigEventListener listener = new ConfigEventListener() {
public void onConfigChange(ConfigEvents events) {
- triggered[0] = events.isKeyModified("Foo", "bar"));
+ triggered[0] = events.isKeyModified("Foo", "bar");
}
};
config.addListener(listener);
diff --git a/pages/topics/05.11.01.ConfigStoresBasics.md
b/pages/topics/05.11.01.ConfigStoresBasics.md
index 504e24c316..4c4213a7ea 100644
--- a/pages/topics/05.11.01.ConfigStoresBasics.md
+++ b/pages/topics/05.11.01.ConfigStoresBasics.md
@@ -62,7 +62,7 @@ The store is defined on the `Config` object via the following
setting:
:::tip Example
```java
// Create a config with in-memory storage.
-Config config =
Config.create("MyConfig.cfg").store(ConfigMemoryStore.DEFAULT).build();
+Config config =
Config.create("MyConfig.cfg").store(MemoryStore.DEFAULT).build();
```
:::
diff --git a/pages/topics/05.11.03.FileStore.md
b/pages/topics/05.11.03.FileStore.md
index 5ec468b90a..d639ce5209 100644
--- a/pages/topics/05.11.03.FileStore.md
+++ b/pages/topics/05.11.03.FileStore.md
@@ -23,7 +23,7 @@ It provides the following configurable settings:
FileStore fileStore = FileStore
.create()
.directory("configs")
- .useWatcher()
+ .enableWatcher()
.watcherSensitivity(HIGH)
.build();
diff --git a/pages/topics/05.15.YamlConfigFiles.md
b/pages/topics/05.15.YamlConfigFiles.md
index ba2a0dd256..34d5fe39d9 100644
--- a/pages/topics/05.15.YamlConfigFiles.md
+++ b/pages/topics/05.15.YamlConfigFiles.md
@@ -1,9 +1,8 @@
---
title: "YAML Config Files"
+slug: YamlConfigFiles
---
-# YAML Config Files
-
`juneau-config` now supports YAML config files as an alternative to INI/CFG
files.
## Enabling YAML
diff --git a/pages/topics/07.02.AssertionsOverview.md
b/pages/topics/07.02.AssertionsOverview.md
index f5ebd46910..dd78e8858d 100644
--- a/pages/topics/07.02.AssertionsOverview.md
+++ b/pages/topics/07.02.AssertionsOverview.md
@@ -57,7 +57,7 @@ assertString("foo, bar")
// Extract a subset of properties from a list of beans and compare using JSON5.
List myListOfBeans = ...;
assertBeanList(myListOfBeans)
- .asPropertyMap("a,b")
+ .asPropertyMaps("a,b")
.asJson().is("[{a:1,b:'foo'}]");
// Perform an arbitrary Predicate check against a bean.
@@ -75,7 +75,7 @@ assertStringList(myListOfStrings)
// Check that an exception is thrown and is the specified type and has the
specified message.
assertThrown(()->myBean.runBadMethod())
- .exists()
+ .isExists()
.isExactType(RuntimeException.class)
.asMessage().is("foo");
```
@@ -101,7 +101,7 @@ value to some other form wrapped in another assertion.
```java
// Customize the behavior of an assertion.
assertString(myString)
- .asString() // Converts to a FluentIntegerAssertion.
+ .asLength() // Converts to a FluentIntegerAssertion.
.isLt(100) // Runs test and returns original FluentStringAssertion.
.asUc() // Converts string to uppercase and returns a new
FluentStringAssertion.
.isContains("FOO"); // Runs test and returns original
FluentStringAssertion.
diff --git a/pages/topics/10.03.03.ChildResources.md
b/pages/topics/10.03.03.ChildResources.md
index 8913b7a279..1dbfa4f57e 100644
--- a/pages/topics/10.03.03.ChildResources.md
+++ b/pages/topics/10.03.03.ChildResources.md
@@ -21,7 +21,7 @@ public MyRootResources extends BasicRestServletGroup {...}
path="/child" // Path relative to parent resource.
)
// Note that we don't need to extend from RestServlet.
-public MyChildResource extends BasicRestObject {...}
+public MyChildResource extends BasicRestResource {...}
```
:::
@@ -34,7 +34,7 @@ Initialization of and access to the child resources occurs
through the parent re
Children can be nested arbitrary deep to create complex REST interfaces with a
single top-level REST servlet.
-As explained earlier, child REST objects typically extend from <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestObject.html"
target="_blank">BasicRestObject</a> or <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestObjectGroup.html"
target="_blank">BasicRestObjectGroup</a> and not from one of the servlet
classes.
+As explained earlier, child REST objects typically extend from <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestResource.html"
target="_blank">BasicRestResource</a> or <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestResourceGroup.html"
target="_blank">BasicRestResourceGroup</a> 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 <a
href="/site/apidocs/org/apache/juneau/rest/server/Rest.html"
target="_blank">@Rest</a> and <a
href="/site/apidocs/org/apache/juneau/rest/server/RestOp.html"
target="_blank">@RestOp</a> annotations.
@@ -42,7 +42,7 @@ the bare-minimum <a
href="/site/apidocs/org/apache/juneau/rest/server/Rest.html"
In addition to declaring children statically via `@Rest(children=…)`, parent
resources that extend
<a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServletGroup.html"
target="_blank">BasicRestServletGroup</a>
-or <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestObjectGroup.html"
target="_blank">BasicRestObjectGroup</a>
+or <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestResourceGroup.html"
target="_blank">BasicRestResourceGroup</a>
can add and remove child resources at runtime.
This is useful for plug-in architectures, integration tests, and other
scenarios where the set of mounted endpoints is not known ahead of time.
@@ -55,7 +55,7 @@ which holds children in a thread-safe, copy-on-write snapshot
— reads on the r
public class MyServer extends BasicRestServletGroup {}
@Rest(path="/alpha")
-public class AlphaChild extends BasicRestObject {
+public class AlphaChild extends BasicRestResource {
@RestGet("/ping")
public String ping() { return "alpha-pong"; }
}
diff --git a/pages/topics/10.03.06.LifecycleHooks.md
b/pages/topics/10.03.06.LifecycleHooks.md
index 82814654ea..ee857a4b2e 100644
--- a/pages/topics/10.03.06.LifecycleHooks.md
+++ b/pages/topics/10.03.06.LifecycleHooks.md
@@ -9,7 +9,7 @@ For example, if you want to add an initialization method to
your resource:
```java
@Rest(...)
-public class MyResource extends BasicRestObject {
+public class MyResource extends BasicRestResource {
// Our database.
private Map myDatabase;
@@ -32,7 +32,7 @@ Or if you want to intercept REST calls:
```java
@Rest(...)
-public class MyResource extends BasicRestObject {
+public class MyResource extends BasicRestResource {
// Add a request attribute to all incoming requests.
@RestPreCall
diff --git a/pages/topics/10.04.03.JavaMethodParameters.md
b/pages/topics/10.04.03.JavaMethodParameters.md
index fefbbe1ee1..aef5d2a2e8 100644
--- a/pages/topics/10.04.03.JavaMethodParameters.md
+++ b/pages/topics/10.04.03.JavaMethodParameters.md
@@ -56,7 +56,7 @@ Additional parameter types can be defined via the annotation
<a href="/site/apid
@Rest(
restOpArgs={ MyOpArg.class } // Option #1 - Via annotation
)
-public class MyResource extends BasicRestObject {
+public class MyResource extends BasicRestResource {
}
```
diff --git a/pages/topics/10.04.04.JavaMethodReturnTypes.md
b/pages/topics/10.04.04.JavaMethodReturnTypes.md
index d918a95289..b27704d0e5 100644
--- a/pages/topics/10.04.04.JavaMethodReturnTypes.md
+++ b/pages/topics/10.04.04.JavaMethodReturnTypes.md
@@ -80,7 +80,7 @@ Additional return-processor types can be defined via the
annotation <a href="/si
@Rest(
responseProcessors={ MyResponseProcessor.class } // Option #1 - Via
annotation
)
-public class MyResource extends BasicRestObject {
+public class MyResource extends BasicRestResource {
}
```
diff --git a/pages/topics/10.06.Marshalling.md
b/pages/topics/10.06.Marshalling.md
index 3e7f67c710..99305c5736 100644
--- a/pages/topics/10.06.Marshalling.md
+++ b/pages/topics/10.06.Marshalling.md
@@ -47,7 +47,7 @@ used as-is or augmented by child classes:
<tree>
<node-0>**Classes:**</node-0>
-<node-1><javac-abstract-class><a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServlet.html"
target="_blank">BasicRestServlet</a></javac-abstract-class>
<javac-abstract-class><a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServletGroup.html"
target="_blank">BasicRestServletGroup</a></javac-abstract-class>
<javac-abstract-class><a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestObject.html"
target="_blank">BasicRestObject</a></ [...]
+<node-1><javac-abstract-class><a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServlet.html"
target="_blank">BasicRestServlet</a></javac-abstract-class>
<javac-abstract-class><a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServletGroup.html"
target="_blank">BasicRestServletGroup</a></javac-abstract-class>
<javac-abstract-class><a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestResource.html"
target="_blank">BasicRestResource</ [...]
<node-0>**Interfaces:**</node-0>
<node-1><javac-interface><a
href="/site/apidocs/org/apache/juneau/rest/server/config/BasicJsonConfig.html"
target="_blank">BasicJsonConfig</a></javac-interface> <javac-interface><a
href="/site/apidocs/org/apache/juneau/rest/server/config/BasicJsonHtmlConfig.html"
target="_blank">BasicJsonHtmlConfig</a></javac-interface> <javac-interface><a
href="/site/apidocs/org/apache/juneau/rest/server/config/BasicJson5Config.html"
target="_blank">BasicJson5Config</a></javac-interface> <javac-interfac [...]
</tree>
diff --git a/pages/topics/10.08.RestServerComposition.md
b/pages/topics/10.08.RestServerComposition.md
index f8669a83a0..fbb7b50301 100644
--- a/pages/topics/10.08.RestServerComposition.md
+++ b/pages/topics/10.08.RestServerComposition.md
@@ -37,7 +37,7 @@ Java single-inheritance forces a binary choice when you want
to pull in a built-
as `BasicHealthResource`:
- Subclass it — and lose the ability to subclass your own framework type
(`BasicRestServlet`,
- `BasicRestObjectGroup`, etc.).
+ `BasicRestResourceGroup`, etc.).
- Wire it as a separate child resource — and pay the cost of an extra servlet
mount, a separate
`RestContext`, a separate bean store, and so on.
diff --git a/pages/topics/10.12.RestServerProgrammaticBuilder.md
b/pages/topics/10.12.RestServerProgrammaticBuilder.md
index 17305b9ea3..33f40b6df8 100644
--- a/pages/topics/10.12.RestServerProgrammaticBuilder.md
+++ b/pages/topics/10.12.RestServerProgrammaticBuilder.md
@@ -36,7 +36,7 @@ The recommended idiomatic pattern is to expose a static
`builder()` factory on t
```java
@Rest(path="/orders")
-public class OrderResource extends BasicRestObject {
+public class OrderResource extends BasicRestResource {
// Constructor-injection form
public OrderResource(RestBuilder<?> b) { /* read builder if needed */ }
@@ -82,7 +82,7 @@ public class AppConfig {
It is also possible to author a resource with **no `@Rest` annotation at
all**, supplying everything through the builder:
```java
-public class MinimalResource extends BasicRestObject {
+public class MinimalResource extends BasicRestResource {
public MinimalResource(RestBuilder<?> b) {}
diff --git a/pages/topics/10.19.SvlVariables.md
b/pages/topics/10.19.SvlVariables.md
index 74d592c52b..ab22d6dcf5 100644
--- a/pages/topics/10.19.SvlVariables.md
+++ b/pages/topics/10.19.SvlVariables.md
@@ -97,7 +97,7 @@ public class BracketVar extends SimpleVar {
// Register it with our resource.
@Rest(...)
-public class MyResource extends BasicRestObject {
+public class MyResource extends BasicRestResource {
@Bean(name="varResolver")
public static VarResolver varResolver(VarResolver.Builder b) {
diff --git a/pages/topics/10.24.JspViewSupport.md
b/pages/topics/10.24.JspViewSupport.md
index ea99f57d43..ed1c757d55 100644
--- a/pages/topics/10.24.JspViewSupport.md
+++ b/pages/topics/10.24.JspViewSupport.md
@@ -68,7 +68,7 @@ artifact is just a repackaged Jasper bundle aligned with a
specific Jakarta EE g
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-view-jsp</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<!-- pick ONE engine -->
<dependency>
diff --git a/pages/topics/10.25.ThymeleafViewSupport.md
b/pages/topics/10.25.ThymeleafViewSupport.md
index a38bcd552f..e6a742a16d 100644
--- a/pages/topics/10.25.ThymeleafViewSupport.md
+++ b/pages/topics/10.25.ThymeleafViewSupport.md
@@ -72,7 +72,7 @@ See
https://juneau.apache.org/docs/topics/ThymeleafViewSupport for the full matr
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-view-thymeleaf</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<!-- pick ONE engine setup -->
<dependency>
diff --git a/pages/topics/10.26.MustacheViewSupport.md
b/pages/topics/10.26.MustacheViewSupport.md
index 08a00b2d77..a6a024a755 100644
--- a/pages/topics/10.26.MustacheViewSupport.md
+++ b/pages/topics/10.26.MustacheViewSupport.md
@@ -74,7 +74,7 @@ See https://juneau.apache.org/docs/topics/MustacheViewSupport
for the full matri
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-view-mustache</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<!-- engine: -->
<dependency>
diff --git a/pages/topics/10.27.FreemarkerViewSupport.md
b/pages/topics/10.27.FreemarkerViewSupport.md
index 8c8b11c65f..b425865a4b 100644
--- a/pages/topics/10.27.FreemarkerViewSupport.md
+++ b/pages/topics/10.27.FreemarkerViewSupport.md
@@ -79,7 +79,7 @@ See
https://juneau.apache.org/docs/topics/FreemarkerViewSupport for the full mat
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-view-freemarker</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<!-- engine: -->
<dependency>
diff --git a/pages/topics/10.29.03.ApiDocsMixins.md
b/pages/topics/10.29.03.ApiDocsMixins.md
index 673dbe7510..42f28e27ea 100644
--- a/pages/topics/10.29.03.ApiDocsMixins.md
+++ b/pages/topics/10.29.03.ApiDocsMixins.md
@@ -6,7 +6,7 @@ slug: ApiDocsMixins
The Juneau REST server ships with a four-class **api-docs mixin pack** in
[`org.apache.juneau.rest.server.docs`](/site/apidocs/org/apache/juneau/rest/server/docs/package-summary.html)
that drives every built-in Swagger / OpenAPI / Redoc endpoint on
`BasicRestServlet` and
-`BasicRestObject`. Each class is a single-purpose `@Rest`-annotated resource
designed to be
+`BasicRestResource`. Each class is a single-purpose `@Rest`-annotated resource
designed to be
grafted into your servlet via
[`@Rest(mixins=...)`](/docs/topics/RestServerCompositionMixinsAndPaths)
— pick the URLs you want, leave the ones you don't.
@@ -31,10 +31,10 @@ default, while machine clients that send `Accept:
application/json` (or `applica
still get the spec in their requested format. This keeps the same `/swagger`
URL useful for
both "open in browser" and "fetch as JSON" without query-string toggles.
-## Default mount on `BasicRestServlet` / `BasicRestObject`
+## Default mount on `BasicRestServlet` / `BasicRestResource`
Any subclass of
[`BasicRestServlet`](/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServlet.html)
-or
[`BasicRestObject`](/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestObject.html)
gets the
+or
[`BasicRestResource`](/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestResource.html)
gets the
full pack by default. Both classes declare:
```java
diff --git a/pages/topics/10.38.RestServerAuthGuards.md
b/pages/topics/10.38.RestServerAuthGuards.md
index 05fe49e229..b20bcb80a2 100644
--- a/pages/topics/10.38.RestServerAuthGuards.md
+++ b/pages/topics/10.38.RestServerAuthGuards.md
@@ -105,7 +105,7 @@ The optional `juneau-rest-server-auth-jwt` sub-module adds
[`JwtTokenValidator`]
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-auth-jwt</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
diff --git a/pages/topics/10.40.RestServerObservability.md
b/pages/topics/10.40.RestServerObservability.md
index 71fb0151c2..b2162d3ca5 100644
--- a/pages/topics/10.40.RestServerObservability.md
+++ b/pages/topics/10.40.RestServerObservability.md
@@ -155,7 +155,7 @@ To override the timer name, use the two-arg constructor:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-metrics-micrometer</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
@@ -259,7 +259,7 @@ public class ObservabilityConfig {
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-tracing-otel</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
@@ -459,7 +459,7 @@ The two bridge modules (`-metrics-micrometer`,
`-tracing-otel`) leave the consum
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-observability-otlp-bundle</artifactId>
- <version>10.0.0</version>
+ <version>${juneau.version}</version>
<type>pom</type>
</dependency>
```
diff --git a/pages/topics/10.43.SamlAuthSupport.md
b/pages/topics/10.43.SamlAuthSupport.md
index 3c3b9dc599..71f2162496 100644
--- a/pages/topics/10.43.SamlAuthSupport.md
+++ b/pages/topics/10.43.SamlAuthSupport.md
@@ -115,7 +115,7 @@ OpenSAML 5.x is published to the [Shibboleth Maven
repository](https://build.shi
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-auth-saml</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
diff --git a/pages/topics/10.44.OAuthAuthSupport.md
b/pages/topics/10.44.OAuthAuthSupport.md
index 571198873e..a8c7416b08 100644
--- a/pages/topics/10.44.OAuthAuthSupport.md
+++ b/pages/topics/10.44.OAuthAuthSupport.md
@@ -199,7 +199,7 @@ mvn -pl juneau-rest/juneau-rest-server dependency:tree |
grep -iE "(nimbusds|oau
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-auth-oauth</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
diff --git a/pages/topics/10.45.OidcRelyingParty.md
b/pages/topics/10.45.OidcRelyingParty.md
index 9af848ffb3..4b0d4f5e1a 100644
--- a/pages/topics/10.45.OidcRelyingParty.md
+++ b/pages/topics/10.45.OidcRelyingParty.md
@@ -148,7 +148,7 @@ mvn -pl juneau-rest/juneau-rest-server dependency:tree |
grep -iE "(nimbusds|oau
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-auth-oidc-rp</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
diff --git a/pages/topics/10.46.RestServerReactive.md
b/pages/topics/10.46.RestServerReactive.md
index be93ae3ae9..8bde548751 100644
--- a/pages/topics/10.46.RestServerReactive.md
+++ b/pages/topics/10.46.RestServerReactive.md
@@ -137,7 +137,7 @@ Dependency-free. Carries `ReactiveResponseProcessor`, the
`ReactiveStreamsAdapte
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-reactive</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
```
@@ -149,7 +149,7 @@ The bridge module is **server-side only** and opt-in, and
depends on `juneau-res
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-reactive-reactor</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
diff --git a/pages/topics/10.49.UsingWithOsgi.md
b/pages/topics/10.49.UsingWithOsgi.md
index e63938ec5c..94abba3551 100644
--- a/pages/topics/10.49.UsingWithOsgi.md
+++ b/pages/topics/10.49.UsingWithOsgi.md
@@ -42,9 +42,9 @@ public class Activator implements BundleActivator,
ServiceTrackerCustomizer {
Object service = context.getService(reference);
if (service instanceof HttpService) {
- HttpService service = (HttpService)service;
+ HttpService httpService = (HttpService)service;
try {
- service.registerServlet("/sample", new MyRestServlet(), null,
null);
+ httpService.registerServlet("/sample", new MyRestServlet(),
null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
diff --git a/pages/topics/10.59.RestServerManagementLogging.md
b/pages/topics/10.59.RestServerManagementLogging.md
index 04b9e85749..1c25b5a0db 100644
--- a/pages/topics/10.59.RestServerManagementLogging.md
+++ b/pages/topics/10.59.RestServerManagementLogging.md
@@ -131,7 +131,7 @@ public LoggersSettings loggersSettings() {
```
The mutating endpoints should be protected with an auth guard — see
-[Logging / Debugging](/docs/topics/LoggingAndDebugging) for how to layer
guards on management endpoints.
+[Logging / Debugging](/docs/topics/RestServerLoggingAndDebugging) for how to
layer guards on management endpoints.
Changes made via the set-level endpoints are **process-lifetime-only**: they
do not rewrite the backend's
configuration file and are lost on restart.
diff --git a/pages/topics/11.01.JuneauRestServerMcpBasics.md
b/pages/topics/11.01.JuneauRestServerMcpBasics.md
index 058702e6ed..b20dd5263e 100644
--- a/pages/topics/11.01.JuneauRestServerMcpBasics.md
+++ b/pages/topics/11.01.JuneauRestServerMcpBasics.md
@@ -43,7 +43,7 @@ The implementation is stateless — every request is dispatched
against an `McpS
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-mcp</artifactId>
- <version>9.5.0</version>
+ <version>${juneau.version}</version>
</dependency>
```
diff --git a/pages/topics/13.04.RequestContent.md
b/pages/topics/13.04.RequestContent.md
index 6920cfd8b8..3caa6df8cc 100644
--- a/pages/topics/13.04.RequestContent.md
+++ b/pages/topics/13.04.RequestContent.md
@@ -54,5 +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
<a href="/site/apidocs/org/apache/juneau/ClassMeta.html#toString()"
target="_blank">ClassMeta.toString(Object)</a> which typically just calls <a
href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/lang/Object.html#toString()"
target="_blank">Object.toString()</a>.
+If the part serializer is also null, POJOs will be converted to strings using
<a href="/site/apidocs/org/apache/juneau/ClassMeta.html#toString()"
target="_blank">ClassMeta.toString(Object)</a> which typically just calls <a
href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"
target="_blank">Object.toString()</a>.
:::
diff --git a/pages/topics/13.08.CustomCallHandlers.md
b/pages/topics/13.08.CustomCallHandlers.md
index c4a38d245d..36f86844fd 100644
--- a/pages/topics/13.08.CustomCallHandlers.md
+++ b/pages/topics/13.08.CustomCallHandlers.md
@@ -35,10 +35,10 @@ public class MyRestCallHandler implements RestCallHandler {
}
// Create a client that uses our custom handler.
-RestClient client = RestClient()
+RestClient client = RestClient
.create()
.json()
- .callHandler(MyCallHandler.class)
+ .callHandler(MyRestCallHandler.class)
.build();
```
:::
diff --git a/pages/topics/13.10.02.Remote.md b/pages/topics/13.10.02.Remote.md
index 199591688e..4cc7c3a188 100644
--- a/pages/topics/13.10.02.Remote.md
+++ b/pages/topics/13.10.02.Remote.md
@@ -8,7 +8,7 @@ identify it as a REST proxy interface.
<tree>
<node-0><java-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html"
target="_blank">Remote</a></java-annotation></node-0>
-<node-1><javac-method-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html#path()"
target="_blank">path</a></javac-method-annotation> <javac-method-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html#headers()"
target="_blank">headers</a></javac-method-annotation>
<javac-method-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html#version()"
target="_blank">version</a></javac-method-annotation> <javac-method-annotation>
[...]
+<node-1><javac-method-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html#path()"
target="_blank">path</a></javac-method-annotation> <javac-method-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html#headers()"
target="_blank">headers</a></javac-method-annotation>
<javac-method-annotation><a
href="/site/apidocs/org/apache/juneau/http/remote/Remote.html#headerList()"
target="_blank">headerList</a></javac-method-annotation> <javac-method-annot
[...]
</tree>
The @Remote annotation is optional but often included for code readability.
diff --git a/pages/topics/13.10.09.Request.md b/pages/topics/13.10.09.Request.md
index 411a5a73a8..d6a126c6e5 100644
--- a/pages/topics/13.10.09.Request.md
+++ b/pages/topics/13.10.09.Request.md
@@ -43,7 +43,7 @@ public class CreatePetRequest {
@Header("E-Tag")
public static UUID getUUID() {
- return UUID.generatedUUID();
+ return UUID.randomUUID();
}
}
```
@@ -107,7 +107,7 @@ public class CreatePetRequestImpl implements
CreatePetRequest {
@Override
public UUID getUUID() {
- return UUID.generateUUID();
+ return UUID.randomUUID();
}
}
```
\ No newline at end of file
diff --git a/pages/topics/13.10.11.DualPurposeInterfaces.md
b/pages/topics/13.10.11.DualPurposeInterfaces.md
index 2838878490..c432368982 100644
--- a/pages/topics/13.10.11.DualPurposeInterfaces.md
+++ b/pages/topics/13.10.11.DualPurposeInterfaces.md
@@ -24,7 +24,7 @@ public interface PetStore {
@RemoteGet("/pet")
public Collection getPets() throws NotAcceptable;
- @RemotDelete("/pet/{petId}")
+ @RemoteDelete("/pet/{petId}")
public Ok deletePet(
@Header(
name="api_key",
diff --git a/pages/topics/13.17.StreamingCursors.md
b/pages/topics/13.17.StreamingCursors.md
new file mode 100644
index 0000000000..99eabb2322
--- /dev/null
+++ b/pages/topics/13.17.StreamingCursors.md
@@ -0,0 +1,197 @@
+---
+title: "Streaming Cursors"
+slug: StreamingCursors
+---
+
+The `Marshaller` class exposes streaming methods that let you consume a REST
response as a
+lazy cursor instead of materializing the full response body into a single
POJO. This is the
+client-side complement of the server-side
+<a href="/docs/topics/RestStreamingIntegration">REST Streaming Integration</a>
page.
+
+:::warning Beta API
+These methods are part of the next-generation REST client
(`org.apache.juneau.marshall.ng.*`).
+The API is not yet frozen; source- and binary-incompatible changes may appear
in the next major
+Juneau release.
+:::
+
+> See <a href="/docs/topics/TokenStreamingBasics">Token-Streaming Basics</a>
for a full
+> explanation of cursor types, capability role interfaces, and the per-format
capability matrix.
+
+---
+
+##### Getting an InputStream from a response
+
+Obtain the raw response stream via
+<a
href="/site/apidocs/org/apache/juneau/rest/client/ResponseContent.html#asInputStream()"
target="_blank">ResponseContent.asInputStream()</a>
+and pass it directly to a `Marshaller` streaming method:
+
+```java
+RestClient client = RestClient.create().build();
+
+try (InputStream in = client.get("/api/records")
+ .run()
+ .getContent().asInputStream()) {
+
+ // Stream is open; pass it to the cursor factory
+ Marshaller m = Json.DEFAULT;
+ try (RecordReader r = m.fromRecords(in)) {
+ while (r.canRead()) {
+ MyBean bean = r.read(MyBean.class);
+ process(bean);
+ }
+ }
+}
+```
+
+The outer `try` keeps the HTTP connection open while you iterate; the inner
`try` closes the
+cursor (and the stream) when iteration is complete. **Do not** call
`ResponseContent.asString()`
+or any other buffering method before opening the cursor — those consume the
stream first.
+
+---
+
+##### `fromRecords()` — whole-value record cursor
+
+`Marshaller.fromRecords(InputStream)` opens a
+<a href="/site/apidocs/org/apache/juneau/marshall/stream/RecordReader.html"
target="_blank">RecordReader</a>
+that yields one deserialized value per call. It works with every format that
implements
+`RecordReadable`.
+
+```java
+Marshaller m = Jsonl.DEFAULT; // JSONL: one JSON value per line
+
+try (InputStream in = client.get("/api/export")
+ .header("Accept", "application/jsonl")
+ .run()
+ .getContent().asInputStream();
+ RecordReader r = m.fromRecords(in)) {
+
+ while (r.canRead()) {
+ MyBean bean = r.read(MyBean.class);
+ process(bean);
+ }
+}
+```
+
+Stream and cursor can be opened together in a single `try` resource list.
+
+---
+
+##### `fromArrayRecords()` — element-by-element array streaming
+
+When the server returns a single top-level JSON (or CBOR / MsgPack) array,
+`fromArrayRecords()` streams each element as a separate record without
buffering the
+full array:
+
+```java
+Marshaller m = Json.DEFAULT;
+
+try (InputStream in = client.get("/api/items")
+ .run()
+ .getContent().asInputStream();
+ RecordReader r = m.fromArrayRecords(in)) {
+
+ while (r.canRead()) {
+ Item item = r.read(Item.class);
+ process(item);
+ }
+}
+```
+
+> Only formats that implement
+> <a
href="/site/apidocs/org/apache/juneau/marshall/stream/ArrayRecordReadable.html"
target="_blank">ArrayRecordReadable</a>
+> support this method — see the
+> <a
href="/docs/topics/TokenStreamingBasics#per-format-capability-matrix">capability
matrix</a>.
+
+---
+
+##### `fromTokens()` — fine-grained structural cursor
+
+For FULL-tier formats (JSON family, CBOR, MsgPack) you can open a
+<a href="/site/apidocs/org/apache/juneau/marshall/stream/TokenReader.html"
target="_blank">TokenReader</a>
+and navigate the document structure token-by-token:
+
+```java
+Marshaller m = Json.DEFAULT;
+
+try (InputStream in = client.get("/api/data")
+ .run()
+ .getContent().asInputStream();
+ TokenReader r = m.fromTokens(in)) {
+
+ r.startObject();
+ while (r.hasMoreKeys()) {
+ String key = r.key();
+ String value = r.stringValue();
+ System.out.println(key + " = " + value);
+ }
+ r.endObject();
+}
+```
+
+> Only formats that implement
+> <a href="/site/apidocs/org/apache/juneau/marshall/stream/TokenReadable.html"
target="_blank">TokenReadable</a>
+> support `fromTokens()`. Calling it on a PARTIAL-tier format (e.g.
`Yaml.DEFAULT`) throws
+> `ClassCastException` at runtime.
+
+---
+
+##### Using `iterator()` and `stream()` views
+
+`RecordReader` exposes JDK-friendly iteration surfaces:
+
+```java
+try (InputStream in = client.get("/api/events")
+ .header("Accept", "application/jsonl")
+ .run()
+ .getContent().asInputStream();
+ RecordReader r = Jsonl.DEFAULT.fromRecords(in)) {
+
+ // Enhanced-for loop via Iterable adapter
+ for (Event e : (Iterable<Event>) () -> r.iterator(Event.class)) {
+ handle(e);
+ }
+}
+
+// Or as a Java Stream (cursor is still closed by the outer try)
+try (InputStream in = client.get("/api/events")
+ .header("Accept", "application/jsonl")
+ .run()
+ .getContent().asInputStream();
+ RecordReader r = Jsonl.DEFAULT.fromRecords(in)) {
+
+ long count = r.stream(Event.class).filter(Event::isActive).count();
+}
+```
+
+---
+
+##### Checking cursor quality
+
+`RecordReader.isRecordStreaming()` returns `true` when the cursor is a true
O(1) streaming
+cursor (constant memory per record) and `false` when it is backed by a
buffered adapter.
+Check it before processing very large responses if memory is a concern:
+
+```java
+Marshaller m = Yaml.DEFAULT; // PARTIAL-tier: buffered record adapter
+
+try (InputStream in = client.get("/api/data")
+ .header("Accept", "application/yaml")
+ .run()
+ .getContent().asInputStream();
+ RecordReader r = m.fromRecords(in)) {
+
+ boolean isStreaming = r.isRecordStreaming(); // false for YAML
+ // ...
+}
+```
+
+---
+
+##### See also
+
+- <a href="/docs/topics/TokenStreamingBasics">Token-Streaming Basics</a> —
cursor types, role interfaces, capability matrix
+- <a href="/docs/topics/RecordStreaming">Record Streaming</a> — `RecordReader`
/ `RecordWriter` contract
+- <a href="/docs/topics/TokenStreaming">Token Streaming</a> — `TokenReader` /
`TokenWriter` contract
+- <a href="/docs/topics/ArrayRecordStreaming">Array-Record Streaming</a> —
element-by-element array cursors
+- <a href="/docs/topics/RestStreamingIntegration">REST Streaming
Integration</a> — server-side cursor parameters
+- <a href="/docs/topics/ResponseContent">Response Content</a> —
`ResponseContent.asInputStream()`
diff --git a/pages/topics/13.18.ContentTypeNegotiation.md
b/pages/topics/13.18.ContentTypeNegotiation.md
new file mode 100644
index 0000000000..edaa814192
--- /dev/null
+++ b/pages/topics/13.18.ContentTypeNegotiation.md
@@ -0,0 +1,164 @@
+---
+title: "Content-Type Negotiation"
+slug: ContentTypeNegotiation
+---
+
+`RestClient` supports multi-format content negotiation: it automatically sets
`Accept` and
+`Content-Type` headers based on its configured serializer/parser registry, and
selects the
+right parser for each response based on the server's `Content-Type` reply.
+
+:::warning Beta API
+The `RestClient` described here is part of the next-generation stack
(`org.apache.juneau.marshall.ng.*`).
+The API is not yet frozen.
+:::
+
+> See <a href="/docs/topics/SerializerSetsParserSets">Serializer Sets and
Parser Sets</a> for
+> the underlying registry API.
+
+---
+
+##### Default behavior (single-format JSON)
+
+With no explicit configuration, `RestClient` uses `JsonSerializer` /
`JsonParser` and sends
+`Accept: application/json` on every request:
+
+```java
+RestClient client = RestClient.create().build();
+
+MyBean bean = client.get("/api/item/1")
+ .run()
+ .getContent().as(MyBean.class); // parsed with JsonParser
+```
+
+---
+
+##### Configuring a multi-format client
+
+Register multiple serializers and parsers at build time using
+<a href="/site/apidocs/org/apache/juneau/rest/client/RestClient.Builder.html"
target="_blank">RestClient.Builder</a>:
+
+<tree>
+<node-0><java-class><a
href="/site/apidocs/org/apache/juneau/rest/client/RestClient.Builder.html"
target="_blank">RestClient.Builder</a></java-class></node-0>
+<node-1><java-method>serializer(Serializer...)</java-method> — append
serializers (built into a <code>SerializerSet</code>)</node-1>
+<node-1><java-method>parser(Parser...)</java-method> — append parsers (built
into a <code>ParserSet</code>)</node-1>
+<node-1><java-method>serializers(SerializerSet)</java-method> — supply a
pre-built serializer registry</node-1>
+<node-1><java-method>parsers(ParserSet)</java-method> — supply a pre-built
parser registry</node-1>
+<node-1><java-method>defaultSerializer(Serializer)</java-method> — fallback
when format is not otherwise discernible</node-1>
+<node-1><java-method>defaultParser(Parser)</java-method> — fallback when
response <code>Content-Type</code> is absent or unmatched</node-1>
+</tree>
+
+```java
+RestClient client = RestClient.create()
+ .serializer(JsonSerializer.DEFAULT, CborSerializer.DEFAULT,
YamlSerializer.DEFAULT)
+ .parser(JsonParser.DEFAULT, CborParser.DEFAULT, YamlParser.DEFAULT)
+ .defaultSerializer(JsonSerializer.DEFAULT)
+ .defaultParser(JsonParser.DEFAULT)
+ .build();
+```
+
+`RestClient` derives the `Accept` header automatically from all registered
parsers:
+
+```
+Accept: application/json, application/cbor, application/yaml
+```
+
+---
+
+##### How the client selects a serializer for outbound bodies
+
+When you call `RestRequest.body(Object)` (or the typed body helpers), the
client needs a
+serializer to convert the POJO to bytes. Selection order:
+
+1. If the request carries an explicit `Content-Type` header, the matching
serializer from the
+ `SerializerSet` is used.
+2. If no explicit `Content-Type` is set, the `defaultSerializer` is used
(falls back to
+ `JsonSerializer.DEFAULT` if none configured).
+
+Override the format for one request by setting the `Content-Type` header:
+
+```java
+client.post("/api/items", myBean)
+ .header("Content-Type", "application/cbor")
+ .run()
+ .assertStatus().asCode().is(201);
+```
+
+---
+
+##### How the client selects a parser for inbound responses
+
+When you call `ResponseContent.as(Class)`, the client reads the response
`Content-Type` header
+and calls `RestClient.getMatchingParser(contentType)`. Selection order:
+
+1. The `ParserSet` is queried for a parser whose media type matches the
response `Content-Type`.
+2. If no match is found, `defaultParser` is used.
+3. If `defaultParser` is null, the first parser in the registry is used.
+4. If the registry is empty, `JsonParser.DEFAULT` is used as a last resort.
+
+```java
+// Server responds with Content-Type: application/cbor
+MyBean bean = client.get("/api/item/1")
+ .run()
+ .getContent().as(MyBean.class); // → CborParser selected automatically
+```
+
+---
+
+##### Overriding the Accept header per request
+
+Force the server to respond in a specific format by setting the `Accept`
header on the request:
+
+```java
+MyBean bean = client.get("/api/item/1")
+ .header("Accept", "application/yaml")
+ .run()
+ .getContent().as(MyBean.class); // parsed with YamlParser
+```
+
+The per-request header takes precedence over the client-wide default derived
from the
+`ParserSet`.
+
+---
+
+##### Using a pre-built SerializerSet / ParserSet
+
+For fine-grained control over media-type ordering, q-factors, or reuse across
clients, build
+the registry objects directly:
+
+```java
+SerializerSet serializers = SerializerSet.create()
+ .add(JsonSerializer.DEFAULT, CborSerializer.DEFAULT)
+ .build();
+
+ParserSet parsers = ParserSet.create()
+ .add(JsonParser.DEFAULT, CborParser.DEFAULT)
+ .build();
+
+RestClient client = RestClient.create()
+ .serializers(serializers)
+ .parsers(parsers)
+ .build();
+```
+
+> See <a href="/docs/topics/SerializerSetsParserSets">Serializer Sets and
Parser Sets</a> for
+> the full registry API.
+
+---
+
+##### Quick reference: negotiation flow
+
+| Step | What happens |
+|---|---|
+| Client sends request | `Accept` header = union of all registered parser
media types |
+| Client sends body | `Content-Type` = matched serializer's media type
(explicit header wins) |
+| Server replies | `Content-Type` response header drives parser selection in
`getMatchingParser()` |
+| Fallback | `defaultParser` → first registered parser → `JsonParser.DEFAULT` |
+
+---
+
+##### See also
+
+- <a href="/docs/topics/SerializerSetsParserSets">Serializer Sets and Parser
Sets</a> — the underlying registry API
+- <a href="/docs/topics/PojoMarshalling">POJO Marshalling</a> — per-request
language shortcuts
+- <a href="/docs/topics/ResponseContent">Response Content</a> — parsing the
response body
+- <a href="/docs/topics/RequestContent">Request Content</a> — setting the
request body
diff --git a/pages/topics/14.02.MockRestClientOverview.md
b/pages/topics/14.02.MockRestClientOverview.md
index 8359f85ae5..fd203698df 100644
--- a/pages/topics/14.02.MockRestClientOverview.md
+++ b/pages/topics/14.02.MockRestClientOverview.md
@@ -29,7 +29,7 @@ public class MockTest {
// Our REST resource to test.
// Simply echos the response.
@Rest
- public static class EchoRest implements BasicRestServlet {
+ public static class EchoRest extends BasicRestServlet {
@RestPut
public MyBean echo(@Content MyBean bean) {
@@ -71,6 +71,8 @@ public void testEcho() throws Exception {
.json5()
.build();
+ MyBean myBean = new MyBean();
+
// Create a request.
RestRequest req = client.put("/echo", myBean);
@@ -79,7 +81,7 @@ public void testEcho() throws Exception {
// Run assertion tests on the results.
res.assertStatus().is(200);
- res.assertContent().is("'foo'");
+ res.assertContent().is("{foo:1}");
myBean = res.getContent().as(MyBean.class);
}
@@ -188,7 +190,7 @@ public interface MyRemoteInterface {
public class MyRest {
@RestGet
- public int echoQuery(@Query("id") String id) {
+ public int echoQuery(@Query("id") int id) {
return id;
}
}
diff --git a/pages/topics/15.02.MicroserviceCoreOverview.md
b/pages/topics/15.02.MicroserviceCoreOverview.md
index d3409b771e..5f93d5fac6 100644
--- a/pages/topics/15.02.MicroserviceCoreOverview.md
+++ b/pages/topics/15.02.MicroserviceCoreOverview.md
@@ -18,7 +18,7 @@ The Microservice API consists of the following packages and
classes:
<node-1><a
href="/site/apidocs/org/apache/juneau/microservice/package-summary.html"
target="_blank">org.apache.juneau.microservice</a> - Main package</node-1>
<node-2><java-class><a
href="/site/apidocs/org/apache/juneau/microservice/Microservice.html"
target="_blank">Microservice</a></java-class> - The base microservice
class.</node-2>
<node-2><java-class><a
href="/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html"
target="_blank">Microservice.Builder</a></java-class> - Builder for the
microservice class.</node-2>
-<node-2><java-class><a
href="/site/apidocs/org/apache/juneau/microservice/MicroserviceListener.html"
target="_blank">MicroserviceListener</a></java-class> - Interface for hooking
into lifecyle events of the microservice.</node-2>
+<node-2><java-class><a
href="/site/apidocs/org/apache/juneau/microservice/MicroserviceListener.html"
target="_blank">MicroserviceListener</a></java-class> - Interface for hooking
into lifecycle events of the microservice.</node-2>
<node-2><java-class><a
href="/site/apidocs/org/apache/juneau/microservice/BasicMicroserviceListener.html"
target="_blank">BasicMicroserviceListener</a></java-class> - Adapter for
MicroserviceListener class.</node-2>
<node-1><a
href="/site/apidocs/org/apache/juneau/microservice/console/package-summary.html"
target="_blank">org.apache.juneau.microservice.console</a> - Console
package</node-1>
<node-2><java-class><a
href="/site/apidocs/org/apache/juneau/microservice/console/ConsoleCommand.html"
target="_blank">ConsoleCommand</a></java-class> - Abstract class for defining
console commands.</node-2>
diff --git a/pages/topics/15.03.Args.md b/pages/topics/15.03.Args.md
index 728ff5d181..bf16de6ee9 100644
--- a/pages/topics/15.03.Args.md
+++ b/pages/topics/15.03.Args.md
@@ -24,36 +24,48 @@ an API for easily accessing command-line arguments using
common notation:
```java
Args args = Microservice.getInstance().getArgs();
+```
-// One main argument
+One main argument (`a1`):
+```java
// a1
String a1 = args.get(0).orElse(null); // "a1"
String a2 = args.get(1).orElse(null); // null
+```
-// Two main arguments
+Two main arguments (`a1 a2`):
+```java
// a1 a2
String a1 = args.get(0).orElse(null); // "a1"
String a2 = args.get(1).orElse(null); // "a2"
+```
-// One main argument and one optional argument with no value
+One main argument and one optional flag with no value (`a1 -a2`):
+```java
// a1 -a2
-String argsa1 = args.get(0).orElse(null);
+String a1 = args.get(0).orElse(null);
boolean hasA2 = args.has("a2"); // true
boolean hasA3 = args.has("a3"); // false
+```
-// One main argument and one optional argument with one value
+One main argument and one optional argument with one value (`a1 -a2 v2`):
+```java
// a1 -a2 v2
String a1 = args.get(0).orElse(null);
String a2 = args.get("a2").orElse(null); // "v2"
String a3 = args.get("a3").orElse(null); // null
+```
-// One main argument and one optional argument with two values
+One main argument and one optional argument with multiple values (`a1 -a2 v2a
v2b`):
+```java
// a1 -a2 v2a v2b
String a1 = args.get(0).orElse(null);
List<String> a2 = args.getAll("a2"); // Contains ["v2a","v2b"]
List<String> a3 = args.getAll("a3"); // Empty list
+```
-// Same as previous, except specify optional argument name multiple times
+Same as previous but specifying the argument name multiple times (`a1 -a2 v2a
-a2 v2b`):
+```java
// a1 -a2 v2a -a2 v2b
String a1 = args.get(0).orElse(null);
List<String> a2 = args.getAll("a2"); // Contains ["v2a","v2b"]
diff --git a/pages/topics/15.04.Manifest.md b/pages/topics/15.04.Manifest.md
index 1659e48d67..e0b50ddfb8 100644
--- a/pages/topics/15.04.Manifest.md
+++ b/pages/topics/15.04.Manifest.md
@@ -44,7 +44,7 @@ The manifest is also used for the <a
href="/site/apidocs/org/apache/juneau/commo
```java
// $MF used in variable resolver.
VarResolver var = Microservice.getInstance().getVarResolver();
-System.out.println(vr.resolve("The main class is $MF{Main-Class}"));
+System.out.println(var.resolve("The main class is $MF{Main-Class}"));
```
```java
diff --git a/pages/topics/15.06.VarResolver.md
b/pages/topics/15.06.VarResolver.md
index 2ed1172ecc..c11c090fad 100644
--- a/pages/topics/15.06.VarResolver.md
+++ b/pages/topics/15.06.VarResolver.md
@@ -20,8 +20,8 @@ VarResolver varResolver =
Microservice.getInstance().getVarResolver();
System.out.println(varResolver.resolve("Main class is set to $MF{Main-Class,
unknown}"));
```
-The variable resolver becomes much more powerful when used in REST resource
annotations which will be described latter
-in juneau-microservice-jetty By default, support for the following variables
are provided:
+The variable resolver becomes much more powerful when used in REST resource
annotations which will be described later
+in juneau-microservice-jetty. By default, support for the following variables
are provided:
- `$S{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/SystemPropertiesVar.html"
target="_blank">SystemPropertiesVar</a>
- `$E{key[,default]}` - <a
href="/site/apidocs/org/apache/juneau/commons/svl/vars/EnvVariablesVar.html"
target="_blank">EnvVariablesVar</a>
diff --git a/pages/topics/15.07.ConsoleCommands.md
b/pages/topics/15.07.ConsoleCommands.md
index 2169f6908d..56043eacf9 100644
--- a/pages/topics/15.07.ConsoleCommands.md
+++ b/pages/topics/15.07.ConsoleCommands.md
@@ -77,5 +77,5 @@ The API for defining console commands is shown below:
<node-1><java-method><a
href="/site/apidocs/org/apache/juneau/microservice/console/ConsoleCommand.html#getSynopsis()"
target="_blank">getSynopsis()</a></java-method></node-1>
</tree>
-By default, the console input and output are taken from <a
href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/lang/System.html#in"
target="_blank">System.in</a> and <a
href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/lang/System.html#out"
target="_blank">System.out</a>.
+By default, the console input and output are taken from <a
href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html#in"
target="_blank">System.in</a> and <a
href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html#out"
target="_blank">System.out</a>.
These can be overridden using the <a
href="/site/apidocs/org/apache/juneau/microservice/Microservice.Builder.html#console(java.util.Scanner,java.io.PrintWriter)"
target="_blank">console(Scanner,PrintWriter)</a> method.
diff --git a/pages/topics/15.10.MicroserviceTesting.md
b/pages/topics/15.10.MicroserviceTesting.md
index 0fd437174f..aa1dd5f2b6 100644
--- a/pages/topics/15.10.MicroserviceTesting.md
+++ b/pages/topics/15.10.MicroserviceTesting.md
@@ -11,7 +11,7 @@ It ships in a small dedicated support module:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-microservice-test</artifactId>
- <version>10.0.0</version>
+ <version>${juneau.version}</version>
<scope>test</scope>
</dependency>
```
diff --git a/pages/topics/16.03.LifecycleMethods.md
b/pages/topics/16.03.LifecycleMethods.md
index ed4bbf03c6..70c6bb9852 100644
--- a/pages/topics/16.03.LifecycleMethods.md
+++ b/pages/topics/16.03.LifecycleMethods.md
@@ -16,7 +16,7 @@ A typical implementation of an app with lifecycle methods
might look like the fo
```java
public class App {
- private static final Microservice MICROSERVICE;
+ private static Microservice MICROSERVICE;
public static void main(String[] args) {
MICROSERVICE = Microservice
diff --git a/pages/topics/16.06.Config.md b/pages/topics/16.06.Config.md
index c1f290149c..a5846fc966 100644
--- a/pages/topics/16.06.Config.md
+++ b/pages/topics/16.06.Config.md
@@ -33,7 +33,7 @@ method allows you to explicitly specify the name of the
external configuration f
```java
Microservice
.create()
- .config("my-files/MyMicroservice.cfg")
+ .configName("my-files/MyMicroservice.cfg")
.build()
.start()
;
@@ -94,9 +94,9 @@ used to get access to the configuration.
Config config = Microservice.getInstance().getConfig();
File logDir = config.get("Logging/logDir").as(File.class).orElse(null);
-boolean append = config.get("Logging/append").asBoolean().orElse(null);
+Boolean append = config.get("Logging/append").asBoolean().orElse(null);
String format = config.get("Logging/format", "[{date} {level}]
{msg}%n").orElse(null);
-long limit = config.get("Logging/limit").asLong().orElse(null);
+Long limit = config.get("Logging/limit").asLong().orElse(null);
Map levels = config.get("Logging/levels").as(Map.class, String.class,
Level.class).orElse(null);
```
diff --git a/pages/topics/16.12.ManagementSurface.md
b/pages/topics/16.12.ManagementSurface.md
index 5576aee262..9b95cfbdaf 100644
--- a/pages/topics/16.12.ManagementSurface.md
+++ b/pages/topics/16.12.ManagementSurface.md
@@ -165,7 +165,7 @@ Consistent with Juneau's explicit-over-magic stance, you
**declare** the backend
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-rest-server-management-logging</artifactId>
- <version>10.0.0</version>
+ <version>${juneau.version}</version>
</dependency>
<!-- plus your chosen backend at the version you want, e.g.
ch.qos.logback:logback-classic -->
```
diff --git a/pages/topics/17.01.DependencyManagement.md
b/pages/topics/17.01.DependencyManagement.md
index 552b8c384c..594baa6703 100644
--- a/pages/topics/17.01.DependencyManagement.md
+++ b/pages/topics/17.01.DependencyManagement.md
@@ -24,7 +24,7 @@ explicit versions from every Juneau dependency — the BOM
supplies them:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-bom</artifactId>
- <version>10.0.0</version>
+ <version>${juneau.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -68,7 +68,7 @@ transitively pull a coherent module set plus the REST client:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-microservice-jetty-bundle</artifactId>
- <version>10.0.0</version>
+ <version>${juneau.version}</version>
<type>pom</type>
</dependency>
```
diff --git a/pages/topics/17.02.NativeImageAndLayeredJars.md
b/pages/topics/17.02.NativeImageAndLayeredJars.md
index 19c2fbe9ea..a6ddd7e2e1 100644
--- a/pages/topics/17.02.NativeImageAndLayeredJars.md
+++ b/pages/topics/17.02.NativeImageAndLayeredJars.md
@@ -20,7 +20,7 @@ Juneau's marshalling/bean core is reflection-heavy, so
native-image (closed-worl
### Why "conditional go", not "no-go"
-All of Juneau's reflection flows through a single wrapper layer —
`org.apache.juneau.commons.reflect.*` (`ClassInfo` / `MethodInfo` / `FieldInfo`
/ `ConstructorInfo`) with one `setAccessible()` choke point in `AccessibleInfo`
— and there is **no `sun.misc.Unsafe`, no `MethodHandle`/`VarHandle`, and no
bytecode generation** anywhere in main source. The blockers are the *standard*
native-image reflection blockers, not anything pathological. Critically, the
same `BeanContext` / `BeanMeta` / [...]
+All of Juneau's reflection flows through a single wrapper layer —
`org.apache.juneau.commons.reflect.*` (`ClassInfo` / `MethodInfo` / `FieldInfo`
/ `ConstructorInfo`) with one `setAccessible()` choke point in `AccessibleInfo`
— and there is **no `sun.misc.Unsafe` and no bytecode generation** anywhere in
main source. The blockers are the *standard* native-image reflection blockers,
not anything pathological. Critically, the same `MarshallingContext` /
`BeanMeta` / `ClassMeta` model that d [...]
### The hard blockers (all standard, all addressable)
diff --git a/pages/topics/18.03.ScClientOverview.md
b/pages/topics/18.03.ScClientOverview.md
index 96f2062c1e..235e1557cf 100644
--- a/pages/topics/18.03.ScClientOverview.md
+++ b/pages/topics/18.03.ScClientOverview.md
@@ -55,7 +55,6 @@ Until the client library is implemented, you can consume
`juneau-sc-server` with
```java
import org.apache.juneau.rest.client.*;
import org.apache.juneau.marshall.json.*;
-import java.util.Map;
public class ScClientExample {
@@ -70,14 +69,14 @@ public class ScClientExample {
// Fetch config for project "my-service" on branch "main"
// Response type mirrors the server's JSON structure:
// { "APPLICATION": {"value": "..."}, "PROJECT": {"value": "..."} }
- Map<String,Map<String,String>> response = client
+ JsonMap response = client
.get("/configs/my-service/main")
.run()
.getContent()
- .as(OMap.class);
+ .as(JsonMap.class);
- String appCfgText = response.get("APPLICATION").get("value");
- String projectCfgText = response.get("PROJECT").get("value");
+ String appCfgText = response.get("APPLICATION",
JsonMap.class).getString("value");
+ String projectCfgText = response.get("PROJECT",
JsonMap.class).getString("value");
// Parse the raw .cfg text into a Config object
Config appConfig = Config.create()
diff --git a/pages/topics/21.01.JuneauShadedOverview.md
b/pages/topics/21.01.JuneauShadedOverview.md
index 5e62a0631f..4a417fbeaa 100644
--- a/pages/topics/21.01.JuneauShadedOverview.md
+++ b/pages/topics/21.01.JuneauShadedOverview.md
@@ -74,7 +74,7 @@ When using regular Juneau modules in Bazel:
# This is incomplete and will fail!
maven_jar(
name = "juneau_marshall",
- artifact = "org.apache.juneau:juneau-marshall:9.2.0-SNAPSHOT",
+ artifact = "org.apache.juneau:juneau-marshall:${juneau.version}",
)
java_library(
@@ -93,7 +93,7 @@ Just one dependency declaration!
```python
maven_jar(
name = "juneau_core",
- artifact = "org.apache.juneau:juneau-shaded-core:9.2.0-SNAPSHOT",
+ artifact = "org.apache.juneau:juneau-shaded-core:${juneau.version}",
)
java_library(
@@ -116,7 +116,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")
# Add Maven dependencies
maven_jar(
name = "juneau_rest_client",
- artifact = "org.apache.juneau:juneau-shaded-rest-client:9.2.0-SNAPSHOT",
+ artifact = "org.apache.juneau:juneau-shaded-rest-client:${juneau.version}",
repository =
"https://repository.apache.org/content/repositories/snapshots/",
)
@@ -154,7 +154,7 @@ java_binary(
```python
maven_jar(
name = "juneau_rest_server",
- artifact = "org.apache.juneau:juneau-shaded-rest-server:9.2.0-SNAPSHOT",
+ artifact = "org.apache.juneau:juneau-shaded-rest-server:${juneau.version}",
repository =
"https://repository.apache.org/content/repositories/snapshots/",
)
@@ -190,7 +190,7 @@ java_library(
```python
maven_jar(
name = "juneau_rest_server_springboot",
- artifact =
"org.apache.juneau:juneau-shaded-rest-server-springboot:9.2.0-SNAPSHOT",
+ artifact =
"org.apache.juneau:juneau-shaded-rest-server-springboot:${juneau.version}",
repository =
"https://repository.apache.org/content/repositories/snapshots/",
)
@@ -220,7 +220,7 @@ java_library(
```python
maven_jar(
name = "juneau_core",
- artifact = "org.apache.juneau:juneau-shaded-core:9.2.0-SNAPSHOT",
+ artifact = "org.apache.juneau:juneau-shaded-core:${juneau.version}",
repository =
"https://repository.apache.org/content/repositories/snapshots/",
)
```
@@ -244,7 +244,7 @@ java_library(
```python
maven_jar(
name = "juneau_all",
- artifact = "org.apache.juneau:juneau-shaded-all:9.2.0-SNAPSHOT",
+ artifact = "org.apache.juneau:juneau-shaded-all:${juneau.version}",
repository =
"https://repository.apache.org/content/repositories/snapshots/",
)
@@ -327,7 +327,7 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
- "org.apache.juneau:juneau-shaded-rest-client:9.2.0-SNAPSHOT",
+ "org.apache.juneau:juneau-shaded-rest-client:${juneau.version}",
"org.apache.httpcomponents.client5:httpclient5:5.2.1",
"org.apache.httpcomponents.core5:httpcore5:5.2.1",
],
@@ -370,7 +370,7 @@ java_binary(
```python
maven_install(
artifacts = [
- "org.apache.juneau:juneau-shaded-rest-client:9.2.0-SNAPSHOT",
+ "org.apache.juneau:juneau-shaded-rest-client:${juneau.version}",
"org.apache.httpcomponents.client5:httpclient5:5.2.1",
],
version_conflict_policy = "pinned", # Use specific versions
diff --git a/pages/topics/23.01.V9MigrationGuide.md
b/pages/topics/23.01.V9MigrationGuide.md
index 9fd8541b38..b34c8eeead 100644
--- a/pages/topics/23.01.V9MigrationGuide.md
+++ b/pages/topics/23.01.V9MigrationGuide.md
@@ -13,4 +13,4 @@ Note that you can also refer to the Release Notes for changes
as well.
| <a href="/site/apidocs/org/apache/juneau/http/Content.html"
target="_blank">@Body</a> annotation. | Has been renamed to <a
href="/site/apidocs/org/apache/juneau/http/Content.html"
target="_blank">@Content</a> (to better match HTTP naming conventions such as
Content-Type/Content-Encoding headers). |
| `@Query(_default)`, `@FormData(_default)`. | Has been renamed to <a
href="/site/apidocs/org/apache/juneau/http/Query.html#def()"
target="_blank">Query.def</a> / <a
href="/site/apidocs/org/apache/juneau/http/FormData.html#def()"
target="_blank">FormData.def</a>.<br />Note however that <a
href="/site/apidocs/org/apache/juneau/rest/server/RestOp.html"
target="_blank">@RestOp</a>-annotated parameters now also support use of
Optional parameters which simplifies the coding of default values. |
| `@Rest(reqHeaders)`. | Has been renamed to <a
href="/site/apidocs/org/apache/juneau/rest/server/Rest.html#defaultRequestHeaders()"
target="_blank">Rest.defaultRequestHeaders</a> and added <a
href="/site/apidocs/org/apache/juneau/rest/server/Rest.html#defaultResponseHeaders()"
target="_blank">Rest.defaultResponseHeaders</a>. |
-| `@Rest(staticFiles)`. | Changed from a string array to a `Class<? extends
StaticFiles>`.<br />If you're extending from <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServlet.html"
target="_blank">BasicRestServlet</a>/<a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestObject.html"
target="_blank">BasicRestObject</a>, the <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestOperations.html#getHtdoc(java.lang.String,java.util.Loca
[...]
+| `@Rest(staticFiles)`. | Changed from a string array to a `Class<? extends
StaticFiles>`.<br />If you're extending from <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestServlet.html"
target="_blank">BasicRestServlet</a>/<a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestResource.html"
target="_blank">BasicRestResource</a>, the <a
href="/site/apidocs/org/apache/juneau/rest/server/servlet/BasicRestOperations.html#getHtdoc(java.lang.String,java.util.
[...]
diff --git a/pages/topics/24.01.V10MigrationGuide.md
b/pages/topics/24.01.V10MigrationGuide.md
index c2c514235b..5ec7a5d587 100644
--- a/pages/topics/24.01.V10MigrationGuide.md
+++ b/pages/topics/24.01.V10MigrationGuide.md
@@ -639,9 +639,9 @@ Bean properties are now serialized in **alphabetical order
by default** across a
| Old | New | Notes |
|-----|-----|-------|
-| `@Bean(sort=true)` — opt-in to sorted output | `@Bean(unsorted=true)` —
opt-out of default sorted output | Hard rename with inverted semantics.
Removing both attributes leaves properties sorted (was: unsorted). |
-| `BeanContext.Builder.sortProperties()` / `sortProperties(boolean)` |
`BeanContext.Builder.unsortedProperties()` / `unsortedProperties(boolean)` |
Hard removal. Inverted semantics. |
-| `BeanContext.Builder.sortProperties(Class<?>...on)` |
`BeanContext.Builder.unsortedProperties(Class<?>...on)` | Same. |
+| `@Bean(sort=true)` — opt-in to sorted output | `@BeanType(unsorted=true)` —
opt-out of default sorted output | Hard rename with inverted semantics.
Removing both attributes leaves properties sorted (was: unsorted). |
+| `BeanContext.Builder.sortProperties()` / `sortProperties(boolean)` |
`MarshallingContext.Builder.unsortedProperties()` /
`unsortedProperties(boolean)` | Hard removal. Inverted semantics. |
+| `BeanContext.Builder.sortProperties(Class<?>...on)` |
`MarshallingContext.Builder.unsortedProperties(Class<?>...on)` | Same. |
| `BeanContextable.Builder.sortProperties()` / `sortProperties(Class<?>...on)`
| `unsortedProperties()` / `unsortedProperties(Class<?>...on)` | Mirrored on
every serializer / parser builder. |
| `BeanFilter.Builder.sortProperties()` / `sortProperties(boolean)` |
`BeanFilter.Builder.unsortedProperties()` | Per-bean-filter opt-out. |
| `BeanFilter.isSortProperties()` / `BeanSession.isSortProperties()` /
`BeanMeta.isSortProperties()` | `BeanFilter.isUnsortedProperties()` /
`BeanSession.isUnsortedProperties()` / (internal field renamed on `BeanMeta`) |
Inverted semantics. |
@@ -777,7 +777,7 @@ OpenAPI 3.1 emission is new in v10.0; existing Swagger v2
emission is unchanged.
| Old | New | Notes |
|-----|-----|-------|
-| Resource exposed only Swagger v2 at `/api/*`. No way to opt into OpenAPI 3.1
emission. | Apply one or more api-docs mixins from
`org.apache.juneau.rest.docs`: `BasicSwaggerResource` (`/api`),
`BasicSwaggerUiResource` (`/swagger`), `BasicOpenApiResource` (`/openapi`,
`/openapi.json`, `/openapi.yaml`), `BasicRedocResource` (`/redoc`). Subclasses
of `BasicRestServlet` / `BasicRestObject` get all four (composed as
`@Rest(mixins={BasicSwaggerUiResource.class, BasicRedocResource.class})`) au
[...]
-| `BasicRestOperations.getSwagger(RestRequest)` and `getOpenApi(RestRequest)`
interface methods | Removed. The endpoints are now mounted via the api-docs
mixin pack on `BasicRestServlet` / `BasicRestObject`. User-written
`BasicRestOperations` implementers should remove their old `getSwagger` /
`getOpenApi` overrides — the methods are no longer on the interface. | If you
need a different api-docs surface, add `@Rest(noInherit={"mixins"},
mixins=...)` on your subclass. |
-| `BasicGroupOperations.getChildrenSwagger(RestRequest)` /
`getChildrenOpenApi(RestRequest)` (the `?Swagger` / `?OpenApi` query mirrors on
group resources) and the `HasSwaggerQueryParam` / `HasOpenApiQueryParam`
matcher inner classes | Removed. Hit `/api`, `/swagger`, `/openapi`, or
`/redoc` directly — they are always mounted on `BasicRestServletGroup` /
`BasicRestObjectGroup` via the api-docs mixin pack. | External docs that linked
to `/?Swagger=true` need updating to `/api` (or `/swagger`). |
+| Resource exposed only Swagger v2 at `/api/*`. No way to opt into OpenAPI 3.1
emission. | Apply one or more api-docs mixins from
`org.apache.juneau.rest.docs`: `BasicSwaggerResource` (`/api`),
`BasicSwaggerUiResource` (`/swagger`), `BasicOpenApiResource` (`/openapi`,
`/openapi.json`, `/openapi.yaml`), `BasicRedocResource` (`/redoc`). Subclasses
of `BasicRestServlet` / `BasicRestResource` get all four (composed as
`@Rest(mixins={BasicSwaggerUiResource.class, BasicRedocResource.class})`) [...]
+| `BasicRestOperations.getSwagger(RestRequest)` and `getOpenApi(RestRequest)`
interface methods | Removed. The endpoints are now mounted via the api-docs
mixin pack on `BasicRestServlet` / `BasicRestResource`. User-written
`BasicRestOperations` implementers should remove their old `getSwagger` /
`getOpenApi` overrides — the methods are no longer on the interface. | If you
need a different api-docs surface, add `@Rest(noInherit={"mixins"},
mixins=...)` on your subclass. |
+| `BasicGroupOperations.getChildrenSwagger(RestRequest)` /
`getChildrenOpenApi(RestRequest)` (the `?Swagger` / `?OpenApi` query mirrors on
group resources) and the `HasSwaggerQueryParam` / `HasOpenApiQueryParam`
matcher inner classes | Removed. Hit `/api`, `/swagger`, `/openapi`, or
`/redoc` directly — they are always mounted on `BasicRestServletGroup` /
`BasicRestResourceGroup` via the api-docs mixin pack. | External docs that
linked to `/?Swagger=true` need updating to `/api` (or `/swa [...]
| `RestRequest.getSwagger()` was the only way to ask the server for its
self-described API. | `RestRequest.getOpenApi()` provides the OpenAPI 3.1
sibling. `RestContext.getOpenApi(Locale)` and
`RestContext.getOpenApiProvider()` mirror the Swagger getters. | The OpenAPI
3.1 document is generated by transforming the Swagger 2.0 emission to OpenAPI
3.1 JSON, so every Swagger-aware annotation (`@Schema`, `@Content`,
`@StatusCode`, etc.) round-trips with no source changes. |
diff --git a/sidebars.ts b/sidebars.ts
index dafbb2ec84..5711a1b84d 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -2015,6 +2015,16 @@ const sidebars: SidebarsConfig = {
},
],
},
+ {
+ type: 'doc',
+ id:
'topics/13.17.StreamingCursors',
+ label: '13.17. Streaming
Cursors',
+ },
+ {
+ type: 'doc',
+ id:
'topics/13.18.ContentTypeNegotiation',
+ label: '13.18. Content-Type
Negotiation',
+ },
],
},
{