【发布时间】:2022-01-03 03:15:48
【问题描述】:
我的端点有以下 ApiModel -
public class CreateConfigRequest {
@ApiModelProperty(example = "hive")
String entityType;
@ApiModelProperty(example = "imports")
String entityNamespace;
@ApiModelProperty(example = "hotel")
String entityName;
@ApiModelProperty(example = "{\"name\": \"hotel\", \"batch\": {\"type\": \"FullScan\"}}")
JobConfig content;
}
JobConfig 是另一个 pojo 类。代码如下:
@Data
public class JobConfig {
@NonNull private String name;
@NonNull private BatchSpec batch;
private ProfileConfig profile;
private ValidateConfig validate;
private ActionConfig action;
}
这基本上是POJO的结构。
应该是什么样子 -
基本上,我希望了解如何将其设置为默认 JSON 结构。
【问题讨论】:
-
你能添加
JobConfig的代码吗?谢谢! -
添加了相同的代码。
标签: java swagger jsonschema2pojo