2
的文档ServiceStack's SwaggerUI implementation状态ServiceStack SwaggerUI路径位置
默认配置预计ServiceStack服务正处于 '/ API' 可用路径。
但我有我的api在根。有没有办法改变SwaggerUI的外观?
的文档ServiceStack's SwaggerUI implementation状态ServiceStack SwaggerUI路径位置
默认配置预计ServiceStack服务正处于 '/ API' 可用路径。
但我有我的api在根。有没有办法改变SwaggerUI的外观?
我发现/swagger-ui/index.html包含了包含api位置的JavaScript代码。
window.swaggerUi = new SwaggerUi({
discoveryUrl:'../api/resources',
apiKey:"",
dom_id:"swagger-ui-container",
supportHeaderParams: false,
supportedSubmitMethods: ['get', 'post', 'put']
});
更改discoveryUrl是:
discoveryUrl:'../resources'
招摇的UI应然后正确自动发现可用的资源。