Claus Ibsen created CAMEL-14352:
-----------------------------------

             Summary: 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
             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)

Reply via email to