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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -