3

我正在尝试使用 Swagger 记录使用 ServiceStack 3.9.70 创建的休息服务...

这是解决方案的布局:

[Product.Services.Rest.dll]

AppHost.cs

//Tell Service Stack the name of your application and where to find your web services
public AppHost() : base("Product Services", typeof(Product1Service).Assembly) { }

[Product.Services.Rest.ServiceInterface.dll]
+-Services
  +-Product1Service.cs
  +-Product2Service.cs
  +-Product3Service.cs

[Product.Services.Rest.ServiceModel.dll]
+-Operations
| +-Product1.cs
| +-Product2.cs
| +-Product3.cs
|
+-Types
  +-Type1.cs
  +-Type2.cs
  +-Type3.cs

使用 swagger-ui,我设置了 discoveryUrl: "/resources"

启动 swagger html 时,只有Product{n}.cs 之一中的操作显示. 运行 /metadata 时会显示所有操作。

这与我构建解决方案的方式有关吗?

4

0 回答 0