public RestOpenApiProcessor(Map<String, Object> parameters,
                                RestConfiguration configuration) {
        this.configuration = configuration;
        this.support = new RestOpenApiSupport();
        this.openApiConfig = new BeanConfig();

        if (parameters == null) {
            parameters = Collections.emptyMap();
        }
        support.initOpenApi(openApiConfig, parameters);
    }
@Test
    public void testRestOpenApiProcessor() throws Exception {
        CamelContext context = new DefaultCamelContext();
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() {
                rest().get("/foo").description("Foo endpoint").to("mock:foo")
                        .post("/bar").description("Bar endpoint").to("mock:foo");
            }
        });

        RestOpenApiProcessor processor = new RestOpenApiProcessor(null, context.getRestConfiguration());
        processor.setCamelContext(context);
        processor.start();

        Exchange exchange = new DefaultExchange(context);
        processor.process(exchange);

        String json = exchange.getMessage().getBody(String.class);
        assertNotNull(json);
        assertTrue(json.contains("\"/foo\""));
        assertTrue(json.contains("\"/bar\""));
        assertTrue(json.contains("\"summary\" : \"Foo endpoint\""));
        assertTrue(json.contains("\"summary\" : \"Bar endpoint\""));
    }