public interface IJSONAdapter
Modifier and Type | Method and Description |
---|---|
Object |
adapt(Object adaptableObject,
IJSONAdapterFactory adapterFactory)
(Optionally) adapt the given object to another object that is more suitable for JSON
|
default Map<String,Object> |
getSchemaFields(Class<?> clazz,
Map<String,Object> schemasMap,
IJSONAdapterFactory adapterFactory,
Map<String,Class<?>> usedSchemaNamesMap)
Get the schema type for the openapi
|
Object adapt(Object adaptableObject, IJSONAdapterFactory adapterFactory) throws Exception
adaptableObject
- the object to adaptadapterFactory
- the factory to call in case parts of the adaptableObject require further adaptationException
default Map<String,Object> getSchemaFields(Class<?> clazz, Map<String,Object> schemasMap, IJSONAdapterFactory adapterFactory, Map<String,Class<?>> usedSchemaNamesMap) throws Exception
clazz
- the typeschemasMap
- the map of already existing schemasadapterFactory
- the factory to call in case parts of the adaptableObject require further adaptationusedSchemaNamesMap
- map of already used schema names to ensure unique namesException