adityamparikh opened a new pull request, #232:
URL: https://github.com/apache/solr-mcp/pull/232

   ## What
   
   `get-schema` now calls `requireCollection(collection)` first, as 
`add-fields` and `add-field-types` already do.
   
   ## Why
   
   A null or blank collection always failed, but only after a round trip: `""` 
came back as a Jetty 400, and `null` resolved to the base URL's `/schema`. Now 
it fails fast with `Collection name must not be blank` and makes no Solr call. 
The `solr://{collection}/schema` resource delegates to `getSchema` and already 
catches exceptions, so it returns the same message as its JSON `error`.
   
   The other schema tools already make exactly one Solr request each. This was 
the only waste found in the schema capability.
   
   ## Tests
   
   - `SchemaServiceTest`: new test that `getSchema(null)`, `getSchema("")` and 
`getSchema("   ")` throw `IllegalArgumentException` and make no call to 
`solrClient`.
   - `./gradlew build`: 422 tests, 0 failures, 0 skipped.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to