jsonschema2pojo接受单个字符串并将其转换为字符串数组变量。

huangapple 未分类评论43阅读模式
英文:

jsonschema2pojo to accept single string into an array of strings variable

问题

我正在使用jsonschema2pojo插件生成POJO。该对象有100个变量,其中仅对于类型为字符串数组的少数变量,我希望还能接受简单的字符串值。

当前针对这类属性的架构如下所示。我想将其更改为既接受字符串数组,又接受字符串值。

"location": {
   "type": "string"
}
英文:

I am generating POJO using jsonschema2pojo plugin. This object has 100 variables where for only few variables which are of type array of String, I would like to accept simple string values as well.

Current schema for one such attribute is given below. I want to change it to accept to accept both array oof strings and string value.

"location" : {
"type" : "string",
}

huangapple
  • 本文由 发表于 2020年4月5日 19:15:18
  • 转载请务必保留本文链接:https://java.coder-hub.com/61041677.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定