operation在Java中什么意思,Java Operation.operationId方法代码示例
import io.swagger.models.Operation; //导入方法依赖的package包/类
protected final Connector configureConnector(final ConnectorTemplate connectorTemplate, final Connector connector,
final ConnectorSettings connectorSettings) {
final Connector.Builder builder = new Connector.Builder().createFrom(connector);
final SwaggerModelInfo info = parseSpecification(connectorSettings, false);
final Swagger swagger = info.getModel();
addGlobalParameters(builder, swagger);
final Map paths = swagger.getPaths();
final String connectorId = connector.getId().get();
final String connectorGav = connectorTemplate.getCamelConnectorGAV();
final String connectorScheme = connectorTemplate.getCamelConnectorPrefix();
final List actions = new ArrayList<>();
int idx = 0;
for (final Entry pathEntry : paths.entrySet()) {
final Path path = pathEntry.getValue();
final Map operationMap = path.getOperationMap();
for (final Entry entry : operationMap.entrySet()) {
final Operation operation = entry.getValue();
if (operation.getOperationId() == null) {
operation.operationId("operation-" + idx++);
}
final ConnectorDescriptor descriptor = createDescriptor(info.getResolvedSpecification(), operation)//
.camelConnectorGAV(connectorGav)//
.camelConnectorPrefix(connectorScheme)//
.connectorId(connectorId)//
.build();
final String summary = trimToNull(operation.getSummary());
final String specifiedDescription = trimToNull(operation.getDescription());
final String name;
final String description;
if (summary == null && specifiedDescription == null) {
name = entry.getKey() + " " + pathEntry.getKey();
description = null;
} else if (specifiedDescription == null) {
name = entry.getKey() + " " + pathEntry.getKey();
description = summary;
} else {
name = summary;
description = specifiedDescription;
}
final ConnectorAction action = new ConnectorAction.Builder()//
.id(createActionId(connectorId, connectorGav, operation))//
.name(name)//
.description(description)//
.pattern(Action.Pattern.To)//
.descriptor(descriptor).tags(ofNullable(operation.getTags()).orElse(Collections.emptyList()))//
.build();
actions.add(action);
}
}
actions.sort(ActionComparator.INSTANCE);
builder.addAllActions(actions);
builder.putConfiguredProperty("specification", SwaggerHelper.serialize(swagger));
return builder.build();
}
operation在Java中什么意思,Java Operation.operationId方法代码示例相关推荐
- java中isolate时间_Java HikariDataSource.setIdleTimeout方法代码示例
import com.zaxxer.hikari.HikariDataSource; //导入方法依赖的package包/类 private HikariDataSource createHikari ...
- java中setattr功能_Java Controller.setAttr方法代码示例
import com.jfinal.core.Controller; //导入方法依赖的package包/类 /** * 为了规范代码,这里做了一点类是Spring的ResponseEntity的东西 ...
- java.util.zip 用法,Java压缩文件工具类ZipUtil使用方法代码示例
本文实例通过Java的Zip输入输出流实现压缩和解压文件,前一部分代码实现获取文件路径,压缩文件名的更改等,具体如下: package com.utility.zip; import java.io. ...
- python中geometry用法_Python geometry.Point方法代码示例
本文整理汇总了Python中shapely.geometry.Point方法的典型用法代码示例.如果您正苦于以下问题:Python geometry.Point方法的具体用法?Python geome ...
- python中tree 100 6_Python spatial.KDTree方法代码示例
本文整理汇总了Python中scipy.spatial.KDTree方法的典型用法代码示例.如果您正苦于以下问题:Python spatial.KDTree方法的具体用法?Python spatial ...
- python中config命令_Python config.config方法代码示例
本文整理汇总了Python中config.config方法的典型用法代码示例.如果您正苦于以下问题:Python config.config方法的具体用法?Python config.config怎么 ...
- python中fact用法_Python covariance.EllipticEnvelope方法代码示例
本文整理汇总了Python中sklearn.covariance.EllipticEnvelope方法的典型用法代码示例.如果您正苦于以下问题:Python covariance.EllipticEn ...
- java中intvalue_Java Number intValue()方法与示例
java中intvalue Number类intValue()方法 (Number Class intValue() method) intValue() method is available in ...
- java中to date_Java Date toInstant()用法及代码示例
Java中Date类的toInstant()方法用于将Date对象转换为Instant对象.在转换过程中会创建一个Instant,用于表示时间轴上与此日期相同的点. 用法: public Instan ...
最新文章
- 动态改变标题_插入控件-gt;引用变量-gt;实现动态图表纵横筛选
- 计算机的医学应用,计算机在医学中的应用
- Crazy C Pointer
- 日本光伏相关企业倒闭数量上升 帝国征信调查
- GDCM:gdcm::FileChangeTransferSyntax的测试程序
- 简易 IM 双向通信电脑端 GUI 应用——基于 Netty、JavaFX、多线程技术等
- 玩游戏学微积分!探索理工锻炼的游戏化应用, 腾讯发布新游戏《微积历险记》...
- 织梦dede模板|白绿色户外拓展教育培训网站织梦dede模板源码[带手机版数据同步]
- R语言中经纬度度分秒转小数
- You are creating too many HashedWheelTimer instances.
- Android工具栏的使用
- 局域网稳定性测试软件,局域网速度测试
- 以为精通Java 线程池,看到这些误区,还是年轻了
- Linux 系统 网卡RTL8723BE 信号差不稳定的解决办法
- 通讯测试工具和博图仿真机的连接教程
- server sql 将出生日期转为年龄_SQL中将用户的出生年月转换成对应的年龄
- 无线数字DR平板探测器维修瓦里安PaxScan 4030X分析
- 基于直方图的图像增强算法(HE、CLAHE)之(二)
- 关于ADS安装失败的问题
- bigmap 绘制三维地形图_3D-MAX真实三维地形制作过程
热门文章
- Spring CGlib Superclass has no null constructors but no arguments were given
- Flutter | 超简单仿微信QQ侧滑菜单组件(改)
- 关于Antd的Affix突然不好用了,或者Window的scroll监听不好用了
- tml、html与shtml的区别
- 《Python入门》Windows 7下Python Web开发环境搭建笔记
- DDOS拒绝服务攻击种类与概念介绍
- 拉格朗日函数、拉格朗日对偶问题、KKT条件个人理解
- 软件工程课程设计小结
- spark streaming 监控方案
- 【ESP32学习笔记】#通用篇#(1)简介及资料