Hello,
I am using FromUri to bind my request with WebAPI as follow :
In my core:
type Info=
{ Id: double
Label: string
City : string
Property1 : string
}
In my controller:
[<HttpGet>]
[<Route("infos")>]
[<SwaggerResponse(HttpStatusCode.OK, "", typeof<seq<Data.Core.DataAccess.ProjectDBML.MyTable>>)>]
[<SwaggerResponse(HttpStatusCode.NotFound)>]
[<SwaggerOperation(operationId="GetInfos")>]
member this.GetInfos([<FromUri>] p:Info) =
let results = getInfos p
let results = results.ToList()
this.Ok(results)
The json generated does not see any input params.
"/api/v1/bdr/infos":{"get":{"tags":["INFOS"],"operationId":"GetInfos","consumes":[],"produces":["application/json","text/json","text/html"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/ETL_Meteor_BDRClients"}}},"404":{"description":"NotFound"}},"deprecated":false}},
Is there a way to decorate the controller so that parameters is populated properly in the json contract ?
Thank you.