Have Swagger to substitute servicestack meta -


i wondering if it's possible have swagger serve pages @ place of ss metadata page... i'm asking since ss metadata quite usefull when you've lot of services

as far i've seen can remove feature on ss configuration, disable httphandler don't know how go further

thanks

so remove metadatafeature in apphost configure method:

setconfig(new hostconfig {      enablefeatures = feature.all.remove(feature.metadata) }); 

then create simple metadata service, redirects swagger.

[route("/metadata/{cmds*}", "get")] public class redirecttoswaggerrequest : ireturnvoid  {     public string cmds { get; set; } }  [restrict(visiblelocalhostonly = true)] public class metadataservice : service {     public void get(redirecttoswaggerrequest request)     {         base.response.redirect("/swagger-ui");     } } 

note: {cmds*} in route above catch requests /metadata, /metadata/something & /metadata/somethingelse etc.

then when request goes /metadata redirect swagger instead.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -