Skip to content
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-15745: Convert corestatus APIs to annotations #455

Conversation

gerlowskija
Copy link
Contributor

@gerlowskija gerlowskija commented Dec 12, 2021

Description

Solr has historically supported two frameworks for definings its v2
APIs: a JSON-based 'apispec' framework, and a more modern replacement
that relies on JAX-RS-like annotations to specify endpoints and
parameters.

The community is in the process of migrating to the annotation based
approach, but many apispec APIs remain.

Solution

This commit converts GET /v2/cores and GET /v2/cores/coreName over to
the annotation framework.

Tests

See V2CoresAPIMappingTest

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.

Solr has historically supported two frameworks for definings its v2
APIs: a JSON-based 'apispec' framework, and a more modern replacement
that relies on JAX-RS-like annotations to specify endpoints and
parameters.

The community is in the process of migrating to the annotation based
approach, but many apispec APIs remain.

This commit converts GET /v2/cores and GET /v2/cores/coreName over to
the annotation framework.
@@ -411,6 +413,8 @@ void call() throws Exception {
public Collection<Api> getApis() {
final List<Api> apis = Lists.newArrayList(coreAdminHandlerApi.getApis());
// Only some core-admin APIs use the v2 AnnotatedApi framework
Copy link
Contributor

Choose a reason for hiding this comment

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

is the above comment still true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, even after this PR there are the cores.core.Commands and the cores.core.Commands.split` apispec files.

@gerlowskija gerlowskija merged commit 7e39a5d into apache:main Dec 18, 2021
@gerlowskija gerlowskija deleted the SOLR-15745-core-status-apis-annotation-conversion branch December 18, 2021 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants