Interface IJSONAdapterFactory
public interface IJSONAdapterFactory
Register OSGi services under this interface to enable adaptation of a object
to a different object that is more suitable for usage in JSON
-
Method Details
-
adapt
adapt the given object to another object that is more suitable for JSON- Parameters:
adaptableObject
- the object to adapt- Returns:
- the adapted object or the original object if no suitable adapter was found
- Throws:
Exception
-
getSchemaFields
Map<String,Object> getSchemaFields(Class<?> clazz, Map<String, Object> schemasMap, Map<String, throws ExceptionClass<?>> usedSchemaNamesMap) Get the schema type for the openapi- Parameters:
clazz
- the typeschemasMap
- the map of already existing schemasusedSchemaNamesMap
- map of already used schema names to ensure unique names- Returns:
- the map of fields for the schema (typically contains "type" + "format" or "$ref" keys)
- Throws:
Exception
-