Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

How to build AnnotationOverrides from ObjectMapper

未关闭
#81 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
java
领域
backend

调研方向

首先阅读 AnnotationOverrides API 和 ClassKey 类型,然后将它们与 ObjectMapper.findMixInClassFor(Class<?>) 进行比较。确定现有 API 是否能够在不重复配置的情况下公开所有已注册的 mix-ins;完成标准应是一个有文档记录且达成共识的实现路径,或一个范围明确的 API 变更。

由索引模型根据 Issue 内容生成。

描述

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:

List<Class<?>> 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:

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?

主要语言
Java
星标
266
派生
47
平均合并
1 小时 42 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FasterXML/java-classmate 的其他 Issue

查看 FasterXML/java-classmate 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。