Reputation: 1142
The documentation for ServiceStack's SwaggerUI implementation states
Default configuration expects that ServiceStack services are available under '/api' path.
but I have my api at the root. Is there a way to change where the SwaggerUI's looks?
Upvotes: 2
Views: 1446
Reputation: 1142
I found /swagger-ui/index.html includes the JavaScript code containing the api location.
window.swaggerUi = new SwaggerUi({
discoveryUrl:'../api/resources',
apiKey:"",
dom_id:"swagger-ui-container",
supportHeaderParams: false,
supportedSubmitMethods: ['get', 'post', 'put']
});
Change the discoveryUrl to be:
discoveryUrl:'../resources'
The Swagger-UI should then correctly auto-discover the available resources.
Upvotes: 3