Skip to content

Conversation

@MaggieKimani1
Copy link
Contributor

@MaggieKimani1 MaggieKimani1 commented Nov 3, 2022

Returning a null value once an exception is caught and added to the diagnostics object raises a NullReferenceException as the new schema.Reference object created during schema deserialization is assigned a null value when trying to convert the schema into an OpenApiReference object as shown in this snippet.
Meanwhile, there's an actual reference object considering a reference pointer is found in the schema. This means that the value of the '$ref' passed is either unsupported or incorrect.

Fixes #1045

@MaggieKimani1 MaggieKimani1 merged commit 24a0817 into vnext Nov 7, 2022
@MaggieKimani1 MaggieKimani1 deleted the mk/better-error-reporting branch November 7, 2022 16:25
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.

Provide better error message when $ref points to something that is not a component.

3 participants