英文:
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",
}
专注分享java语言的经验与见解,让所有开发者获益!
评论