Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit cc59367

Browse files
authored
[csharp] Rename netstandard to netstandard1.3 (OpenAPITools#6460)
1 parent a64f547 commit cc59367

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

bin/csharp-petstore-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# C# Petstore API client with PropertyChanged
77
./bin/csharp-property-changed-petstore.sh
88

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

1212
# C# Petstore API client (.NET 4.0)

bin/csharp-petstore-net-standard.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"targetFramework": "v5.0"
2+
"targetFramework": "netstandard1.3"
33
}

bin/windows/csharp-petstore-all.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ call .\bin\windows\csharp-petstore.bat
44
REM C# Petstore API client with PropertyChanged
55
call .\bin\windows\csharp-property-changed-petstore.bat
66

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

1010
call .\bin\windows\csharp-dotnet2-petstore.bat

bin/windows/csharp-petstore-netcore-project.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ If Not Exist %executable% (
55
)
66

77
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
8-
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
8+
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
99

1010
java %JAVA_OPTS% -jar %executable% %ags%

bin/windows/csharp-petstore-netstandard.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ If Not Exist %executable% (
55
)
66

77
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
8-
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}
8+
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}
99

1010
java %JAVA_OPTS% -jar %executable% %ags%

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
4747
private static final String NET45 = "v4.5";
4848
private static final String NET40 = "v4.0";
4949
private static final String NET35 = "v3.5";
50-
// TODO: v5.0 is PCL, not netstandard version 1.3, and not a specific .NET Framework. This needs to be updated,
51-
// especially because it will conflict with .NET Framework 5.0 when released, and PCL 5 refers to Framework 4.0.
52-
// We should support either NETSTANDARD, PCL, or Both… but the concepts shouldn't be mixed.
53-
private static final String NETSTANDARD = "v5.0";
50+
private static final String NETSTANDARD = "netstandard1.3";
5451
private static final String UWP = "uwp";
5552

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

322-
// TODO: NETSTANDARD=v5.0 and targetFrameworkNuget=netstandard1.3. These need to sync.
323318
setTargetFrameworkNuget("netstandard1.3");
324319
setSupportsAsync(Boolean.TRUE);
325320
setSupportsUWP(Boolean.FALSE);

0 commit comments

Comments
 (0)