UserArray.java
public class UserArray
A class that contains necessary nested request body classes
- SealedMediaType, a sealed interface which contains all the schema/encoding info for each contentType
- records which implement SealedMediaType, the concrete media types
- a class that extends RequestBodySerializer and is used to serialize input SealedRequestBody instances
- SealedRequestBody, a sealed interface which contains all the contentType/schema input types
- records which implement SealedRequestBody, the concrete request body types
Modifier and Type | Class and Description |
---|---|
sealed interface | UserArray.SealedMediaType media type sealed interface |
record | UserArray.ApplicationjsonMediaType record storing schema + encoding for a specific contentType |
static class | UserArray.UserArray1 class that serializes request bodies |
sealed interface | UserArray.SealedRequestBody request body sealed interface |
record | UserArray.ApplicationjsonRequestBody implements sealed interface to store request body input |
public sealed interface SealedMediaType
permits
ApplicationjsonMediaType
sealed interface that stores schema and encoding info
public record ApplicationjsonMediaType
implements SealedMediaType, MediaType<ApplicationjsonSchema.ApplicationjsonSchema1, Void>
class storing schema info for a specific contentType
Constructor and Description |
---|
ApplicationjsonMediaType() Creates an instance |
Modifier and Type | Method and Description |
---|---|
ApplicationjsonSchema.ApplicationjsonSchema1 | schema() the schema for this MediaType |
Void | encoding() the encoding info |
public static class UserArray1
a class that serializes SealedRequestBody request bodies
Constructor and Description |
---|
UserArray1() Creates an instance |
Modifier and Type | Field and Description |
---|---|
boolean | required = true whether the request body is required |
Map<String, SealedMediaType> | content = Map.ofEntries( new AbstractMap.SimpleEntry<>("application/json", new ApplicationjsonMediaType()) ) the contentType to schema info |
Modifier and Type | Method and Description |
---|---|
SerializedRequestBody | serialize(SealedRequestBody requestBody) called by endpoint when creating request body bytes |
public sealed interface SealedRequestBody
permits
ApplicationjsonRequestBody
sealed interface that stores request contentType + validated schema data
public record ApplicationjsonRequestBody
implements SealedRequestBody,
GenericRequestBody<ApplicationjsonSchema.ApplicationjsonSchema1Boxed>
A record class to store request body input for contentType="application/json"
Constructor and Description |
---|
ApplicationjsonRequestBody(ApplicationjsonSchema.ApplicationjsonSchema1Boxed body) Creates an instance |
Modifier and Type | Method and Description |
---|---|
String | contentType() always returns "application/json" |
ApplicationjsonSchema.ApplicationjsonSchema1Boxed | body() returns the body passed in in the constructor |
[Back to top] [Back to Component RequestBodies] [Back to README]