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

   Fix for https://issues.apache.org/jira/browse/CAMEL-17923
   
   ## Motivation
   
   In the documentation of an header only the name of the header is provided 
but the good practice is to use the related constant instead of using a string 
directly, so we should rather propose the name of the constant that holds the 
name of the header to avoid typos and to ease potential future renaming.
   
   ## Modifications:
   
   * Add the field `constantName` to the model of the header that will contain 
the name of the header in the next formats:
     * In case of an interface or a class: 
`${declaring-class-name}#${constant-name}`
     * In case of an enum and `headersNameProvider` is set to a name of field: 
`${declaring-class-name}#${enum-constant-name}@${field-name}`
     * In case of an enum and `headersNameProvider` is set to a name of method: 
`${declaring-class-name}#${enum-constant-name}@${method-name}()`
     * In case of an enum by default: 
`${declaring-class-name}#${enum-constant-name}`
   * Add a new JS file with methods dedicated to the header template allowing 
to generate the link to the constants
   
   ## Result
   
   <img width="1206" alt="image" 
src="https://user-images.githubusercontent.com/1618116/162442693-8c2bd447-69a5-412b-a8ba-ecaf6262a938.png";>
   
   


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