davsclaus opened a new pull request, #30948:
URL: https://github.com/apache/camel/pull/30948

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   This PR rewrites 23 texts of camel-weather: the component description, 20 
endpoint options and 2 headers. The old
   component description said only "Poll", but the component also has a 
producer. Several option texts were vague, and some
   were wrong:
   
   - geolocationRequestHostIP said it was "the IP associated to the accessKey". 
It is the IP address that the ipstack API
     locates.
   - period said only 5, 7 or 14 days. Any number is read, and it is sent as 
`cnt`: days for the daily forecast, 3-hour
     steps with weatherApi Hourly.
   - location said "If null". The default is empty, and lat and lon, zip and 
ids take precedence over it.
   
   The new texts give the OpenWeatherMap query parameter that each option sets, 
and the order in which lat and lon, zip,
   ids and location are used. They also say when the producer ignores the 
CamelWeatherLocation header, and when the
   geolocation options are needed.
   
   The texts come from the Camel code (`WeatherQuery`, `WeatherConsumer`, 
`WeatherProducer` and
   `FreeGeoIpGeoLocationProvider`) and the OpenWeatherMap 2.5 API that the 
component calls.
   
   ### Found, not changed
   
   - `geolocationAccessKey` and `geolocationRequestHostIP` are marked `required 
= true`. They are only needed when the
     location is looked up: location is empty or `current`, and none of lat and 
lon, zip or ids is set.
   - The consumer overrides the scheduler `delay` to 3600000 (one hour), but 
the metadata gives the default as 500.
   - On stop, the endpoint closes the `httpClient`, even one that the user set, 
which could be shared.
   - weatherApi `Current` is never checked in the code. `Hourly` and `Daily` 
have no effect without `period`.
   - A comment in `WeatherQuery` says the default units are metric. 
OpenWeatherMap uses standard units (Kelvin) when no
     `units` is sent, and `WeatherUnits` has no `STANDARD` value.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (23 texts).
   
   # 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.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
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.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 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]

Reply via email to