Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[csharp] Rename v5.0 to netstandard1.3 #6460

Merged
merged 1 commit into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/csharp-petstore-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# C# Petstore API client with PropertyChanged
./bin/csharp-property-changed-petstore.sh

# C# Petstore API client (v5.0 for .net standarnd 1.3+)
# C# Petstore API client (.net standarnd 1.3+)
./bin/csharp-petstore-net-standard.sh

# C# Petstore API client (.NET 4.0)
Expand Down
2 changes: 1 addition & 1 deletion bin/csharp-petstore-net-standard.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"targetFramework": "v5.0"
"targetFramework": "netstandard1.3"
}
2 changes: 1 addition & 1 deletion bin/windows/csharp-petstore-all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ call .\bin\windows\csharp-petstore.bat
REM C# Petstore API client with PropertyChanged
call .\bin\windows\csharp-property-changed-petstore.bat

REM C# Petstore API client (v5.0 for .net standarnd 1.3+)
REM C# Petstore API client (.net standarnd 1.3+)
call .\bin\windows\csharp-petstore-netstandard.bat

call .\bin\windows\csharp-dotnet2-petstore.bat
Expand Down
2 changes: 1 addition & 1 deletion bin/windows/csharp-petstore-netcore-project.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\OpenApiClientNetCoreProject --additional-properties targetFramework=v5.0,packageGuid={67035b31-f8e5-41a4-9673-954035084f7d},netCoreProjectFile=true
set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\OpenApiClientNetCoreProject --additional-properties targetFramework=netstandard1.3,packageGuid={67035b31-f8e5-41a4-9673-954035084f7d},netCoreProjectFile=true

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/csharp-petstore-netstandard.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\OpenApiClientNetStandard --additional-properties targetFramework=v5.0,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55}
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\OpenApiClientNetStandard --additional-properties targetFramework=netstandard1.3,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55}

java %JAVA_OPTS% -jar %executable% %ags%
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
private static final String NET45 = "v4.5";
private static final String NET40 = "v4.0";
private static final String NET35 = "v3.5";
// TODO: v5.0 is PCL, not netstandard version 1.3, and not a specific .NET Framework. This needs to be updated,
// especially because it will conflict with .NET Framework 5.0 when released, and PCL 5 refers to Framework 4.0.
// We should support either NETSTANDARD, PCL, or Both… but the concepts shouldn't be mixed.
private static final String NETSTANDARD = "v5.0";
private static final String NETSTANDARD = "netstandard1.3";
private static final String UWP = "uwp";

// Defines the sdk option for targeted frameworks, which differs from targetFramework and targetFrameworkNuget
Expand Down Expand Up @@ -312,14 +309,12 @@ public void processOpts() {
setSupportsAsync(Boolean.FALSE);
} else if (NETSTANDARD.equals(this.targetFramework)) {
LOGGER.warn(".NET Standard 1.3 support has been DEPRECATED in this generator. Please use `csharp-netcore` generator instead.");
// TODO: NETSTANDARD here is misrepresenting a PCL v5.0 which supports .NET Framework 4.6+, .NET Core 1.0, and Windows Universal 10.0
additionalProperties.put(MCS_NET_VERSION_KEY, "4.6-api");
if (additionalProperties.containsKey("supportsUWP")) {
LOGGER.warn(".NET " + NETSTANDARD + " generator does not support UWP.");
additionalProperties.remove("supportsUWP");
}

// TODO: NETSTANDARD=v5.0 and targetFrameworkNuget=netstandard1.3. These need to sync.
setTargetFrameworkNuget("netstandard1.3");
setSupportsAsync(Boolean.TRUE);
setSupportsUWP(Boolean.FALSE);
Expand Down