Skip to content

Commit 7b0f963

Browse files
authored
[csharp][generichost] Delete samples (#18323)
* delete samples * rebuild samples * test to see if the pr gate fails * make the samples generate twice * pr gate successfully failed * minor cleanup * minor cleanup
1 parent c109399 commit 7b0f963

28 files changed

Lines changed: 229 additions & 604 deletions

.github/workflows/openapi-generator.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,23 @@ jobs:
140140
with:
141141
name: openapi-generator-cli.jar
142142
path: modules/openapi-generator-cli/target
143+
- name: Delete samples that are entirely generated
144+
run: |
145+
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
146+
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
147+
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
148+
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
149+
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
150+
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
151+
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
152+
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
153+
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
154+
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
143155
- name: Generate samples
144-
run: bash bin/generate-samples.sh
156+
run: |
157+
bash bin/generate-samples.sh
158+
# when a sample is deleted, you have to generate it twice for all files to get created
159+
bash bin/generate-samples.sh
145160
- name: Verify git status
146161
run: |
147162
if [[ "$(git status --porcelain)" != "" ]]; then

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ public async Task GetArrayOfEnumsAsyncTest()
121121
Assert.IsType<List<OuterEnum>>(model);
122122
}
123123

124+
/// <summary>
125+
/// Test TestAdditionalPropertiesReference
126+
/// </summary>
127+
[Fact (Skip = "not implemented")]
128+
public async Task TestAdditionalPropertiesReferenceAsyncTest()
129+
{
130+
Dictionary<string, Object> requestBody = default!;
131+
await _instance.TestAdditionalPropertiesReferenceAsync(requestBody);
132+
}
133+
124134
/// <summary>
125135
/// Test TestBodyWithFileSchema
126136
/// </summary>
@@ -257,5 +267,15 @@ public async Task TestQueryParameterCollectionFormatAsyncTest()
257267
Client.Option<string?> notRequiredNullable = default!;
258268
await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
259269
}
270+
271+
/// <summary>
272+
/// Test TestStringMapReference
273+
/// </summary>
274+
[Fact (Skip = "not implemented")]
275+
public async Task TestStringMapReferenceAsyncTest()
276+
{
277+
Dictionary<string, string> requestBody = default!;
278+
await _instance.TestStringMapReferenceAsync(requestBody);
279+
}
260280
}
261281
}

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public void ClassModelInstanceTest()
5454
}
5555

5656
/// <summary>
57-
/// Test the property 'VarClass'
57+
/// Test the property 'Class'
5858
/// </summary>
5959
[Fact]
60-
public void VarClassTest()
60+
public void ClassTest()
6161
{
62-
// TODO unit test for the property 'VarClass'
62+
// TODO unit test for the property 'Class'
6363
}
6464
}
6565
}

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public void FooGetDefaultResponseInstanceTest()
5454
}
5555

5656
/// <summary>
57-
/// Test the property 'VarString'
57+
/// Test the property 'String'
5858
/// </summary>
5959
[Fact]
60-
public void VarStringTest()
60+
public void StringTest()
6161
{
62-
// TODO unit test for the property 'VarString'
62+
// TODO unit test for the property 'String'
6363
}
6464
}
6565
}

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public void FormatTestInstanceTest()
5454
}
5555

5656
/// <summary>
57-
/// Test the property 'VarByte'
57+
/// Test the property 'Byte'
5858
/// </summary>
5959
[Fact]
60-
public void VarByteTest()
60+
public void ByteTest()
6161
{
62-
// TODO unit test for the property 'VarByte'
62+
// TODO unit test for the property 'Byte'
6363
}
6464

6565
/// <summary>
@@ -108,30 +108,30 @@ public void DateTimeTest()
108108
}
109109

110110
/// <summary>
111-
/// Test the property 'VarDecimal'
111+
/// Test the property 'Decimal'
112112
/// </summary>
113113
[Fact]
114-
public void VarDecimalTest()
114+
public void DecimalTest()
115115
{
116-
// TODO unit test for the property 'VarDecimal'
116+
// TODO unit test for the property 'Decimal'
117117
}
118118

119119
/// <summary>
120-
/// Test the property 'VarDouble'
120+
/// Test the property 'Double'
121121
/// </summary>
122122
[Fact]
123-
public void VarDoubleTest()
123+
public void DoubleTest()
124124
{
125-
// TODO unit test for the property 'VarDouble'
125+
// TODO unit test for the property 'Double'
126126
}
127127

128128
/// <summary>
129-
/// Test the property 'VarFloat'
129+
/// Test the property 'Float'
130130
/// </summary>
131131
[Fact]
132-
public void VarFloatTest()
132+
public void FloatTest()
133133
{
134-
// TODO unit test for the property 'VarFloat'
134+
// TODO unit test for the property 'Float'
135135
}
136136

137137
/// <summary>
@@ -189,12 +189,12 @@ public void PatternWithDigitsAndDelimiterTest()
189189
}
190190

191191
/// <summary>
192-
/// Test the property 'VarString'
192+
/// Test the property 'String'
193193
/// </summary>
194194
[Fact]
195-
public void VarStringTest()
195+
public void StringTest()
196196
{
197-
// TODO unit test for the property 'VarString'
197+
// TODO unit test for the property 'String'
198198
}
199199

200200
/// <summary>

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs

Lines changed: 0 additions & 56 deletions
This file was deleted.

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs

Lines changed: 0 additions & 56 deletions
This file was deleted.

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public void Model200ResponseInstanceTest()
5454
}
5555

5656
/// <summary>
57-
/// Test the property 'VarClass'
57+
/// Test the property 'Class'
5858
/// </summary>
5959
[Fact]
60-
public void VarClassTest()
60+
public void ClassTest()
6161
{
62-
// TODO unit test for the property 'VarClass'
62+
// TODO unit test for the property 'Class'
6363
}
6464

6565
/// <summary>

samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ReturnTests.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ public void ReturnInstanceTest()
5353
//Assert.IsType<Return>(instance);
5454
}
5555

56+
/// <summary>
57+
/// Test the property 'Lock'
58+
/// </summary>
59+
[Fact]
60+
public void LockTest()
61+
{
62+
// TODO unit test for the property 'Lock'
63+
}
64+
65+
/// <summary>
66+
/// Test the property 'Abstract'
67+
/// </summary>
68+
[Fact]
69+
public void AbstractTest()
70+
{
71+
// TODO unit test for the property 'Abstract'
72+
}
73+
5674
/// <summary>
5775
/// Test the property 'VarReturn'
5876
/// </summary>
@@ -61,5 +79,14 @@ public void VarReturnTest()
6179
{
6280
// TODO unit test for the property 'VarReturn'
6381
}
82+
83+
/// <summary>
84+
/// Test the property 'Unsafe'
85+
/// </summary>
86+
[Fact]
87+
public void UnsafeTest()
88+
{
89+
// TODO unit test for the property 'Unsafe'
90+
}
6491
}
6592
}

0 commit comments

Comments
 (0)