You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2020/01/08 14:19:00 UTC

[jira] [Assigned] (CAMEL-14352) Add camel-openapi as api-doc discovered component

     [ https://issues.apache.org/jira/browse/CAMEL-14352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Yue Fang reassigned CAMEL-14352:
----------------------------------------

    Assignee: Freeman Yue Fang

> Add camel-openapi as api-doc discovered component
> -------------------------------------------------
>
>                 Key: CAMEL-14352
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14352
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Claus Ibsen
>            Assignee: Freeman Yue Fang
>            Priority: Major
>             Fix For: 3.1.0
>
>
> In camel-rest we have some code that detects camel-swagger-java. We should add the new camel-openapi component too
>         if (apiDoc != null) {
>             log.debug("Discovering camel-swagger-java on classpath for using api-doc: {}", apiDoc);
>             // lookup on classpath using factory finder to automatic find it (just add camel-swagger-java to classpath etc)
>             try {
>                 FactoryFinder finder = getCamelContext().adapt(ExtendedCamelContext.class).getFactoryFinder(RESOURCE_PATH);
>                 apiDocFactory = finder.newInstance(DEFAULT_API_COMPONENT_NAME, RestProducerFactory.class).orElse(null);
>                 parameters.put("apiDoc", apiDoc);
>             } catch (NoFactoryAvailableException e) {
>                 throw new IllegalStateException("Cannot find camel-swagger-java on classpath to use with api-doc: " + apiDoc);
>             }
>         }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)