Skip to content

Docs UI is broken with Fable.Remoting.Giraffe v5.24.0 #382

@Zaid-Ajaj

Description

@Zaid-Ajaj

Using the Docs UI in Fable.Remoting.Giraffe v5.24.0, the embedded docs application doesn't work.

Repro:

open Fable.Remoting.Giraffe
open Fable.Remoting.Server
open Saturn

type ToolApi = {
    hello: unit -> Async<string>
}

let toolApi: ToolApi = {
    hello = fun () -> async { return "Hello from the tool API" }
}

let docs = Remoting.documentation "Tool API" [ ]

let toolApiHandler = 
    Remoting.createApi()
    |> Remoting.fromValue toolApi
    |> Remoting.withDocs "/api/docs" docs
    |> Remoting.buildHttpHandler

let app = application {
    use_router toolApiHandler
}

run app
Image

The initial loading of schema and UI rendering works but calling the functions fails

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions