使用 swiftref 添加 Servicestack 引用

Add Servicestack Reference with swiftref

我需要使用 swiftref 生成 dto,但我的 API 没有路径 /types/swift想在我的 AppHost 中 http://techstacks.io/types/swift. I added the swift server configuration http://docs.servicestack.net/swift-add-servicestack-reference#swift-server-configuration,但路径不工作,知道吗?

每个 ServiceStack AppHost 都支持公开可从 {baseUrl}/types/swift 获得的 Add ServiceStack Reference routes by default。您不需要添加任何 Swift 服务器配置,因为它默认启用。

确保您使用的是正确的 baseUrl,这也是启用 /metadata page is located. If you're using the right baseUrl check your ?debug=requestinfo for any Startup Errors, you will need to have DebugMode=true 的地方。