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

Add camel-openapi as api-doc discovered component

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: