Skip to content

Commit 9779468

Browse files
authored
[csharp] Add .net10 support (#22562)
* added .net10 * delete samples * delete samples * build samples again * build samples again again * fix pr gate * update pr gate names * dont build solution with no project file * move samples * move samples
1 parent fb2878c commit 9779468

File tree

3,026 files changed

+432503
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,026 files changed

+432503
-168
lines changed

.github/workflows/samples-dotnet-fx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- samples/client/petstore/csharp/generichost/net4.8/**
1212
jobs:
1313
build:
14-
name: Build .Net projects
14+
name: Build .Net Framework projects
1515
runs-on: windows-latest
1616
strategy:
1717
fail-fast: false

.github/workflows/samples-dotnet-standard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
1616
jobs:
1717
build:
18-
name: Build .Net projects
18+
name: Build .Net Standard projects
1919
runs-on: windows-latest
2020
strategy:
2121
fail-fast: false
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Samples C# .Net 10 Clients
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/csharp/generichost/latest/**
7+
- samples/client/petstore/csharp/generichost/net10/**
8+
- samples/client/petstore/csharp/httpclient/net10/**
9+
- samples/client/petstore/csharp/restsharp/net10/**
10+
- samples/client/petstore/csharp/unityWebRequest/net10/**
11+
pull_request:
12+
paths:
13+
- samples/client/petstore/csharp/generichost/latest/**
14+
- samples/client/petstore/csharp/generichost/net10/**
15+
- samples/client/petstore/csharp/httpclient/net10/**
16+
- samples/client/petstore/csharp/restsharp/net10/**
17+
- samples/client/petstore/csharp/unityWebRequest/net10/**
18+
jobs:
19+
build:
20+
name: Build .Net 10 projects
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
sample:
26+
- samples/client/petstore/csharp/generichost/latest/ComposedEnum
27+
- samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf
28+
- samples/client/petstore/csharp/generichost/latest/Tags
29+
- samples/client/petstore/csharp/generichost/latest/HelloWorld
30+
- samples/client/petstore/csharp/generichost/latest/OneOfList
31+
- samples/client/petstore/csharp/generichost/net10/AllOf
32+
- samples/client/petstore/csharp/generichost/net10/AnyOf
33+
- samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare
34+
- samples/client/petstore/csharp/generichost/net10/FormModels
35+
# - samples/client/petstore/csharp/generichost/net10/ManualPetstoreTests
36+
# - samples/client/petstore/csharp/generichost/net10/ManualSourceGenerationTests
37+
- samples/client/petstore/csharp/generichost/net10/NullReferenceTypes
38+
- samples/client/petstore/csharp/generichost/net10/OneOf
39+
- samples/client/petstore/csharp/generichost/net10/Petstore
40+
- samples/client/petstore/csharp/generichost/net10/SourceGeneration
41+
- samples/client/petstore/csharp/generichost/net10/UseDateTimeForDate
42+
# restsharp
43+
- samples/client/petstore/csharp/restsharp/net10/EnumMappings
44+
# httpclient
45+
- samples/client/petstore/csharp/httpclient/net10/Petstore
46+
- samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi
47+
# unity
48+
# - samples/client/petstore/csharp/unityWebRequest/net10/Petstore
49+
steps:
50+
- uses: actions/checkout@v5
51+
- uses: actions/[email protected]
52+
with:
53+
dotnet-version: '10.x'
54+
- name: Build
55+
working-directory: ${{ matrix.sample }}
56+
run: dotnet build Org.OpenAPITools.sln
57+
- name: Test
58+
working-directory: ${{ matrix.sample }}
59+
run: dotnet test Org.OpenAPITools.sln

.github/workflows/samples-dotnet8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
- samples/client/petstore/csharp/unityWebRequest/net8/**
1616
jobs:
1717
build:
18-
name: Build .Net projects
18+
name: Build .Net 8 projects
1919
runs-on: ubuntu-latest
2020
strategy:
2121
fail-fast: false

.github/workflows/samples-dotnet9.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,24 @@ name: Samples C# .Net 9 Clients
33
on:
44
push:
55
paths:
6-
- samples/client/petstore/csharp/generichost/latest/**
76
- samples/client/petstore/csharp/generichost/net9/**
87
- samples/client/petstore/csharp/httpclient/net9/**
98
- samples/client/petstore/csharp/restsharp/net9/**
109
- samples/client/petstore/csharp/unityWebRequest/net9/**
1110
pull_request:
1211
paths:
13-
- samples/client/petstore/csharp/generichost/latest/**
1412
- samples/client/petstore/csharp/generichost/net9/**
1513
- samples/client/petstore/csharp/httpclient/net9/**
1614
- samples/client/petstore/csharp/restsharp/net9/**
1715
- samples/client/petstore/csharp/unityWebRequest/net9/**
1816
jobs:
1917
build:
20-
name: Build .Net projects
18+
name: Build .Net 9 projects
2119
runs-on: ubuntu-latest
2220
strategy:
2321
fail-fast: false
2422
matrix:
2523
sample:
26-
- samples/client/petstore/csharp/generichost/latest/ComposedEnum
27-
- samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf
28-
- samples/client/petstore/csharp/generichost/latest/Tags
29-
- samples/client/petstore/csharp/generichost/latest/HelloWorld
30-
- samples/client/petstore/csharp/generichost/latest/OneOfList
3124
- samples/client/petstore/csharp/generichost/net9/AllOf
3225
- samples/client/petstore/csharp/generichost/net9/AnyOf
3326
- samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# for csharp generichost
2+
generatorName: csharp
3+
outputDir: samples/client/petstore/csharp/generichost/net10/AllOf
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/csharp
6+
additionalProperties:
7+
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
8+
useCompareNetObjects: true
9+
disallowAdditionalPropertiesIfNotPresent: false
10+
nullableReferenceTypes: true
11+
equatable: true
12+
targetFramework: net10.0
13+
modelPropertySorting: alphabetical
14+
operationParameterSorting: alphabetical
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# for csharp generichost
2+
generatorName: csharp
3+
outputDir: samples/client/petstore/csharp/generichost/net10/AnyOf
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/csharp
6+
additionalProperties:
7+
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
8+
useCompareNetObjects: true
9+
disallowAdditionalPropertiesIfNotPresent: false
10+
nullableReferenceTypes: true
11+
equatable: true
12+
targetFramework: net10.0
13+
modelPropertySorting: alphabetical
14+
operationParameterSorting: alphabetical
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# for csharp generichost
2+
generatorName: csharp
3+
outputDir: samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/csharp
6+
additionalProperties:
7+
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
8+
useCompareNetObjects: false
9+
disallowAdditionalPropertiesIfNotPresent: false
10+
nullableReferenceTypes: true
11+
equatable: true
12+
targetFramework: net10.0
13+
modelPropertySorting: alphabetical
14+
operationParameterSorting: alphabetical
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# for csharp generichost
2+
generatorName: csharp
3+
outputDir: samples/client/petstore/csharp/generichost/net10/FormModels
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/csharp
6+
additionalProperties:
7+
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
8+
useCompareNetObjects: true
9+
disallowAdditionalPropertiesIfNotPresent: false
10+
nullableReferenceTypes: false
11+
equatable: true
12+
targetFramework: net10.0
13+
skipFormModel: false
14+
modelPropertySorting: alphabetical
15+
operationParameterSorting: alphabetical
16+
inlineSchemaOptions:
17+
RESOLVE_INLINE_ENUMS: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# for csharp generichost
2+
generatorName: csharp
3+
outputDir: samples/client/petstore/csharp/generichost/net10/SourceGeneration
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/csharp
6+
additionalProperties:
7+
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
8+
useCompareNetObjects: true
9+
disallowAdditionalPropertiesIfNotPresent: false
10+
useSourceGeneration: true
11+
equatable: true
12+
targetFramework: net10.0
13+
modelPropertySorting: alphabetical
14+
operationParameterSorting: alphabetical

0 commit comments

Comments
 (0)