我正试图在swagger中创建一个地图对象
definitions:
foo:
description: a sample class
required:
- param
properties:
param:
type: object
description: this param is a map<String, Object> where object is a derivative of java.lang.object
additionalproperties:
type: object
Swagger使用以下代码
生成clent存根public class foo {
private Map<String, Object> param = new HashMap<String, Object>();
getters();
setters();
}
但它也会生成一个未使用和未引用的导入语句
import io.swagger.model.Object;
我正在尝试使用以下语句
为jax-rs API生成客户端存根java -jar "../swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar" generate -i /../src/main/resources/swagger/swagger.yaml -l jaxrs -o sample
请告诉我,我是否正确地创建一个Map,其中Object是对Java.lang类的引用