File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Microsoft.OpenApi/Extensions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ private static IOpenApiReferenceable ResolveReferenceOnHeaderElement(
5959 JsonPointer pointer )
6060 {
6161 if ( OpenApiConstants . Examples . Equals ( propertyName , StringComparison . Ordinal ) &&
62- mapKey is not null &&
62+ ! string . IsNullOrEmpty ( mapKey ) && mapKey is not null &&
6363 headerElement ? . Examples != null &&
6464 headerElement . Examples . TryGetValue ( mapKey , out var exampleElement ) &&
6565 exampleElement is IOpenApiReferenceable referenceable )
@@ -76,7 +76,7 @@ private static IOpenApiReferenceable ResolveReferenceOnParameterElement(
7676 JsonPointer pointer )
7777 {
7878 if ( OpenApiConstants . Examples . Equals ( propertyName , StringComparison . Ordinal ) &&
79- mapKey is not null &&
79+ ! string . IsNullOrEmpty ( mapKey ) && mapKey is not null &&
8080 parameterElement ? . Examples != null &&
8181 parameterElement . Examples . TryGetValue ( mapKey , out var exampleElement ) &&
8282 exampleElement is IOpenApiReferenceable referenceable )
@@ -92,7 +92,7 @@ private static IOpenApiReferenceable ResolveReferenceOnResponseElement(
9292 string ? mapKey ,
9393 JsonPointer pointer )
9494 {
95- if ( mapKey is not null )
95+ if ( ! string . IsNullOrEmpty ( mapKey ) && mapKey is not null )
9696 {
9797 if ( OpenApiConstants . Headers . Equals ( propertyName , StringComparison . Ordinal ) &&
9898 responseElement ? . Headers != null &&
You can’t perform that action at this time.
0 commit comments