Skip to content

Support for Suave on top of ASP.NET Core #19

@orient-man

Description

@orient-man

Description

Suave web applications can be used with AspNetCore but native Suave WebSockets are not available and this breaks web part delivering Swagger UI.

Workaround

Swagger UI can be served as static files:

let swaggerFileOptions =
    StaticFileOptions(
        FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"swagger")),
        RequestPath = PathString("/swagger/v3/ui"))
...
appBuilder
    .UseStaticFiles(swaggerFileOptions)
    .UseSuave(suaveApp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions