io.swagger.models.Swagger.addTag()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(182)

本文整理了Java中io.swagger.models.Swagger.addTag()方法的一些代码示例,展示了Swagger.addTag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Swagger.addTag()方法的具体详情如下:
包路径:io.swagger.models.Swagger
类名称:Swagger
方法名:addTag

Swagger.addTag介绍

暂无

代码示例

代码示例来源:origin: jooby-project/jooby

.orElseGet(() -> {
 Tag tag = new Tag().name(value);
 swagger.addTag(tag);
 return tag;
});

代码示例来源:origin: io.swagger/swagger-models

public Swagger tag(Tag tag) {
  this.addTag(tag);
  return this;
}

代码示例来源:origin: com.vmware.xenon/xenon-swagger

private void addOperation(String uri, Operation op) {
  ServiceDocumentQueryResult q = op.getBody(ServiceDocumentQueryResult.class);
  if (q.documents != null) {
    Object firstDoc = q.documents.values().iterator().next();
    addFactory(uri, Utils.fromJson(firstDoc, ServiceDocument.class));
    this.swagger.addTag(this.currentTag);
  } else if (q.documentDescription != null
      && q.documentDescription.serviceRequestRoutes != null
      && !q.documentDescription.serviceRequestRoutes.isEmpty()) {
    this.swagger
        .path(uri, pathByRoutes(q.documentDescription.serviceRequestRoutes.values()));
    this.swagger.addTag(this.currentTag);
  }
}

代码示例来源:origin: SciGraph/SciGraph

private byte[] writeDynamicResource(InputStream is) throws IOException {
 String str = CharStreams.toString(new InputStreamReader(is, Charsets.UTF_8));
 Swagger swagger = new SwaggerParser().parse(str);
 // set the resource listing tag
 Tag dynamic = new Tag();
 dynamic.setName("dynamic");
 dynamic.setDescription("Dynamic Cypher resources");
 swagger.addTag(dynamic);
 // add resources to the path
 Map<String,Path> paths = swagger.getPaths();
 paths.putAll(configuration.getCypherResources());
 Map<String,Path> sorted = new LinkedHashMap<>();
 List<String> keys = new ArrayList<>();
 keys.addAll(paths.keySet());
 Collections.sort(keys);
 for (String key : keys) {
  sorted.put(key, paths.get(key));
 }
 swagger.setPaths(sorted);
 // return updated swagger JSON
 return Json.pretty(swagger).getBytes();
}

代码示例来源:origin: FINRAOS/herd

swagger.addTag(new Tag().name(tagName));

代码示例来源:origin: Valandur/Web-API

for (String tag : tags) {
  webapiTags.add(tag);
  swagger.addTag(new io.swagger.models.Tag().name(tag).description(descr));
  swagger.addTag(new io.swagger.models.Tag().name(tag).description(descr));

代码示例来源:origin: com.gitblit.fathom/fathom-rest-swagger

operation.addTag(controller.getSimpleName());
} else {
  swagger.addTag(tag);
  operation.addTag(tag.getName());

代码示例来源:origin: gitblit/fathom

operation.addTag(controller.getSimpleName());
} else {
  swagger.addTag(tag);
  operation.addTag(tag.getName());

代码示例来源:origin: org.jooby/jooby-swagger

tag.name(tagname);
tags.put(tagname, tag);
swagger.addTag(tag);

代码示例来源:origin: com.outbrain.swinfra/ob1k-swagger

if (!ignoreEndpoint(endpoint)) {
 final Tag tag = buildTag(endpoint.getMethod().getDeclaringClass());
 swagger.addTag(tag);
 if (service instanceof ISwaggerAware) {
  ISwaggerAware swaggerAware = (ISwaggerAware) service;

代码示例来源:origin: apache/cxf

data.addTag(tag);

代码示例来源:origin: outbrain/ob1k

if (!ignoreEndpoint(endpoint)) {
 final Tag tag = buildTag(endpoint.getMethod().getDeclaringClass());
 swagger.addTag(tag);
 if (service instanceof ISwaggerAware) {
  ISwaggerAware swaggerAware = (ISwaggerAware) service;

代码示例来源:origin: org.jooby/jooby-apitool

.orElseGet(() -> {
 Tag tag = new Tag().name(value);
 swagger.addTag(tag);
 return tag;
});

代码示例来源:origin: com.reprezen.genflow/rapidml-swagger

final String description = it.getValue();
 tag.setDescription(description);
 swagger.addTag(tag);
};
groups.forEach(_function_1);
tag.setName(it.getName());
tag.setDescription(this._zenModelHelper.getDocumentation(it));
swagger.addTag(tag);
String _xifexpression_3 = null;
com.reprezen.rapidml.URI _uRI = it.getURI();

代码示例来源:origin: org.wso2.msf4j/msf4j-swagger

swagger.addTag(tag);

代码示例来源:origin: wso2/msf4j

swagger.addTag(tag);

代码示例来源:origin: Sayi/swagger-dubbo

.putAll(BaseReaderUtils.parseExtensions(tagConfig.extensions()));
swagger.addTag(tag);

代码示例来源:origin: io.swagger/swagger-jaxrs

swagger.addTag(tag);

代码示例来源:origin: noboomu/proteus

swagger.addTag(tag);

代码示例来源:origin: javagossip/dorado

swagger.addTag(tag);

相关文章