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

Removes registration of default serialization and deserialization classes from the Api client constructor. #5478

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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed a bug where child path segment from single parameter path segment would be incorrectly escaped. [#5433](https://github.com/microsoft/kiota/issues/5433)
- Fixed inconsistent typing information generated for `ParsableFactory` and stream return types in python [kiota-abstractions-python#533](https://github.com/microsoft/kiota-abstractions-python/issues/333)
- Updated schema link in plugin manifest to the correct url. [#5441](https://github.com/microsoft/kiota/issues/5441)
- Removed registration of default serialization and deserialization classes in client constructor. [#5478](https://github.com/microsoft/kiota/pull/5478)

## [1.18.0] - 2024-09-05

Expand Down
1 change: 0 additions & 1 deletion src/kiota/Handlers/Client/GenerateHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
await CheckForNewVersionAsync(logger, cancellationToken).ConfigureAwait(false);
logger.AppendInternalTracing();
logger.LogTrace("configuration: {configuration}", JsonSerializer.Serialize(Configuration, KiotaConfigurationJsonContext.Default.KiotaConfiguration));

Check warning on line 31 in src/kiota/Handlers/Client/GenerateHandler.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)

Check warning on line 31 in src/kiota/Handlers/Client/GenerateHandler.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
try
{
var workspaceStorageService = new WorkspaceConfigurationStorageService(Directory.GetCurrentDirectory());
Expand All @@ -53,7 +53,6 @@
var generationConfiguration = new GenerationConfiguration();
var requests = !refresh && manifest is not null && manifest.ApiDependencies.TryGetValue(clientEntry.Key, out var value) ? value.Requests : [];
clientEntry.Value.UpdateGenerationConfigurationFromApiClientConfiguration(generationConfiguration, clientEntry.Key, requests);
DefaultSerializersAndDeserializers(generationConfiguration);
generationConfiguration.ClearCache = refresh;
generationConfiguration.CleanOutput = refresh;
generationConfiguration.Operation = ConsumerOperation.Generate;
Expand All @@ -74,10 +73,10 @@
}
return 0;
}
catch (Exception ex)

Check warning on line 76 in src/kiota/Handlers/Client/GenerateHandler.cs

View workflow job for this annotation

GitHub Actions / Build

Either log this exception and handle it, or rethrow it with some contextual information. (https://rules.sonarsource.com/csharp/RSPEC-2139)

Check warning on line 76 in src/kiota/Handlers/Client/GenerateHandler.cs

View workflow job for this annotation

GitHub Actions / Build

Either log this exception and handle it, or rethrow it with some contextual information. (https://rules.sonarsource.com/csharp/RSPEC-2139)
{
#if DEBUG
logger.LogCritical(ex, "error adding the client: {exceptionMessage}", ex.Message);

Check warning on line 79 in src/kiota/Handlers/Client/GenerateHandler.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)

Check warning on line 79 in src/kiota/Handlers/Client/GenerateHandler.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
throw; // so debug tools go straight to the source of the exception when attached
#else
logger.LogCritical("error adding the client: {exceptionMessage}", ex.Message);
Expand Down
Loading