Skip to content

Commit

Permalink
Move variable declaration closer to assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Nov 18, 2022
1 parent f73e673 commit 4428e67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public OpenApiReference ConvertToOpenApiReference(
string reference,
ReferenceType? type)
{
var openApiReference = new OpenApiReference();
if (!string.IsNullOrWhiteSpace(reference))
{
var segments = reference.Split('#');
Expand Down Expand Up @@ -110,6 +109,8 @@ public OpenApiReference ConvertToOpenApiReference(
}
// Where fragments point into a non-OpenAPI document, the id will be the complete fragment identifier
string id = segments[1];
var openApiReference = new OpenApiReference();

// $ref: externalSource.yaml#/Pet
if (id.StartsWith("/components/"))
{
Expand Down

0 comments on commit 4428e67

Please sign in to comment.