本文整理了Java中io.swagger.models.Path.setPatch()
方法的一些代码示例,展示了Path.setPatch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.setPatch()
方法的具体详情如下:
包路径:io.swagger.models.Path
类名称:Path
方法名:setPatch
暂无
代码示例来源:origin: com.vmware.xenon/xenon-swagger
private Path path2Instance(ServiceDocument doc) {
Path path = new Path();
path.setParameters(Collections.singletonList(paramId()));
path.setGet(opDefault(doc));
if (doc.documentDescription != null
&& doc.documentDescription.serviceRequestRoutes != null
&& !doc.documentDescription.serviceRequestRoutes.isEmpty()) {
Path pathByRoutes = pathByRoutes(doc.documentDescription.serviceRequestRoutes.values());
path.setPost(pathByRoutes.getPost());
path.setPut(pathByRoutes.getPut());
path.setPatch(pathByRoutes.getPatch());
} else {
io.swagger.models.Operation op = new io.swagger.models.Operation();
op.addTag(this.currentTag.getName());
op.setParameters(Collections.singletonList(paramBody(ServiceDocument.class)));
op.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(doc),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()
));
// service definition should be introspected to better
// describe which actions are supported
path.setPost(op);
path.setPut(op);
path.setPatch(op);
}
return path;
}
代码示例来源:origin: com.vmware.xenon/xenon-swagger
private Path path2UtilConfig(Parameter idParam) {
Path path = new Path();
if (idParam != null) {
path.setParameters(Collections.singletonList(paramId()));
}
io.swagger.models.Operation op = new io.swagger.models.Operation();
op.addTag(this.currentTag.getName());
op.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceConfiguration.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()
));
path.setGet(op);
op = new io.swagger.models.Operation();
op.addTag(this.currentTag.getName());
op.setParameters(
Collections.singletonList(paramBody(ServiceConfigUpdateRequest.class)));
op.setResponses(responseMap(
Operation.STATUS_CODE_OK, responseOk(template(ServiceConfiguration.class)),
Operation.STATUS_CODE_NOT_FOUND, responseGenericError()
));
path.setPatch(op);
return path;
}
代码示例来源:origin: io.swagger/swagger-parser
Operation op = operation(on, location + "(patch)", result);
if(op != null) {
path.setPatch(op);
代码示例来源:origin: com.reprezen.genflow/rapidml-swagger
break;
case "PATCH":
path.setPatch(operation);
break;
内容来源于网络,如有侵权,请联系作者删除!