Skip to content

Commit 639ad56

Browse files
committed
Fix cibuild
1 parent c5242d9 commit 639ad56

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

JsonApiDotNetCore.sln.DotSettings

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ JsonApiDotNetCore.ArgumentGuard.NotNull($EXPR$);</s:String>
1414
<s:Int64 x:Key="/Default/CodeEditing/NullCheckPatterns/PatternTypeNamesToPriority/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002ENullChecking_002EThrowExpressionNullCheckPattern/@EntryIndexedValue">3000</s:Int64>
1515
<s:Int64 x:Key="/Default/CodeEditing/NullCheckPatterns/PatternTypeNamesToPriority/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002ENullChecking_002ETraceAssertPattern/@EntryIndexedValue">50</s:Int64>
1616
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/PropagateAnnotations/@EntryValue">False</s:Boolean>
17+
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=GeneratedCode_002F_002A_002A/@EntryIndexedValue">True</s:Boolean>
1718
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=swagger_002Ejson/@EntryIndexedValue">True</s:Boolean>
19+
1820
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/GeneratedFilesAndFolders/=71287D6F_002D6C3B_002D44B4_002D9FCA_002DE78FE3F02289_002Ff_003ASchemaGenerator_002Ecs/@EntryIndexedValue">71287D6F-6C3B-44B4-9FCA-E78FE3F02289/f:SchemaGenerator.cs</s:String>
21+
22+
1923
<s:String x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=swagger_002Eg_002Ejson/@EntryIndexedValue">swagger.g.json</s:String>
2024
<s:String x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=swagger_002Ejson/@EntryIndexedValue">swagger.json</s:String>
25+
<s:String x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=_002A_002A_002FGeneratedCode_002F_002A_002A/@EntryIndexedValue">**/GeneratedCode/**</s:String>
26+
2127
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
2228
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IdentifierHighlightingEnabled/@EntryValue">True</s:Boolean>
2329
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IncludeWarningsInSwea/@EntryValue">True</s:Boolean>

src/Examples/OpenApiKiotaClientExample/OpenApiKiotaClientExample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
- https://gist.github.com/KirillOsenkov/f20cb84d37a89b01db63f8aafe03f19b
3030
-->
3131
<Exec
32-
Command="dotnet kiota generate --language CSharp --class-name ExampleApiClient --namespace-name OpenApiKiotaClientExample.GeneratedCode --output ./GeneratedCode --backing-store --exclude-backward-compatible --clean-output --clear-cache --log-level Error --openapi ..\JsonApiDotNetCoreExample\GeneratedSwagger\JsonApiDotNetCoreExample.json" />
32+
Command="dotnet kiota generate --language CSharp --class-name ExampleApiClient --namespace-name OpenApiKiotaClientExample.GeneratedCode --output ./GeneratedCode --backing-store --exclude-backward-compatible --clean-output --clear-cache --log-level Error --openapi ../JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json" />
3333

3434
<ItemGroup>
3535
<!-- This isn't entirely reliable: may require a second build after the source swagger.json has changed, to get rid of compile errors. -->

src/Examples/OpenApiKiotaClientExample/PeopleMessageFormatter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using System.Text;
2+
using JetBrains.Annotations;
23
using OpenApiKiotaClientExample.GeneratedCode.Models;
34

45
namespace OpenApiKiotaClientExample;
56

67
/// <summary>
78
/// Prints the specified people, their assigned todo-items, and its tags.
89
/// </summary>
10+
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
911
internal sealed class PeopleMessageFormatter
1012
{
1113
public static void PrintPeople(PersonCollectionResponseDocument? peopleResponse)

src/Examples/OpenApiNSwagClientExample/PeopleMessageFormatter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using System.Net;
22
using System.Text;
3+
using JetBrains.Annotations;
34
using JsonApiDotNetCore.OpenApi.Client.NSwag;
45

56
namespace OpenApiNSwagClientExample;
67

78
/// <summary>
89
/// Prints the specified people, their assigned todo-items, and its tags.
910
/// </summary>
11+
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
1012
internal sealed class PeopleMessageFormatter
1113
{
1214
public static void PrintPeople(ApiResponse<PersonCollectionResponseDocument?> peopleResponse)

test/OpenApiKiotaEndToEndTests/AdditionalPropertiesTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ namespace OpenApiKiotaEndToEndTests;
66

77
public sealed class AdditionalPropertiesTests
88
{
9+
private static readonly string GeneratedCodeDirectory = $"{Path.PathSeparator}GeneratedCode{Path.PathSeparator}";
10+
911
[Fact]
1012
public async Task Additional_properties_are_only_allowed_in_meta()
1113
{
@@ -17,7 +19,7 @@ public async Task Additional_properties_are_only_allowed_in_meta()
1719
RecurseSubdirectories = true
1820
}))
1921
{
20-
if (path.Contains(@"\GeneratedCode\", StringComparison.OrdinalIgnoreCase) && !path.EndsWith("_meta.cs", StringComparison.OrdinalIgnoreCase))
22+
if (path.Contains(GeneratedCodeDirectory, StringComparison.OrdinalIgnoreCase) && !path.EndsWith("_meta.cs", StringComparison.OrdinalIgnoreCase))
2123
{
2224
string content = await File.ReadAllTextAsync(path);
2325
bool containsAdditionalData = content.Contains("public IDictionary<string, object> AdditionalData");

test/OpenApiKiotaEndToEndTests/Headers/ETagTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public async Task Returns_no_ETag_for_failed_GET_request()
101101
};
102102

103103
// Act
104-
Func<Task<CountryPrimaryResponseDocument?>> action = async () => await apiClient.Countries[Unknown.StringId.For<Country, Guid>()]
104+
Func<Task<CountryPrimaryResponseDocument?>> action = () => apiClient.Countries[Unknown.StringId.For<Country, Guid>()]
105105
.GetAsync(configuration => configuration.Options.Add(headerInspector));
106106

107107
// Assert
@@ -173,7 +173,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
173173
headerInspector.ResponseHeaders.Clear();
174174

175175
// Act
176-
Func<Task<CountryCollectionResponseDocument?>> action = async () => await apiClient.Countries.GetAsync(configuration =>
176+
Func<Task<CountryCollectionResponseDocument?>> action = () => apiClient.Countries.GetAsync(configuration =>
177177
{
178178
configuration.Headers.Add(HeaderNames.IfNoneMatch, responseETag);
179179
configuration.Options.Add(headerInspector);

test/OpenApiKiotaEndToEndTests/OpenApiKiotaEndToEndTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727

2828
<Target Name="KiotaRunTool" BeforeTargets="BeforeCompile;CoreCompile" Condition="$(DesignTimeBuild) != true And $(BuildingProject) == true">
2929
<Exec
30-
Command="dotnet kiota generate --language CSharp --class-name HeadersClient --namespace-name OpenApiNSwagEndToEndTests.Headers.GeneratedCode --output ./Headers/GeneratedCode --backing-store --exclude-backward-compatible --clean-output --clear-cache --log-level Error --openapi ..\OpenApiTests\Headers\GeneratedSwagger\swagger.g.json" />
30+
Command="dotnet kiota generate --language CSharp --class-name HeadersClient --namespace-name OpenApiNSwagEndToEndTests.Headers.GeneratedCode --output ./Headers/GeneratedCode --backing-store --exclude-backward-compatible --clean-output --clear-cache --log-level Error --openapi ../OpenApiTests/Headers/GeneratedSwagger/swagger.g.json" />
3131
<Exec
32-
Command="dotnet kiota generate --language CSharp --class-name QueryStringsClient --namespace-name OpenApiNSwagEndToEndTests.QueryStrings.GeneratedCode --output ./QueryStrings/GeneratedCode --backing-store --exclude-backward-compatible --clean-output --clear-cache --log-level Error --openapi ..\OpenApiTests\QueryStrings\GeneratedSwagger\swagger.g.json" />
32+
Command="dotnet kiota generate --language CSharp --class-name QueryStringsClient --namespace-name OpenApiNSwagEndToEndTests.QueryStrings.GeneratedCode --output ./QueryStrings/GeneratedCode --backing-store --exclude-backward-compatible --clean-output --clear-cache --log-level Error --openapi ../OpenApiTests/QueryStrings/GeneratedSwagger/swagger.g.json" />
3333

3434
<ItemGroup>
3535
<!-- This isn't entirely reliable: may require a second build after the source swagger.json has changed, to get rid of compile errors. -->

0 commit comments

Comments
 (0)