yuka1984 / azure-functions-extensions-swashbuckle

MIT License
33 stars 29 forks source link

[JsonConverter(typeof(StringEnumConverter))] Does not work for RequestBodyType Params request #48

Open sagarkul opened 4 years ago

sagarkul commented 4 years ago

Trying to use request body type and to see enum string value instead of int. Seems to be not working.

 public async Task<IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "post", Route = "func1")] 
            [RequestBodyType(typeof(MyConfiguration), "Params request")]
            HttpRequest req,
            ILogger log)
        {
  public class MyConfiguration
    {
        public TargetType TargetType { get; set; }
....

  [JsonConverter(typeof(StringEnumConverter))]
    public enum TargetType
    {