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
[MessagePackObject]
public struct Vector2
{
public static readonly Vector2 zero = new Vector2(0, 0);
public static readonly Vector2 up = new Vector2(0, 1);
[Key(0)]
public float x { get; set; }
[Key(1)]
public float y { get; set; }
[SerializationConstructor]
public Vector2(float x, float y)
{
this.x = x;
this.y = y;
}
public static Vector2 right = new Vector2(1f, 0);
[IgnoreMember, JsonIgnore]
public Vector2 normalized => new Vector2(this.x / this.magnitude, this.y / this.magnitude); //if I comment out this member, it works
}
above is part of my Vector2 struct on server.
When I use this structure data transfer, everything works fine except swagger.
above is part of my Vector2 struct on server.
When I use this structure data transfer, everything works fine except swagger.
above is my function signature that breaks swagger.
Imo, it looks like swagger trying to serialize the 'normalized' parameter even it's taged with Ignored/JsonIgnore.
The text was updated successfully, but these errors were encountered: