Skip to content

Conversation

@irvinesunday
Copy link
Contributor

Fixes #1632

Comment on lines +22 to +31
if (item.Value.GetId() != null)
{
location = document.BaseUri + item.Value.GetId().ToString();
}
else
{
location = version == OpenApiSpecVersion.OpenApi2_0
? document.BaseUri + "/" + OpenApiConstants.Definitions + "/" + item.Key
: baseUri + ReferenceType.Schema.GetDisplayName() + "/" + item.Key;
}

Check notice

Code scanning / CodeQL

Missed ternary opportunity

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
@irvinesunday irvinesunday merged commit efa812a into release/2.0.0 Apr 26, 2024
@irvinesunday irvinesunday deleted the is/resolve-id-refs branch April 26, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants