Description
Elastic.Clients.Elasticsearch version:
9.0.6
Elasticsearch version:
.NET runtime version:
9.0
Operating system version:
win11
Description of the problem including expected versus actual behavior:
in the JsonSerializer context is SortOrder? missing
Unhandled exception. Elastic.Transport.UnexpectedTransportException: 'System.Text.Json.Serialization.Converters.NullableConverter`1[Elastic.Clients.Elasticsearch.SortOrder]' is missing native code or metadata. This can happen for code that is not compatible with trimming or AOT. Inspect and fix trimming and AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility The unsupported member type is located on type 'Elastic.Clients.Elasticsearch.SearchRequest'. Path: $.
Steps to reproduce:
- make a search query with sort
- compile with nativeaot/trimming
- run
Expected behavior
not manually needing to add it to UserTypeSerializerContext