-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: split serializer contexts to avoid rooting RestTransport (a…
…nd its deps) and negatively impacting AOT size when it's not referenced
- Loading branch information
1 parent
0fd32b6
commit e460772
Showing
4 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
using System.Text.Json.Serialization; | ||
using Pinecone.Grpc; | ||
|
||
namespace Pinecone.Rest; | ||
|
||
[JsonSerializable(typeof(string[]))] | ||
[JsonSerializable(typeof(Metric))] | ||
[JsonSerializable(typeof(IndexStats))] | ||
[JsonSerializable(typeof(IndexState))] | ||
[JsonSerializable(typeof(IndexStatus))] | ||
[JsonSerializable(typeof(IndexDetails))] | ||
[JsonSerializable(typeof(Index<GrpcTransport>))] | ||
[JsonSerializable(typeof(Index<RestTransport>))] | ||
[JsonSerializable(typeof(MetadataValue[]))] | ||
[JsonSerializable(typeof(CreateIndexRequest))] | ||
[JsonSerializable(typeof(ConfigureIndexRequest))] | ||
[JsonSerializable(typeof(DescribeStatsRequest))] | ||
[JsonSerializable(typeof(CreateCollectionRequest))] | ||
[JsonSerializable(typeof(CollectionDetails))] | ||
[JsonSerializable(typeof(ListIndexesResult))] | ||
[JsonSerializable(typeof(ListCollectionsResult))] | ||
[JsonSourceGenerationOptions( | ||
GenerationMode = JsonSourceGenerationMode.Default, | ||
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, | ||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] | ||
internal sealed partial class ClientContext : JsonSerializerContext; | ||
|
||
[JsonSerializable(typeof(DescribeStatsRequest))] | ||
[JsonSerializable(typeof(IndexStats))] | ||
[JsonSerializable(typeof(QueryRequest))] | ||
[JsonSerializable(typeof(QueryResponse))] | ||
[JsonSerializable(typeof(UpsertRequest))] | ||
[JsonSerializable(typeof(UpsertResponse))] | ||
[JsonSerializable(typeof(UpdateRequest))] | ||
[JsonSerializable(typeof(FetchResponse))] | ||
[JsonSerializable(typeof(DeleteRequest))] | ||
[JsonSerializable(typeof(MetadataMap))] | ||
[JsonSerializable(typeof(MetadataValue[]))] | ||
[JsonSerializable(typeof(ListIndexesResult))] | ||
[JsonSerializable(typeof(ListCollectionsResult))] | ||
[JsonSourceGenerationOptions( | ||
GenerationMode = JsonSourceGenerationMode.Default, | ||
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, | ||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] | ||
internal sealed partial class SerializerContext : JsonSerializerContext { } | ||
internal sealed partial class RestTransportContext : JsonSerializerContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters