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

x33g5p2x  于2022-01-30 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(121)

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

Tag.getExternalDocs介绍

暂无

代码示例

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

@Override
public String toString() {
  StringBuilder b = new StringBuilder();
  b.append("Tag {\n");
  b.append("\tname: ").append(getName()).append("\n");
  b.append("\tdescription: ").append(getDescription()).append("\n");
  b.append("\texternalDocs: ").append(getExternalDocs()).append("\n");
  b.append("\textensions:").append(vendorExtensions.toString());
  b.append("}");
  return b.toString();
}

代码示例来源:origin: swagger-api/swagger-parser

private List<Tag> convertTags(List<io.swagger.models.Tag> v2tags) {
  List<Tag> v3tags = new ArrayList<>();
  for (io.swagger.models.Tag v2tag : v2tags) {
    Tag v3tag = new Tag();
    v3tag.setDescription(v2tag.getDescription());
    v3tag.setName(v2tag.getName());
    if (v2tag.getExternalDocs() != null) {
      v3tag.setExternalDocs(convert(v2tag.getExternalDocs()));
    }
    Map<String, Object> extensions = convert(v2tag.getVendorExtensions());
    if (extensions != null) {
      v3tag.setExtensions(extensions);
    }
    v3tags.add(v3tag);
  }
  return v3tags;
}

代码示例来源:origin: io.swagger.parser.v3/swagger-parser-v2-converter

private List<Tag> convertTags(List<io.swagger.models.Tag> v2tags) {
  List<Tag> v3tags = new ArrayList<>();
  for (io.swagger.models.Tag v2tag : v2tags) {
    Tag v3tag = new Tag();
    v3tag.setDescription(v2tag.getDescription());
    v3tag.setName(v2tag.getName());
    if (v2tag.getExternalDocs() != null) {
      v3tag.setExternalDocs(convert(v2tag.getExternalDocs()));
    }
    Map<String, Object> extensions = convert(v2tag.getVendorExtensions());
    if (extensions != null) {
      v3tag.setExtensions(extensions);
    }
    v3tags.add(v3tag);
  }
  return v3tags;
}

代码示例来源:origin: org.openapitools.swagger.parser/swagger-parser-v2-converter

private List<Tag> convertTags(List<io.swagger.models.Tag> v2tags) {
  List<Tag> v3tags = new ArrayList<>();
  for (io.swagger.models.Tag v2tag : v2tags) {
    Tag v3tag = new Tag();
    v3tag.setDescription(v2tag.getDescription());
    v3tag.setName(v2tag.getName());
    if (v2tag.getExternalDocs() != null) {
      v3tag.setExternalDocs(convert(v2tag.getExternalDocs()));
    }
    Map<String, Object> extensions = convert(v2tag.getVendorExtensions());
    if (extensions != null) {
      v3tag.setExtensions(extensions);
    }
    v3tags.add(v3tag);
  }
  return v3tags;
}

相关文章