0

我正在尝试使用 swagger-codegen 构建可用于 ASP.NET Core 2.1 服务器应用程序的Strava DLL。

尝试 1 - 遵循https://developers.strava.com/docs/#client-code上的说明

  • brew install swagger-codegen@2 maven
  • /usr/local/opt/swagger-codegen@2/bin/swagger-codegen generate -i https://developers.strava.com/swagger/swagger.json -l aspnetcore -o /Users/sergeishevlyagin/dev/StravaASP-2/
  • bin/sh build.sh

我得到了一堆这种类型的错误

Models/ActivityType.cs(36,29):错误 CS0103:当前上下文中不存在名称“AlpineSki”[/Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj] Models/ActivityType.cs(36,29):错误 CS0103:当前上下文中不存在名称“AlpineSki”[/Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj]

完整的要点

尝试 2 - 改用 swagger 3

  • brew install swagger-codegen
  • /usr/local/opt/swagger-codegen@3/bin/swagger-codegen generate -i https://developers.strava.com/swagger/swagger.json -l aspnetcore -o /Users/sergeishevlyagin/dev/StravaASP-3/
  • bin/sh build.sh

我得到了一堆这种类型的错误:

Controllers/ActivitiesApi.cs(54,160): error CS1001: Identifier expected [/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj] Models/BaseStream.cs(46,35): 错误CS1003:语法错误,','预期 [/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj] sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger .csproj] Controllers/ActivitiesApi.cs(54,160): error CS1001: Identifier expected [/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj] Models/BaseStream.cs(46,35 ): 错误 CS1003: 语法错误,',' 预期 [/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj]

完整的要点

4

0 回答 0