Skip to content

JsonSerializerContext SortOrder? missing #8566

Open
@LeonSchourek

Description

@LeonSchourek

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:

  1. make a search query with sort
  2. compile with nativeaot/trimming
  3. run

Expected behavior
not manually needing to add it to UserTypeSerializerContext

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions