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
SOLR-15742: Convert v2 /update APIs to annotations #868
SOLR-15742: Convert v2 /update APIs to annotations #868
Conversation
Solr's been in the slow process of moving its v2 APIs away from the existing apispec/mapping framework towards one that relies on more explicit annotations to specify API properties. This commit converts the APIs from the core.Update apispec file to the "new" framework.
* Api} implementations associated with each RequestHandler, and registers them in an {@link | ||
* org.apache.solr.api.ApiBag}. Since UpdateRequestHandler is mentioned multiple times in | ||
* ImplicitPlugins.json (once for each update API: /update, /update/json, etc.), this would cause | ||
* the v2 APIs to be registered in duplicate. To avoid this, Solr has this RequestHandler, whose |
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.
great piece of javadocs ;-)
* | ||
* <p>Most of these v2 APIs are implemented as pure "pass-throughs" to the v1 code paths, but there | ||
* are a few exceptions: /update and /update/json are both rewritten to /update/json/docs, and | ||
* /update/json/commands has its path changed to /update/json. |
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.
do we need to keep the /update/json/commands
, sounds like something that is orphaned/abandoned?
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.
true, we do not need them anymore
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.
Ok, removed. Thanks for the prompt guys.
- one needed updated to reflect a change to ImplicitPlugins.json - one helped catch a bug in UpdateAPI that's now fixed - one failure was caused by a larger structural bug that I filed a ticket for, but only work around in this current PR. See SOLR-16205.
Solr's been in the slow process of moving its v2 APIs away from the existing apispec/mapping framework towards one that relies on more explicit annotations to specify API properties. This commit converts the APIs from the core.config.Params apispec file to the "new" framework.
Description
Solr's been in the slow process of moving its v2 APIs away from the
existing apispec/mapping framework towards one that relies on more
explicit annotations to specify API properties. Many have been
converted, but many more still remain.
Solution
This commit takes a chunk out of this work by converting the APIs
from the core.Update apispec file to the "new" framework.
Tests
Some unit tests for the v2->v1 mapping in V2UpdateAPIMappingTest
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.