GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.servicestack.net — Metadata Pages Metadata PagesServiceStack will automatically generate a metadata page about the webservice. The metadata can be found under the URL
The Metadata page contains:
The metadata pages provide automatic generated documentation around your services, allowing consumers of your APIs to more easily introspect and provide greater visibility of your services. Annotating ServicesYou can also optionally add custom annotations and documentation on services which will automatically appear on the metadata pages. Here is an example of a fully annotated Service:
If now the detail page of the specific service is inspected, the description configured above will be displayed on both the Open API and Metadata Detail Page:
Group Services by TagServices can also be grouped by Tag by annotating them with the
Where they'll appear as a tab to additionally filter APIs in metadata pages:
Adding Links to Metadata pageDebug LinksA good place to provide better visibility of functionality in ServiceStack is with the Plugin Links and Debug Info links section to the
The Debug Links section is only available in DebugMode (recap: set by default in Debug builds or explicitly with You can add links to your own Plugins in the metadata pages with:
Metadata Page FiltersUse the
Updating HTML and Metadata Page TemplatesThe HTML templates for the metadata pages are maintained as embedded html template resources. The VFS lets you replace built-in ServiceStack templates with your own by simply copying the metadata or HtmlFormat Template files you want to customize and placing them in your Website Directory at:
Which you can customize locally that ServiceStack will pick up and use instead. How to disable the metadata page?The metadata page is a feature and can be removed by setting:
This can be extended to disable as many selected features are required, e.g. to also disable SOAP support you can combine with:
Matching Requests with their Response DTOsThere are a number of different ways to match Requests with their Response DTO's for use in metadata services: IReturn Marker InterfaceThe recommended way to associate Request with their Response DTO's is to annotate the Request DTO with an
This also has the primary benefit of enabling a terse and typed generic Client API as the Response type is captured in the Request DTO:
Without the
Response Type Naming ConventionAn alternative way to specify the Response Type is to use the built-in naming convention:
Where the Response DTO adds a
Service Response TypeYou can also specify the Response Type by specifying it on the Services method signature, e.g:
Auth Info in Metadata PagesThe Metadata pages also label protected Services. On the metadata index page it displays a yellow key next to each Service requiring Authentication:
Hovering over the key will show which also permissions or roles the Service needs. This information is also shown the metadata detail pages which will list which permissions/roles are required (if any), e.g:
DTOs in multiple languagesWhilst API Explorer will continue to receive most of our efforts for providing a built-in UI/UX around ServiceStack APIs, we've also added the ability to browse an API Contract in the viewers preferred language in the existing API /metadata pages, e.g: The difference between them is that API Explorer is an entirely client rendered SPA that only supports modern browsers, whilst the /metadata pages are server rendered and should be visible in all browsers. On This Page
|
| You are visitor 01402877 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |