Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public override object ReadJson(JsonReader reader, System.Type objectType, objec
JObject jo = JObject.Load(reader);
string referencePath = null;
// Unwrap if it's a reference object
if (jo.First.Path == "$ref")
if ((jo.First != null) && (jo.First.Path == "$ref"))
{
referencePath = jo.GetValue("$ref", StringComparison.Ordinal).ToString();
// Shorthand notation
Expand All @@ -42,4 +42,4 @@ public override object ReadJson(JsonReader reader, System.Type objectType, objec
return swaggerResponse;
}
}
}
}