io.swagger.v3.oas.models.parameters.Parameter.getAllowEmptyValue()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(62)

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

Parameter.getAllowEmptyValue介绍

[英]returns the allowEmptyValue property from a Parameter instance.
[中]从参数实例返回allowEmptyValue属性。

代码示例

代码示例来源:origin: quen2404/openapi-diff

@Override
 public DiffResult isCoreChanged() {
  if (!changeRequired
    && !deprecated
    && !changeAllowEmptyValue
    && !changeStyle
    && !changeExplode) {
   return DiffResult.NO_CHANGES;
  }
  if ((!changeRequired || Boolean.TRUE.equals(oldParameter.getRequired()))
    && (!changeAllowEmptyValue || Boolean.TRUE.equals(newParameter.getAllowEmptyValue()))
    && !changeStyle
    && !changeExplode) {
   return DiffResult.COMPATIBLE;
  }
  return DiffResult.INCOMPATIBLE;
 }
}

代码示例来源:origin: quen2404/openapi-diff

&& Boolean.TRUE.equals(right.getDeprecated()))
.setChangeAllowEmptyValue(
  getBooleanDiff(left.getAllowEmptyValue(), right.getAllowEmptyValue()))
.setChangeStyle(!Objects.equals(left.getStyle(), right.getStyle()))
.setChangeExplode(getBooleanDiff(left.getExplode(), right.getExplode()));

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

@Override
public BallerinaParameter buildContext(Parameter parameter, OpenAPI openAPI) throws BallerinaOpenApiException {
  this.name = parameter.getName();
  this.in = parameter.getIn();
  this.description = parameter.getDescription();
  this.required = parameter.getRequired();
  this.deprecated = parameter.getDeprecated();
  this.allowEmptyValue = parameter.getAllowEmptyValue();
  this.ref = parameter.get$ref();
  this.style = parameter.getStyle();
  this.explode = parameter.getExplode();
  this.allowReserved = parameter.getAllowReserved();
  this.examples = parameter.getExamples();
  this.example = parameter.getExample();
  this.content = parameter.getContent();
  this.extensions = parameter.getExtensions();
  this.schema = new BallerinaSchema().buildContext(parameter.getSchema(), openAPI);
  return this;
}

相关文章