Brijesh-Thakkar opened a new pull request, #26766:
URL: https://github.com/apache/camel/pull/26766

   # Description
   
   This PR improves the error handling when loading an OpenAPI specification 
that does not define any `servers` entry.
   
   ### What was changed
   Validation was added during OpenAPI specification processing to verify that 
`openapi.getServers()` is neither `null` nor empty. If no server configuration 
is present, an explicit `IllegalArgumentException` is raised detailing the 
missing requirement.
   
   ### Why
   Previously, when an OpenAPI contract omitted the `servers` section, Camel 
allowed downstream processing/URI operations to fail, surfacing a raw and 
cryptic JDK message: `java.net.URI: URI is not absolute`. This left users 
without actionable feedback on what was wrong with their contract. Raising a 
clear exception upfront directly informs users that a `servers` entry must be 
specified.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   - I have used Gemini for code debugging


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

Reply via email to