本文整理了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
[英]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));
内容来源于网络,如有侵权,请联系作者删除!