% ' One Swagger UI dropdown entry per public/api/*.openapi.json (scripts/gen.cmd api writes one per table) Dim specFso, specFolder, specFile, specUrls, specName Set specFso = Server.CreateObject("Scripting.FileSystemObject") specUrls = "" If specFso.FolderExists(Server.MapPath("/api")) Then Set specFolder = specFso.GetFolder(Server.MapPath("/api")) For Each specFile In specFolder.Files If LCase(Right(specFile.Name, 13)) = ".openapi.json" Then specName = Left(specFile.Name, Len(specFile.Name) - 13) If Len(specUrls) > 0 Then specUrls = specUrls & "," End If specUrls = specUrls & "{url:""/api/" & Server.HTMLEncode(specFile.Name) & """,name:""" & Server.HTMLEncode(specName) & """}" End If Next End If %> <% If Len(specUrls) = 0 Then %>
scripts\gen.cmd api /table:<Table> /pk:Id
(it writes public/api/<table>.openapi.json), then reload this page.