swagger-api / swagger-api/swagger-codegen
Dot NET Core 2.0 client
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I have found a solution, how to generate .NET CORE 2.0 compatible client code (csharp). The RestSharp nuget should be pointed to version 6.2.1 and there should be only one line of code changed in file:
swagger-codegen/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache
Line no.: 156
From:
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType);
to:
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
Cheers,
Matej
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open swagger-codegen/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache at line 156 and review the generated client's RestSharp dependency. Verify the .NET Core 2.0 client uses RestSharp 6.2.1 and that the file-upload call includes ContentLength; done means the template contains the compatible call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100