Class RestSwaggerSupport


  • public class RestSwaggerSupport
    extends Object
    A support class for that allows SPI to plugin and offer Swagger API service listings as part of the Camel component. This allows rest-dsl components such as servlet/jetty/netty-http to offer Swagger API listings with minimal effort.
    • Constructor Detail

      • RestSwaggerSupport

        public RestSwaggerSupport()
    • Method Detail

      • initSwagger

        public void initSwagger​(io.swagger.jaxrs.config.BeanConfig swaggerConfig,
                                Map<String,​Object> config)
      • getRestDefinitions

        public List<org.apache.camel.model.rest.RestDefinition> getRestDefinitions​(org.apache.camel.CamelContext camelContext)
                                                                            throws Exception
        Throws:
        Exception
      • renderResourceListing

        public void renderResourceListing​(org.apache.camel.CamelContext camelContext,
                                          RestApiResponseAdapter response,
                                          io.swagger.jaxrs.config.BeanConfig swaggerConfig,
                                          boolean json,
                                          boolean yaml,
                                          Map<String,​Object> headers,
                                          org.apache.camel.spi.ClassResolver classResolver,
                                          org.apache.camel.spi.RestConfiguration configuration)
                                   throws Exception
        Throws:
        Exception