FasterXML / FasterXML/jackson-dataformats-binary

Cannot find method to generate AVRO schema will nullable Map values

未关闭
#154 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
avro
主要语言
Java
星标
347
派生
156
平均合并
3 天 3 小时
30 天内合并 PR
22

描述

This class when Avro'd

```
public final class Foo {
private Map strings;

public Map getStrings() {
return strings;
}

public void setStrings( Map strings ) {
this.strings = strings;
}
```
Results in this schema:

```
{
"type" : "record",
"name" : "Foo",
"namespace" : "my.package",
"doc" : "Schema for my.package",
"fields" : [ {
"name" : "strings",
"type" : [ "null", {
"type" : "map",
"values" : "string"
} ]
}
```

Where as I want this schema:
```

{
"type" : "record",
"name" : "Foo",
"namespace" : "my.package",
"doc" : "Schema for my.package",
"fields" : [ {
"name" : "strings",
"type" : [ "null", {
"type" : "map",
"values" : [ "null", "string" ]
} ]
}
```

I can't see a way to do this currently.

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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