Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
272 stars 54 forks source link

Generated Docs do not display examples with > 5 parameters #199

Open Freymaurer opened 3 years ago

Freymaurer commented 3 years ago

I hate to be that guy, but i just noticed that the docs don't show examples with more than 5 parameters. As i did not find anything about this restriction in the docs i thought i would mention it here.

type ITestAPI = {
    //will show examples
    getTestString1               : string*string*string*string*string                   -> Async<string>
    // will not show examples
    getTestString2               : string*string*string*string*string*string            -> Async<string>
}
Zaid-Ajaj commented 3 years ago

I hate to be that guy, but i just noticed that the docs don't show examples with more than 5 parameters

Bug reports are always appreciated! I will have a look and see why it isn't working. Just to be sure, this is happening on latest Giraffe v4.13?

Freymaurer commented 3 years ago

I use paket for packet managing and my packet.lock does show Fable.Remoting.Giraffe (4.13) and Giraffe (4.1), which should be the newest non-preview version: https://www.nuget.org/packages/Giraffe/ .

Numpsy commented 3 years ago

Hi, fwiw, I tried it with the latest version using

type ITunesStore = {
        createAlbum : string*string*string*string*string*string*string -> Async<Option<Album>>
    }

and

let exampleInput = ("A", "B", "C", "D", "E", "F", "G")

    let tunesStoreDocs = 

        Remoting.documentation "Tunes" [

            tunesDocs.route <@ fun api -> api.createAlbum @> 
            |> tunesDocs.description "Creates a tune"
            |> tunesDocs.example <@ fun api -> api.createAlbum exampleInput @>

        ]

and that seems to work ok:

image