Skip to content

Dictionary properties which have IUrlParameters types as keys should have ResolvableReadOnlyDictionaryConverter applied #7075

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

Closed
stevejgordon opened this issue Dec 6, 2022 · 0 comments · Fixed by #7076
Labels
8.x Relates to a 8.x client version
Milestone

Comments

@stevejgordon
Copy link
Contributor

stevejgordon commented Dec 6, 2022

Any properties on generated types which are defined as a Dictionary<TKey, TValue> where TKey is an IUrlParameter require special handling to support consumer lookups. GetFieldMappingResponse.FieldMappings is an example where the key is Field. In such cases, if a consumer attempts to lookup using a Field inferred from a type, no matches will be found by default. We need to apply a specialised dictionary which sanitises the keys to a normalized form using the IElasticClientSettings.

We will need to redefine these properties as IReadOnlyDictionary and apply a specialised converter to handle deserialization.

@stevejgordon stevejgordon added this to the 8.0.2 milestone Dec 6, 2022
@stevejgordon stevejgordon added the 8.x Relates to a 8.x client version label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to a 8.x client version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant