SuccessWithJsonApiResponse.java
public class SuccessWithJsonApiResponse
A class that contains necessary nested response classes
- SealedMediaType, a sealed interface which contains all the schema/encoding info for each contentType
- records which implement SealedMediaType, the concrete media types
- SealedResponseBody, a sealed interface which contains all the contentType/schema types
- records which implement SealedResponseBody, the concrete response body types
- a class that extends ResponseDeserializer and is used to deserialize responses
Modifier and Type | Class and Description |
---|---|
sealed interface | SuccessWithJsonApiResponse.SealedMediaType media type sealed interface |
record | SuccessWithJsonApiResponse.ApplicationjsonMediaType record storing schema + encoding for a specific contentType |
sealed interface | SuccessWithJsonApiResponse.SealedResponseBody response body sealed interface |
record | SuccessWithJsonApiResponse.ApplicationjsonResponseBody implements sealed interface to store response body |
static class | SuccessWithJsonApiResponse.SuccessWithJsonApiResponse1 class that deserializes responses |
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 sealed interface SealedResponseBody
permits
ApplicationjsonResponseBody
sealed interface that stores response body
public record ApplicationjsonResponseBody
implements SealedResponseBody
A record class to store response body for contentType="application/json"
Constructor and Description |
---|
ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) Creates an instance |
Modifier and Type | Method and Description |
---|---|
ApplicationjsonSchema.ApiResponseSchema1Boxed | body() returns the body passed in in the constructor |
public static class SuccessWithJsonApiResponse1
extends ResponseDeserializer<SealedResponseBody, SuccessWithJsonApiResponseHeadersSchema.SuccessWithJsonApiResponseHeadersSchemaMap, SealedMediaType>
a class that deserializes responses
Constructor and Description |
---|
SuccessWithJsonApiResponse1() Creates an instance |
Modifier and Type | Field and Description |
---|---|
Map<String, SealedMediaType> | content = Map.ofEntries( new AbstractMap.SimpleEntry<>("application/json", new ApplicationjsonMediaType()) ) the contentType to schema info |
Modifier and Type | Method and Description |
---|---|
ApiResponse<SealedResponseBody, SuccessWithJsonApiResponseHeadersSchema.SuccessWithJsonApiResponseHeadersSchemaMap> | deserialize(HttpResponse<byte[]> response, SchemaConfiguration configuration) called by endpoint when deserialize responses |
[Back to top] [Back to Component Responses] [Back to README]