io.swagger.v3.oas.models.OpenAPI.getTags()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(124)

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

OpenAPI.getTags介绍

[英]returns the tags property from a OpenAPI instance.
[中]从OpenAPI实例返回tags属性。

代码示例

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

private Set getTagNames(OpenAPI openAPI) {
  Set<String> result = new HashSet<>();
  if (openAPI.getTags() != null) {
    for (Tag item : openAPI.getTags()) {
      result.add(item.getName());
    }
  }
  return result;
}

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

if (openAPI.getTags() != null) {
  for (Tag tag : openAPI.getTags()) {
    if (tagsSet.stream().noneMatch(t -> t.getName().equals(tag.getName()))) {
      tagsSet.add(tag);

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

clone.setSecurity(openAPI.getSecurity());
clone.setServers(openAPI.getServers());
clone.tags(filteredOpenAPI.getTags() == null ? null : new ArrayList<>(openAPI.getTags()));
final List<Tag> tags = clone.getTags();
if (tags != null && !filteredTags.isEmpty()) {
  for (Iterator<Tag> it = tags.iterator(); it.hasNext(); ) {
  if (clone.getTags().isEmpty()) {
    clone.setTags(null);

代码示例来源:origin: com.atlassian.swagger/atlassian-swagger-doclet

public List<Tag> tags() {
  if (openAPI().getTags() == null) {
    openAPI().setTags(new ArrayList<>());
  }
  return openAPI().getTags();
}

代码示例来源:origin: org.openapitools/openapi-generator

gen.writeObjectField("security", value.getSecurity());
if(value.getTags() != null) {
  gen.writeObjectField("tags", value.getTags());

代码示例来源:origin: org.openapitools/openapi-generator

return;
if (openAPI.getTags() != null) {
  List<ResourcePath> resourcePaths = new ArrayList<>();
  for (Tag tag : openAPI.getTags()) {
    ResourcePath resourcePath = new ResourcePath();
    resourcePath.setPath(tag.getName());

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

if (replaceTags && oas.getTags() != null) {
  oas.setTags(tags);

代码示例来源:origin: org.apache.cxf/cxf-rt-rs-service-description-openapi-v3

if (replaceTags && oas.getTags() != null) {
  oas.setTags(tags);

代码示例来源:origin: org.tomitribe/swagger2markup

pathOperations.forEach(operation -> buildOperation(markupDocBuilder, operation, config));
} else if (config.getPathsGroupedBy() == GroupBy.TAGS) {
  Validate.notEmpty(context.getSwagger().getTags(), "Tags must not be empty, when operations are grouped by tags");
  Map<String, Tag> tagsMap = TagUtils.toSortedMap(context.getSwagger().getTags(), config.getTagOrdering());

代码示例来源:origin: org.openapitools/openapi-generator

List<Tag> swaggerTags = openAPI.getTags();
if (tagNames != null) {
  if (swaggerTags == null) {

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

if (!Objects.equals(configuration.getOpenAPI().getTags(), oas.getTags())) {
  configuration.getOpenAPI().setTags(oas.getTags());

代码示例来源:origin: org.apache.cxf/cxf-rt-rs-service-description-openapi-v3

if (!Objects.equals(configuration.getOpenAPI().getTags(), oas.getTags())) {
  configuration.getOpenAPI().setTags(oas.getTags());

代码示例来源:origin: org.ballerinalang/swagger-to-ballerina-generator

/**
 * Build a {@link BallerinaOpenApi} object from a {@link OpenAPI} object.
 * All non iterable objects using handlebars library is converted into
 * supported iterable object types.
 *
 * @param openAPI {@link OpenAPI} type object to be converted
 * @return Converted {@link BallerinaOpenApi} object
 * @throws BallerinaOpenApiException when OpenAPI to BallerinaOpenApi parsing failed
 */
@Override
public BallerinaOpenApi buildContext(OpenAPI openAPI) throws BallerinaOpenApiException {
  this.openapi = openAPI.getOpenapi();
  this.info = openAPI.getInfo();
  this.externalDocs = openAPI.getExternalDocs();
  this.tags = openAPI.getTags();
  this.components = openAPI.getComponents();
  this.extensions = openAPI.getExtensions();
  setPaths(openAPI);
  setSecurityRequirements(openAPI);
  setServers(openAPI);
  setSchemas(openAPI);
  return this;
}

代码示例来源:origin: io.swagger.core.v3/swagger-jaxrs2

if (openAPI.getTags() != null) {
  for (Tag tag : openAPI.getTags()) {
    if (tagsSet.stream().noneMatch(t -> t.getName().equals(tag.getName()))) {
      tagsSet.add(tag);

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

if (openAPI.getTags() != null)
  for (Tag tag : openAPI.getTags())

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

clone.setSecurity(openAPI.getSecurity());
clone.setServers(openAPI.getServers());
clone.tags(filteredOpenAPI.getTags() == null ? null : new ArrayList<>(openAPI.getTags()));
final List<Tag> tags = clone.getTags();
if (tags != null && !filteredTags.isEmpty()) {
  for (Iterator<Tag> it = tags.iterator(); it.hasNext(); ) {
  if (clone.getTags().isEmpty()) {
    clone.setTags(null);

代码示例来源:origin: org.tomitribe/swagger2markup

buildTagsSection(markupDocBuilder, swagger.getTags());

相关文章