我正在尝试使用swagger-codegen构建Strava的DLL,该DLL可在ASP.NET Core 2.1服务器应用程序中使用。
尝试1-按照https://developers.strava.com/docs/#client-code
上的说明进行操作onDestroyView()
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/
我遇到很多这样的错误
Models / ActivityType.cs(36,29):错误CS0103:名称“ AlpineSki”在当前上下文中不存在[/Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger .csproj] 型号/ActivityType.cs(36,29):错误CS0103:名称“ AlpineSki”在当前上下文中不存在[/Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj]
完整gist
尝试2-改为使用大摇大摆3
bin/sh build.sh
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/
我遇到很多这样的错误:
Controllers / ActivitiesApi.cs(54,160):错误CS1001:预期的标识符[/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj] 型号/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] 控制器/ActivityApi.cs(54,160):错误CS1001:预期的标识符[/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj] 型号/BaseStream.cs(46,35):错误CS1003:语法错误,“,”预期为[/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj]
完整gist