Skip to content

Conversation

@gmarz
Copy link
Contributor

@gmarz gmarz commented Dec 1, 2014

Before this change, endpoints that were removed from newer versions of the REST spec were subsequently removed from the low-level clients generated classes as well. We need to keep these endpoints in order to maintain backwards compatibility with older versions of elasticsearch.

All endpoints are now kept in the ApiEndpoints folder. This folder always contains the state in which the low-level client was generated from. Since files are never deleted from this folder, when an endpoint is removed from the REST spec, it's file will still remain.

When useCache == true, we skip downloading of the REST spec and generate directly from the existing contents of ApiEndpoints directory.

This change requires that the ApiEndpoints folder and it's contents are always checked in.

WIP: Need to fix build errors in NEST after updating to the 1.4 spec before this can be merged.

gmarz added 3 commits December 1, 2014 16:47
Before this change, endpoints that were removed from newer versions of the
REST spec were subsequently removed from the low-level clients generated
classes as well.  We need to keep these endpoints in order to maintain
backwards compatibility with older versions of elasticsearch.

All endpoints are now kept in the `ApiEndpoints` folder.  This folder
always contains the state in which the low-level client was generated
from.  Since files are never deleted from this folder, when an endpoint
is removed from the REST spec, it's file will still remain.

When `useCache` == true, we skip downloading of the REST spec and generate
directly from the existing contents of `ApiEndpoints` directory.

This change requires that the `ApiEndpoints` folder and it's contents are
always checked in.
@gmarz gmarz added the WIP label Dec 1, 2014
@Mpdreamz
Copy link
Member

Mpdreamz commented Dec 2, 2014

@gmarz
Copy link
Contributor Author

gmarz commented Dec 4, 2014

Name acts as the search template id and get's assigned to Id in GetSearchTemplatePathInfo.Update(). I think the confusion stemmed from the fact that indices.get_template refers to the id as name, and we tried to model search templates the same way. I'm all +1 for changing name to id everywhere for search templates, which will probably require some sort of base IdPathDescriptor similar to NamePathDescriptor (unless I'm missing something), but this is a 2.0 thing.

I don't see why get_template would have a body; looks like a mistake in the 1.3 spec to me. I don't think we need to worry about BWC here...

@Mpdreamz
Copy link
Member

Mpdreamz commented Dec 5, 2014

LGTM 👍

Mpdreamz added a commit that referenced this pull request Dec 5, 2014
@Mpdreamz Mpdreamz merged commit e582589 into develop Dec 5, 2014
@Mpdreamz Mpdreamz deleted the feature/improve-codegeneration branch December 5, 2014 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants