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
[Flags]
public enum Directions
{
Up = 1,
Down = 2,
Left = 4,
Right = 8,
}
public class Request
{
Directions Directions {get; set; }
}
public void SetAvailableDirections(Request request)
{
// ...
}
To generate a swagger specification where the Directions property allows multiple values (array with collectionFormat set to csv ???) but not needing the Directions property to be an array.
JsonConvert.SerializeObject(Directions.Up | Directions.Right, new StringEnumConverter(true)) already outputs the correct value: "up, right"
What I expect/want is for this:
To generate a swagger specification where the
Directions
property allows multiple values (array
withcollectionFormat
set tocsv
???) but not needing the Directions property to be an array.JsonConvert.SerializeObject(Directions.Up | Directions.Right, new StringEnumConverter(true))
already outputs the correct value:"up, right"
I tried to generate a client from this swagger:
and it generates this:
which I don't think complies to the swagger specification because this:
yields this:
If I change the code to:
for this:
I get this:
Which is what I was expecting from that swagger.
The text was updated successfully, but these errors were encountered: