Skip to content

Adding support for local metadata on properties. #2320

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

Merged
merged 4 commits into from
Oct 24, 2016
Merged

Adding support for local metadata on properties. #2320

merged 4 commits into from
Oct 24, 2016

Conversation

ejsmith
Copy link
Contributor

@ejsmith ejsmith commented Oct 15, 2016

Initial pull request for adding support for local metadata to properties. I had to change the IMappingVisitor to use the property interfaces since it was taking the concrete classes and the mapping descriptors would not work with this. That doesn't seem to break anything and seems to just make the visitor support more scenarios, but I also realize that it's a breaking change that you might not want to take on and we could easily create our own visitor.

Copy link
Contributor

@gmarz gmarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick regarding indentation. Do you have editorconfig installed? Otherwise, this LGTM. 👍

@@ -117,87 +117,87 @@ public void CountsShouldContainKeyAndCountBe(string key, int count)
}

#pragma warning disable 618
public void Visit(StringProperty mapping)
public void Visit(IStringProperty mapping)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch on these not being interfaces! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Glad you are ok with that change.

@ejsmith
Copy link
Contributor Author

ejsmith commented Oct 17, 2016

I will fix the indentation.

@ejsmith
Copy link
Contributor Author

ejsmith commented Oct 17, 2016

Ok, I just corrected all the whitespace issues.

@niemyjski
Copy link
Contributor

LGTM

@gmarz
Copy link
Contributor

gmarz commented Oct 24, 2016

@ejsmith LGTM. One last request before we pull this in -- would you mind squashing these to a single commit?

@ejsmith
Copy link
Contributor Author

ejsmith commented Oct 24, 2016

I thought GitHub added that ability to pull requests? That's why I didn't bother doing it.

@niemyjski
Copy link
Contributor

You can do that when you merge the Pr via GitHub it's a drop down option

@gmarz
Copy link
Contributor

gmarz commented Oct 24, 2016

Oh nice! That's awesome, I wasn't aware that they added this.

@niemyjski
Copy link
Contributor

You Can also change the branch you merge to :)

@gmarz gmarz merged commit 39a822c into elastic:master Oct 24, 2016
@gmarz
Copy link
Contributor

gmarz commented Oct 24, 2016

You Can also change the branch you merge to :)

Yea that one I know of. The new merge features flew past my radar though :)

gmarz pushed a commit that referenced this pull request Oct 24, 2016
* Adding support for local metadata on properties.

* Fix whitespace

* Move LocalMetadata into the IProperty interface

Closes #2320
@gmarz
Copy link
Contributor

gmarz commented Oct 24, 2016

Merged to master and 5.x.

Also made a small revision and added more tests c8cc85f

Thanks @ejsmith !

{
public class LocalMetadataTests
{
[Fact]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be [U], in line with other unit tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@russcam I caught this in c8cc85f

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants