-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix/response ❤️ #2383
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
Fix/response ❤️ #2383
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM 👍 I wonder if we should be returning concrete types (ReadOnlyDictionary, ReadOnlyCollection) rather than interfaces though.
|
Can you explain why you wonder that @gmarz? Interested to hear your thoughts on this. |
|
@Mpdreamz Robustness principle http://stackoverflow.com/questions/17170/when-to-use-ilist-and-when-to-use-list
Previously the richest types would be |
|
Not sure how I feel about returning the concrete types since they expose a lot of operations we dont want to expose e.g Need to sleep on this :) |
39bdf77 to
d3e4345
Compare
d3e4345 to
41125a1
Compare
|
Will have a look at this today @Mpdreamz |
|
7 failing integration tests:
related to the param for shield run as #2394
related to allow_no_indices #2397
not sure why this one is failing right now. |
|
LGTM - would be good to have some Coding Standards unit tests to ensure that this is the case across all |
As per #2299 be more consistent responses with returning empty collections vs null on responses. Now that we dropped .NET 4.0 we can make the response IEnumerable and Dictionaries IReadOnly* Made sure all the interfaces only define getters and not setters
…terfaces and not rely on implicit conversion. Fix sorts on covariant hits having trouble going from JArray to ReadOnlyCollection<object>
41125a1 to
d4d2af8
Compare
|
The IndicesShardResponse was an easy fix, the property now needed an explicit [JsonProperty], squashing and merging this one in. |
* Give all the responses some ❤️ As per #2299 be more consistent responses with returning empty collections vs null on responses. Now that we dropped .NET 4.0 we can make the response IEnumerable and Dictionaries IReadOnly* Made sure all the interfaces only define getters and not setters * another pass at all response objects * Make sure EmptyReadOnly returns actual ReadOnly* instances for the interfaces and not rely on implicit conversion. Fix sorts on covariant hits having trouble going from JArray to ReadOnlyCollection<object> * fix shard store response because Stores now needs an explicit JsonProperty Conflicts: src/Tests/tests.yaml
* Give all the responses some ❤️ As per elastic#2299 be more consistent responses with returning empty collections vs null on responses. Now that we dropped .NET 4.0 we can make the response IEnumerable and Dictionaries IReadOnly* Made sure all the interfaces only define getters and not setters * another pass at all response objects * Make sure EmptyReadOnly returns actual ReadOnly* instances for the interfaces and not rely on implicit conversion. Fix sorts on covariant hits having trouble going from JArray to ReadOnlyCollection<object> * fix shard store response because Stores now needs an explicit JsonProperty
Give all the responses some ❤️
As per #2299 be more consistent responses with returning empty collections vs null on responses. We did this sporadically but not consistently.
Now that we dropped .NET 4.0 we can make the response IEnumerable and Dictionaries IReadOnly*
Made sure all the interfaces only define getters and not setters