public class BinaryFormatResolver extends Object implements IJsonFormatTypeResolver
"binary" and "byte" formats.
Maps them to OctetEncoding and Base64Encoding respectively.
These formats are defined in OpenAPI Specification
| Constructor and Description |
|---|
BinaryFormatResolver() |
| Modifier and Type | Method and Description |
|---|---|
Object |
coerce(Object value,
Class<?> type) |
Set<String> |
getFormats()
A list of one or more format names such as
"date-time", "date", "time" to be referenced in Json Schema
"format" types. |
JsonFormatType |
resolveType(String format)
Given a JSON Schema
"format" value such as "date-time" provide an JsonFormatType
to correspond with the format. |
Object |
toBindingValue(Object value) |
public Set<String> getFormats()
IJsonFormatTypeResolver"date-time", "date", "time" to be referenced in Json Schema
"format" types.getFormats in interface IJsonFormatTypeResolverpublic JsonFormatType resolveType(String format)
IJsonFormatTypeResolver"format" value such as "date-time" provide an JsonFormatType
to correspond with the format.resolveType in interface IJsonFormatTypeResolverformat - The JSON Schema "format" value such as "date-time".JsonFormatType to correspond with the format or null if unresolved.public Object coerce(Object value, Class<?> type)
coerce in interface ICoercionProviderpublic Object toBindingValue(Object value)
toBindingValue in interface ICoercionProviderCopyright © 2020. All rights reserved.