本文整理汇总了Java中io.swagger.util.BaseReaderUtils类的典型用法代码示例。如果您正苦于以下问题:Java BaseReaderUtils类的具体用法?Java BaseReaderUtils怎么用?Java BaseReaderUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseReaderUtils类属于io.swagger.util包,在下文中一共展示了BaseReaderUtils类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: convertTag
import io.swagger.util.BaseReaderUtils; //导入依赖的package包/类
private Tag convertTag(io.swagger.annotations.Tag tagAnnotation) {
Tag tag = new Tag();
tag.setName(tagAnnotation.name());
tag.setDescription(tagAnnotation.description());
tag.setExternalDocs(convertExternalDocs(tagAnnotation.externalDocs()));
tag.getVendorExtensions().putAll(BaseReaderUtils.parseExtensions(tagAnnotation.extensions()));
return tag;
}
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:9,代码来源:SwaggerDefinitionProcessor.java
示例2: process
import io.swagger.util.BaseReaderUtils; //导入依赖的package包/类
@Override
public void process(Object annotation, OperationGenerator operationGenerator) {
ApiOperation apiOperationAnnotation = (ApiOperation) annotation;
Operation operation = operationGenerator.getOperation();
operationGenerator.setHttpMethod(apiOperationAnnotation.httpMethod());
if (!StringUtils.isEmpty(apiOperationAnnotation.value())) {
operation.setSummary(apiOperationAnnotation.value());
}
if (!StringUtils.isEmpty(apiOperationAnnotation.notes())) {
operation.setDescription(apiOperationAnnotation.notes());
}
operation.setOperationId(apiOperationAnnotation.nickname());
operation.getVendorExtensions().putAll(BaseReaderUtils.parseExtensions(apiOperationAnnotation.extensions()));
convertTags(apiOperationAnnotation.tags(), operation);
convertProduces(apiOperationAnnotation.produces(), operation);
convertConsumes(apiOperationAnnotation.consumes(), operation);
convertProtocols(apiOperationAnnotation.protocols(), operation);
AnnotationUtils.addResponse(operationGenerator.getSwagger(),
operation,
apiOperationAnnotation);
// responseReference未解析
// hidden未解析
// authorizations未解析
}
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:31,代码来源:ApiOperationProcessor.java
示例3: applyExtensions
import io.swagger.util.BaseReaderUtils; //导入依赖的package包/类
@Override
public void applyExtensions(ReaderContext context, Operation operation, Method method) {
final ApiOperation apiOperation = method.getAnnotation(ApiOperation.class);
if (apiOperation != null) {
operation.getVendorExtensions()
.putAll(BaseReaderUtils.parseExtensions(apiOperation.extensions()));
}
}
开发者ID:Sayi,项目名称:swagger-dubbo,代码行数:10,代码来源:DubboReaderExtension.java
示例4: applyExtensions
import io.swagger.util.BaseReaderUtils; //导入依赖的package包/类
public void applyExtensions(ReaderContext context, Operation operation, Method method) {
final ApiOperation apiOperation = method.getAnnotation(ApiOperation.class);
if (apiOperation != null) {
operation.getVendorExtensions().putAll(BaseReaderUtils.parseExtensions(apiOperation.extensions()));
}
}
开发者ID:yangfuhai,项目名称:jboot,代码行数:7,代码来源:ControllerReaderExtension.java
注:本文中的io.swagger.util.BaseReaderUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论