FasterXML / FasterXML/java-classmate

How to build AnnotationOverrides from ObjectMapper

Ouverte
#81 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
266
Forks
47
Merge moyen
1 h 42 min
PR mergées (30 j)
1

Description

Hi Tatu,

In the context of my JSON Schema Generator library, I've been asked to support the mix-ins registered on a given Jackson `ObjectMapper`, when resolving members via classmate.
I saw the usage of the `AnnotationOverrides` type in classmate expecting this method to be implemented:
```java
List> mixInsFor(ClassKey);
```
Unfortunately, the `ClassKey` is a utility type, which doesn't offer a getter for the wrapped `Class`, which complicates things.

Likewise on the Jackson `ObjectMapper`, there is no way to retrieve a full set of registered mix-ins as a simple `Map`. Just this method:
```java
Class findMixInClassFor(Class)
```

Any suggestions on how to implement the `AnnotationOverrides` based on a fully configured `ObjectMapper` without requiring the same mix-ins to be provided all over again?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.