[ 
https://issues.apache.org/jira/browse/CAMEL-19763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17756050#comment-17756050
 ] 

Claus Ibsen commented on CAMEL-19763:
-------------------------------------

Hmm I would rather see this can be done in a more Camel way.

Make RestModelConverters an interface, and have a DefaultRestModelConverters.
Add those methods in the API in the interface.

Make Camel lookup from registry if there is a custom RestModelConverters, and 
use it if present, otherwise use the default.
Add in the docs about this feature, in src/main/docs.

There is already RestDefinitionsResolver as interface (however it does a 
classpath lookup) what you should do is lookup in Registry

> Add some public methods to RestModelConverters
> ----------------------------------------------
>
>                 Key: CAMEL-19763
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19763
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-openapi-java
>            Reporter: Darius Cooper
>            Priority: Major
>
> We have a use-case where we would like to exclude certain packages from our 
> OpenAPI JSO spec.
> We'd like to use the Camel RestModelConverters class, but also add some more 
> rules.
> Could some public methods be added to RestModelConverters, which would be 
> very similar to what is in [Open API's ModelConverters class 
> here|https://github.com/swagger-api/swagger-core/blob/d0d584dd4be18ced7ff1e71aa768be699e1a8d21/modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ModelConverters.java#L81]:
>  * public void addConverter(ModelConverter converter)
>  * public void addPackageToSkip(String pkg)
>  * public void addClassToSkip(String cls)
> Would that change be acceptable? If so, we can submit a PR. Thanks.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to