Hi In regards to tooling then they use the component json files that a component generates when its built. ie @UriEndpoint and all those @UriParam and @UriPath you set on the endpoint.
So in any way you must define that in the endpoint to expose what options you can configure. In your mail you have two options path componentName And if you want to configure them on component also, you must have getter/setter there, and you can use @Metadata to annotate special things such as label / secret / enum and whatnot just like you can with @UriParam On Thu, Mar 9, 2017 at 1:42 PM, Zoran Regvart <zo...@regvart.com> wrote: > Hi Cameleers, > I'm thinking of reopening CAMEL-10932[1]: the REST Swagger component, > I would like to see support for something as simple like > `rest-swagger:operation`, where operation would be from a Swagger > specification. Operation ids are guaranteed to be unique by Swagger > specification. > > I've got this working better than in the initial PR i submitted for > review -- now it delegates to RestEndpoint much in the same manner > RestProducerFactory implementations delegate to their own endpoints. > > The thing that buggs me is passing http component specific or even > rest component specific properties from this new component. Now I have > a Map of properties to pass and I'm using > DefaultEndpoint::setProperties to propagate them to RestEndpoint. > > But I guess, this is not helping tooling in any way as it has no way > of knowing what properties are supported. So, is there a better way of > doing this? I don't want to duplicate properties getters/setters and > then have to maintain them in two places. > > Oh, and I have an example of usage, but it should be as simple as: > > final RestConfiguration restConfiguration = new RestConfiguration(); > restConfiguration.setHost("http://petstore.swagger.io"); > context.setRestConfiguration(restConfiguration); > > final RestSwaggerComponent petstore = new > RestSwaggerComponent(camelContext); > final Map<String, Object> parameters = new HashMap<>(); > parameters.put("path", "/v2"); > parameters.put("componentName", "undertow"); // or any other > RestProducerFactory component > petstore.setParameters(parameters); > context.addComponent("petstore", petstore); > //... > template.requestBodyAndHeader("petstore:getPetById", null, "petId", 1); > > thanks, and sorry for being long winded > > zoran > > [1] https://issues.apache.org/jira/browse/CAMEL-10932 > -- > Zoran Regvart -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2