io.swagger.v3.oas.models.headers.Header.getExamples()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(153)

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

Header.getExamples介绍

[英]returns the examples property from a Header instance.
[中]从标头实例返回examples属性。

代码示例

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

private void resolveHeaders(Map<String, Header> headers) {
  if (headers == null || headers.isEmpty()) {
    return;
  }
  for (Map.Entry<String, Header> header : headers.entrySet()) {
    Header value = header.getValue();
    Header resolvedValue = value.get$ref() != null ? resolveHeader(value) : value;
    Map<String, Example> examples = resolvedValue.getExamples();
    if(examples != null) {
      Map<String,Example> resolved = resolveExample(examples);
      resolvedValue.setExamples(resolved);
    }
    header.setValue(resolvedValue);
  }
}

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

private void resolveHeaders(Map<String, Header> headers) {
  if (headers == null || headers.isEmpty()) {
    return;
  }
  for (Map.Entry<String, Header> header : headers.entrySet()) {
    Header value = header.getValue();
    Header resolvedValue = value.get$ref() != null ? resolveHeader(value) : value;
    Map<String, Example> examples = resolvedValue.getExamples();
    if(examples != null) {
      Map<String,Example> resolved = resolveExample(examples);
      resolvedValue.setExamples(resolved);
    }
    header.setValue(resolvedValue);
  }
}

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

private void resolveHeaders(Map<String, Header> headers) {
  if (headers == null || headers.isEmpty()) {
    return;
  }
  for (Map.Entry<String, Header> header : headers.entrySet()) {
    Header value = header.getValue();
    Header resolvedValue = value.get$ref() != null ? resolveHeader(value) : value;
    Map<String, Example> examples = resolvedValue.getExamples();
    if(examples != null) {
      Map<String,Example> resolved = resolveExample(examples);
      resolvedValue.setExamples(resolved);
    }
    header.setValue(resolvedValue);
  }
}

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

if (header.getExamples() != null){
  if (header.getExamples() != null) {
    Map<String,Example> examples = header.getExamples();
    for (String key : examples.keySet()){
      exampleProcessor.processExample(header.getExamples().get(key));

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

if (header.getExamples() != null){
  if (header.getExamples() != null) {
    Map<String,Example> examples = header.getExamples();
    for (String key : examples.keySet()){
      exampleProcessor.processExample(header.getExamples().get(key));

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

if (header.getExamples() != null){
  if (header.getExamples() != null) {
    Map<String,Example> examples = header.getExamples();
    for (String key : examples.keySet()){
      exampleProcessor.processExample(header.getExamples().get(key));

相关文章