Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14352

Add camel-openapi as api-doc discovered component

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • None
    • None
    • Unknown

    Description

      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); }

      }

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: