Hi

After some testing, this does the work :
.name("value").type().stringBuilder().prop("avro.java.string","String").endString()
this then ends in :
"fields":[{"name":"value","type":"string","avro.java.string":"String"}]

Great, thanks again for Avro =)
best

2016-02-18 22:45 GMT+01:00 Joseph Pachod <[email protected]>:

> Hi
>
> I use the Java SchemaBuilder and I define a code field ending up like this:
> {"name":"code","type":["null","string"],"default":null}
>
> Then I use the maven plugin to generate the pojo. However, in the
> generated schema, this field is now:
>
> {"name":"code","type":["null",{"type":"string","avro.java.string":"String"}],"default":null}
>
> Is there a way to define it directly through the SchemaBuilder?
>
> I tried adding prop but type is reserved, hence it doesn't work.
>
> Thanks in advance
>
> Best
> joseph
>



-- 
*Joseph PACHOD*
Architecte logiciel
Activité Santé
Tél: *0811 696 386*
[email protected]

[image: inconnu.jpg]

Reply via email to