Hi Ron Good to hear that you can find a solution, and thats its a step up with your Camel adventure.
The community is here if you need help or want to discuss something. And then mind Camel 3 is around the corner so that brings you new adventures too ;) On Sat, Nov 9, 2019 at 7:37 AM Ron Cecchini <roncecch...@comcast.net> wrote: > > Hi, Claus. Thanks for your response. > > The Camel "rest-swagger" looks awesome but unfortunately I don't think I can > use it, because what I actually need are the data models created from the > Swagger OpenAPI specs. > > And as it turns out, Maven's "swagger-codegen-maven-plugin" is precisely what > I need. I misspoke earlier when I said I wanted to dynamically pull in the > API at startup. I was just trying to avoid a manual CodeGen > ("swagger-codegen-cli") step before compiling. > > But with the Maven plugin I can grab the API and generate the models at > compile time - which is perfectly suitable for my needs. And it's great that > the plugin lets you specify either a URL or a local JSON file (which is what > I'll end up using), and it lets you generate exactly the models you need > (instead of all of them). > > I'm sure this is all old hat to you guys, but I'm new to it... > > Thank you again. > > Ron > > ... > > FWIW: I got my tech lead excited about Camel and Spring Boot and he gave me > the go ahead. I'm creating a Spring Boot + Camel pipeline with a scalable > Ingest "head" where multiple rest components will each hit a different > endpoint to get a JSON array of hundreds or thousands of elements. I'll then > use Camel to split the array, start some Camel parallelProcessing() or > threads() or whatever, convert each JSON to one of the model POJOs created by > Swagger, then convert each model to a custom model, and write it to a Kafka > topic to feed the rest of the pipeline. (or maybe it's better for Ingest to > just write the JSON elements to Kafka, and let the other side of the pipeline > do the JSON transforming...) Anyway, should be pretty neat, and it'll be > much less code than what they currently have. It's pretty straight forward > stuff you guys do all the time, but it'll be my biggest Camel implementation > yet, and I'm glad I'm getting to showcase Camel as being something other than > a tool to jus > t "read from a JMS and write to a JMS". > > > On November 8, 2019 at 4:24 PM Claus Ibsen <claus.ib...@gmail.com> wrote: > > > > > > Hi > > > > Maybe something like the rest-swagger component > > https://camel.apache.org/components/latest/rest-swagger-component.html > > > > However this is for Camel to call an existing REST service by > > referring to the swagger api of the service. > > > > On Fri, Nov 8, 2019 at 10:17 PM Ron Cecchini <roncecch...@comcast.net> > > wrote: > > > > > > I'm taking a shot here... > > > > > > I'm new to Swagger. > > > > > > I see that Camel has integration for generating Swagger APIs. > > > > > > But what about *reading* someone else's API and using their schemas in my > > > routes? > > > > > > I'm looking at Swagger Codegen to see how to generate the client code... > > > But given Camel's infinite awesomeness, I was wondering if Camel or > > > anyone has basically automated the process so that, say, at start up you > > > can dynamically grab someone's API and use that to parse data from their > > > endpoints, etc. > > > > > > Thanks and have a great weekend everyone. > > > > > > > > -- > > Claus Ibsen > > ----------------- > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2