swagger-api / swagger-api/swagger-codegen
[csharp] Rework version selection
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
PR #4955 added support for .NET Standard 1.3 as targetFramework=v5.0. This version refers to the PCL Version. This is unintuitive for a number of reasons. First, dnx core 5.0 was a version of .NET Core which coincided with .NET Framework 4.5.1. Second, the targetFramework is meant to refer to .NET Standard 1.3, which supports more than just the latest and greatest. Lastly (for me, at least), there's no clear indication that .NET Framework won't have an actual future version of 5.0.
Swagger-codegen version
current master
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues
Suggest a Fix
I like the suggestion @Gronsak made in his PR. Referring to the .NET Standard table:
|
Might I suggest reworking how the target framework is selected by adding a level of abstraction? Instead of setting the target framework property directly a better option may be to have a property for choosing what kind of project you would like to output and a separete one for choosing the VS version targeted.
|
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
Start by reviewing PR #4955 and the current C# generator handling of targetFramework and targetFrameworkNuget. Compare the requested aliases, including netstandard1.3 and net3.5, with the generated project values. Done means project type and Visual Studio target selection are separate and the generated framework values match the requested platform.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100