You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Verify: v3.0.0 on .NET 6.0 in VS 2022 (17.3.6)
While using Verify to verify JSON output from OpenAPI specification generation, I realized that $ref properties in the document were replaced with null by Verify.
I tracked this down to how the JToken is converted to a dictionary and how the serializer treats 'metadata properties'. I could reproduce the behavior in Argon and also show how you could control this behavior by passing in a serializer with MetadataPropertyHandling set to Ignore.
I tried to apply this to the serializer settings using .AddExtraSettings(s => s.MetadataPropertyHandling = Argon.MetadataPropertyHandling.Ignore), but since those settings are not passed into the ToObject method in the JObjectConverter they do not apply. I believe the same is true for JArrayConverter.
I had some issues getting the solution running properly in it's default configuration, so apologies for lack of PR. I can make a further attempt if you would prefer this.
Using Verify: v3.0.0 on .NET 6.0 in VS 2022 (17.3.6)
While using Verify to verify JSON output from OpenAPI specification generation, I realized that
$ref
properties in the document were replaced withnull
by Verify.Simplified, this JSON:
Became serialized by Verify as:
I tracked this down to how the JToken is converted to a dictionary and how the serializer treats 'metadata properties'. I could reproduce the behavior in Argon and also show how you could control this behavior by passing in a serializer with
MetadataPropertyHandling
set toIgnore
.I tried to apply this to the serializer settings using
.AddExtraSettings(s => s.MetadataPropertyHandling = Argon.MetadataPropertyHandling.Ignore)
, but since those settings are not passed into theToObject
method in the JObjectConverter they do not apply. I believe the same is true for JArrayConverter.I had some issues getting the solution running properly in it's default configuration, so apologies for lack of PR. I can make a further attempt if you would prefer this.
Using xUnit:
The text was updated successfully, but these errors were encountered: