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-16396: Convert v2 configset APIs to JAX-RS #2928

Merged
merged 10 commits into from
Jan 3, 2025

Conversation

gerlowskija
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-16396

Description

Solr's v2 API supports configset operations, but the underlying implementation of these uses the legacy API framework.

Solution

This PR moves create/clone configset, delete configset, upload configset, and upload configset file to be implemented using the JAX-RS framework. This ensures that the APIs are covered by our v2 API OAS, and includes them in all code-generation done using the OAS.

It also makes slight tweaks to the appearance of these APIs to help them fit in a bit more with the current API design. In particular:

  • v2 configset operations are now available at the /api/configsets path
  • the request body for configset create-from-existing/clone operations no longer contains an explicit "create" property. Create-from-existing requests now look like POST /api/configsets {"name": "newCS", "baseConfigSet": "existingCS", "properties": {...}}

Tests

Modified tests in TestConfigSetsAPI. Otherwise existing tests continue to pass.

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, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

Convert v2 configset APIs to JAX-RS

Also makes slight tweaks to line APIs up with the more REST-ful design
chosen for other v2 APIs.

  - 'clone' (i.e. 'create-from-existing') is not available at `POST
    /api/configsets {...}`
  - 'delete' is now available at `DELETE /api/configsets/csName`
  - 'list' is now available at `GET /api/configsets`
@github-actions github-actions bot added documentation Improvements or additions to documentation tests cat:cloud cat:api labels Dec 29, 2024
@gerlowskija
Copy link
Contributor Author

Still needed here: CHANGES.txt, ensure tests pass.

@gerlowskija gerlowskija merged commit b2d18ca into apache:main Jan 3, 2025
6 checks passed
@gerlowskija gerlowskija deleted the SOLR-16396-v2-configset-apis branch January 3, 2025 12:01
gerlowskija added a commit that referenced this pull request Jan 3, 2025
Convert v2 configset APIs to JAX-RS.  Naturally this adds the APIs to
Solr's growing v2 OAS, and ensures the APIs are included in code-gen
artifacts.

Also makes slight tweaks to line APIs up with the more REST-ful design
chosen for other v2 APIs.

  - 'clone' (i.e. 'create-from-existing') is now available at `POST
    /api/configsets {...}`
  - 'delete' is now available at `DELETE /api/configsets/csName`
  - 'list' is now available at `GET /api/configsets`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:api cat:cloud documentation Improvements or additions to documentation tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant