epugh opened a new pull request, #5421: URL: https://github.com/apache/solr/pull/5421
https://issues.apache.org/jira/browse/SOLR-18701 Each v2 interface method name becomes its OpenAPI `operationId`, which names the generated SolrJ request class and JS/Python client method. When two interfaces share a method name, swagger renames one to `name_1`. That makes names like `QueryingApi.Query1` public client API, and adding an unrelated endpoint can rename an existing operation. #5420 hit this: new Schema Designer `deleteField` methods renamed the Schema API's to `deleteField_1`, which broke the Admin UI Schema screen. ### Renames Only the suffixed side is renamed, so names that are clean today don't change. HTTP endpoints are unchanged. | Interface method | Old SolrJ class | New SolrJ class | |---|---|---| | `SelectApi.select` (was `query`) | `QueryingApi.Query1` | `QueryingApi.Select` | | `CoreSnapshotApi.listCoreSnapshots` | `CoreSnapshotsApi.ListSnapshots1` | `CoreSnapshotsApi.ListCoreSnapshots` | | `ReplicationApis.fetchReplicationFile` | `ReplicationApi.FetchFile1` | `ReplicationApi.FetchReplicationFile` | | `ReplicationBackupApis.createReplicationBackup` | `ReplicationBackupsApi.CreateBackup1` | `ReplicationBackupsApi.CreateReplicationBackup` | Nothing in the repo, including the Admin UI, used the suffixed names. ### Build check `validateOpenApiSpec` (part of `gradlew check`) now fails when an operationId ends in `_<n>`, listing the operations and pointing at the conventions doc. Verified by temporarily restoring `SelectApi.query`: ``` OpenAPI spec has operationIds renamed to avoid a duplicate method name: query_1: GET /{indexType}/{indexName}/select ``` ### Docs - `dev-docs/apis-v2-conventions.adoc`: new "Operation Names" section. - `major-changes-in-solr-11.adoc`: upgrade note with the class renames. Since this renames public SolrJ classes, it's intended for `main` only. ### Testing `gradlew check -x test` passes. `CoreSnapshotAPITest`, `SnapshotBackupAPITest`, `CoreReplicationAPITest`, `CoreAdminOperationTest`, `ReplicationHandlerRecoveryAuthIntegrationTest` and `TestHealthCheckHandlerLegacyMode` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018RwsEmM9zRWihYjszWDGK9 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
