Stefan Tsalapatis - 490 - Feb 6, 2014

Metadata Page is very helpful for  JavaScript and mobile clients  (the   great majority).  I hear from them, the best words. Bu I have  few issues.
1. It displays all services when I want to display only the services which have enabled routes.  I use  the  Fluid API for   routing  and it is extremely important for us  to have configurable routes.  I would like also to declare from the  route attribute, with a special field,  if  a service will be displayed or not , in the metadata page.
2.   I would like to add Summary and Notes to our Routes,  but  the generic Routes.Add<T>,   of the Fluid Api,  does not expose  the Summary and Notes fields.
3. I tried to use the Swagger.API, adding the   Plugins.Add(new SwaggerFeature()), but without success.  I cannot understand why. We work with self-hosted services. Does it work only with web sites ? In metadata page  (localhost:port), the link  “Swagger UI” is displayed but it cannot find the handler for request.
In any case I appreciate a lot the Metadata page, instead of Swagger, but the issues in 1 and 2,  create me problems any way.
thanks

You can hide your services by restricting them, see: https://github.com/ServiceStack/ServiceStack/wiki/Restricting-Services

Note: they will appear visible, but greyed out in DebugMode, but will be hidden in release mode.

2.) You can use some of the same generic attributes as Swagger uses: https://github.com/ServiceStack/ServiceStack/wiki/Swagger-API#wiki-swagger-attributes

3) Swagger should work, use the link to Swagger UI on the metadata page (available in recent releases). If not file an issue, pasting screenshots + HTTP Headers causing the issue.

Stefan Tsalapatis:

I just solved the Swagger issue (3), copying the swagger-ui folder to the bin and changing the  discoveryUrl in index.html.

Stefan Tsalapatis:

Issue 2.  I don’t want to use static  routes attributes in services, as I work with Fluent API configurable routes.  Is it possible the generic  Route.Add<t> to accept also the Summary and Notes as parameters ?
Issue 1: Can I  hide  service metadata (Visibility), without to restrict access ?
In any case is there a Fluid API for these also ?  If they are not configurable,  I cannot use these attributes. thx

Actually yeah, whenever you’re self-hosting you need to set the build Action on all file assets you need to serve to “Copy if newer” so they’re copied over to the /bin directory where the Console SelfHost app can find them.