Hi, Claus. Thanks -- I think that I need to disable it for this one. On Fri, Oct 15, 2021 at 12:25 AM Claus Ibsen <claus.ib...@gmail.com> wrote:
> Hi > > You can run the maven command with -e to display the stacktrace. It > may be that we can fix the NPE in this plugin, or we need to disable > it for this starter you create. > > On Fri, Oct 15, 2021 at 2:27 AM Steve973 <steve...@gmail.com> wrote: > > > > That is what I have been trying to do, but this keeps happening: > > > > [ERROR] Failed to execute goal > > > org.apache.camel.springboot:camel-spring-boot-generator-maven-plugin:3.13.0-SNAPSHOT:prepare-spring-boot-starter > > (generate) on project camel-springdoc-starter: Unable to create starter: > > Unable to build project dependency tree: NullPointerException -> [Help 1] > > > > It must be something trivial that I am overlooking, but I can't figure it > > out! > > > > Thanks, > > Steve > > > > On Thu, Oct 14, 2021 at 12:46 AM Claus Ibsen <claus.ib...@gmail.com> > wrote: > > > > > Hi > > > > > > You do not need to use the create-starter script as it is as you say > > > for when there is an existing camel component that it based upon. > > > You can create a new directory manually, thought you then need to add > > > it manually to the pom.xml file. > > > > > > But that can be later, at first you can create the directory manually, > > > and copy over that source I hacked together, and polish as needed. > > > Use the right name etc. Add a doc file in src/main/docs etc. > > > > > > And then you can build it locally with mvn clean install so you have > > > the JAR in your local m2 repo. > > > Then you can try to use it from your example to see it works. > > > > > > > > > > > > > > > > > > On Wed, Oct 13, 2021 at 10:05 PM Steve973 <steve...@gmail.com> wrote: > > > > > > > > Ok, that makes sense. Another thing that I am curious about is the > fact > > > > that using create-starter wants there to be a camel-springdoc library > > > that > > > > the camel-springdoc-starter configures. When I try to create a > starter > > > > module manually, and without that nonexistent library, it won't > build for > > > > me. This is the first time that I am working directly on the Camel > code, > > > > so if there is a decent resource to get me started, would you mind > > > pointing > > > > me in the right direction, please? > > > > > > > > Thanks, > > > > Steve > > > > > > > > On Wed, Oct 13, 2021 at 2:33 PM Claus Ibsen <claus.ib...@gmail.com> > > > wrote: > > > > > > > > > On Wed, Oct 13, 2021 at 8:05 PM Steve973 <steve...@gmail.com> > wrote: > > > > > > > > > > > > Hi, Claus. I am assuming that you made your modifications, and > then > > > > > added > > > > > > them to a test project (locally, not in the repo) and brought in > the > > > > > > springdoc ui dependency into that? I am asking because I don't > see > > > it in > > > > > > the branch that you pushed for this ticket. > > > > > > > > > > > > > > > > Yes I used your example from that github link you had. > > > > > > > > > > > Thanks, > > > > > > Steve > > > > > > > > > > > > On Sun, Oct 10, 2021 at 1:13 PM Steve973 <steve...@gmail.com> > wrote: > > > > > > > > > > > > > My ASF Jira username is Steve973. I'd be glad to take what you > > > have > > > > > done > > > > > > > and create a new module with it. By the way, you might > remember a > > > > > > > discussion about the implementation of the Dynamic Router EIP > that > > > we > > > > > had a > > > > > > > few years ago. I am just now getting around to implementing > it in > > > a > > > > > way > > > > > > > that better agrees with the EIP description. I would like your > > > > > thoughts > > > > > > > and input on it. Should I start a new email thread about it? > > > > > > > > > > > > > > Thanks again, > > > > > > > Steve > > > > > > > > > > > > > > On Sun, Oct 10, 2021 at 11:10 AM Claus Ibsen < > > > claus.ib...@gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > >> Hi > > > > > > >> > > > > > > >> Okay I got this working now. Had to fix a thing in > > > camel-openapi-java > > > > > > >> https://issues.apache.org/jira/browse/CAMEL-17063 > > > > > > >> > > > > > > >> The UI now works and I can see the rest-dsl services and > invoke > > > them. > > > > > > >> > > > > > > >> Steve, so what is needed is to take that work on > > > > > > >> https://github.com/apache/camel-spring-boot/tree/CAMEL-17061 > > > > > > >> > > > > > > >> And move that into a new camel-springdoc-starter module > > > > > > >> and then polish and adjust the code so it uses > camel.springdoc as > > > > > > >> configuration instead of camel.openapi > > > > > > >> > > > > > > >> Since you use servlet then it requires 3.13.0-SNAPSHOT to have > > > fixes > > > > > > >> from camel-openapi-java, so you may need to build a camel > project > > > > > > >> locally too. > > > > > > >> You can do that with > > > > > > >> > > > > > > >> mvn clean install -P fastinstall > > > > > > >> > > > > > > >> After this it would be nice to add camel-springdoc-starter to > one > > > of > > > > > > >> the REST examples at > > > > > > >> https://github.com/apache/camel-spring-boot-examples > > > > > > >> > > > > > > >> And then update the readme file with some details. > > > > > > >> > > > > > > >> And you are also welcome to write a guest blog to be posted > on the > > > > > > >> Camel front page about this new feature in Camel 3.13. > > > > > > >> > > > > > > >> If you have a JIRA account then let me know the username then > I > > > can > > > > > > >> grant your karma to assign the ticket at > > > > > > >> https://issues.apache.org/jira/browse/CAMEL-17061 > > > > > > >> > > > > > > >> On Sun, Oct 10, 2021 at 2:14 PM Claus Ibsen < > > > claus.ib...@gmail.com> > > > > > > >> wrote: > > > > > > >> > > > > > > > >> > Hi > > > > > > >> > > > > > > > >> > Okay I have it almost working in the sprindoc UI. > > > > > > >> > However there is a glitch when using servlet as you need to > > > have the > > > > > > >> > servlet run in its own context-path so it does not affect > > > > > spring-boot, > > > > > > >> > eg that is why it runs with /camel/* by default. > > > > > > >> > However the UI when you click "try it out" then it invokes > the > > > > > service > > > > > > >> > without that content-path. > > > > > > >> > > > > > > > >> > So I need to find a solution for this in rest-dsl + servlet > + > > > > > open-api > > > > > > >> > - however if I invoke the correct url then it works nice. > > > > > > >> > > > > > > > >> > There is also some tags that just say "camel" we can maybe > > > enrich > > > > > this > > > > > > >> > by default to have a bit more nicer details like the > Actuator > > > does. > > > > > > >> > > > > > > > >> > The work is pushed on a branch here > > > > > > >> > > https://github.com/apache/camel-spring-boot/tree/CAMEL-17061 > > > > > > >> > > > > > > > >> > On Sun, Oct 10, 2021 at 12:28 PM Claus Ibsen < > > > claus.ib...@gmail.com > > > > > > > > > > > > >> wrote: > > > > > > >> > > > > > > > > >> > > Hi > > > > > > >> > > > > > > > > >> > > Yeah that is a good idea. However as springdoc is for > spring > > > boot > > > > > > >> > > only, then lets put it only into camel-spring-boot > project. > > > > > > >> > > > > > > > > >> > > camel-springdoc-starter > > > > > > >> > > > > > > > > >> > > I have some prototype code I put into camel-openapi-java > that > > > can > > > > > be > > > > > > >> > > moved into this new springdoc-starter and used as a > starting > > > > > point. > > > > > > >> > > Then you should be able to just add > camel-springdoc-starter > > > JAR as > > > > > > >> > > dependency to your project and then it comes with the UI > > > included. > > > > > > >> > > > > > > > > >> > > I will put my work into a branch on camel-spring-boot > > > upstream, > > > > > then > > > > > > >> > > you are welcome to look at that and work on the > > > > > > >> > > camel-springdoc-starter. > > > > > > >> > > Documentation should be included in the > > > > > > >> > > src/main/docs/springdoc-starter.adoc file. > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > On Sat, Oct 9, 2021 at 6:16 PM Steve973 < > steve...@gmail.com> > > > > > wrote: > > > > > > >> > > > > > > > > > >> > > > That sounds great! I was able to get both definitions > to > > > > > coexist, > > > > > > >> although > > > > > > >> > > > I am not sure if it is entirely ideal or not. I > achieved > > > this > > > > > in > > > > > > >> the > > > > > > >> > > > configuration: > > > > > > >> > > > > > > > > > >> > > > springdoc: > > > > > > >> > > > show-actuator: true > > > > > > >> > > > swagger-ui: > > > > > > >> > > > disable-swagger-default-url: true > > > > > > >> > > > urls: > > > > > > >> > > > # Definition generated by springdoc for the > actuator > > > > > endpoints > > > > > > >> > > > - url: /v3/api-docs > > > > > > >> > > > name: Spring Boot Actuator > > > > > > >> > > > # The Camel REST DSL swagger > > > > > > >> > > > - url: /api/api-doc > > > > > > >> > > > name: Rest API > > > > > > >> > > > > > > > > > >> > > > Now, if we change the selection at the top, where it > says > > > > > "Select a > > > > > > >> > > > definition", we can choose between the REST API and the > > > Spring > > > > > Boot > > > > > > >> > > > Actuator endpoints. > > > > > > >> > > > > > > > > > >> > > > I do like your idea, though. If we can have these > things > > > work > > > > > > >> together, > > > > > > >> > > > and more easily, that would be even better. Should I > > > attempt to > > > > > > >> create a > > > > > > >> > > > camel-springdoc-java component and starter? I can see > this > > > > > working > > > > > > >> well > > > > > > >> > > > with the REST DSL, and with other spring boot rest > > > controllers > > > > > all > > > > > > >> > > > coexisting in the same project. In the forums, etc, I > saw > > > more > > > > > > >> than a > > > > > > >> > > > couple of questions about getting a UI on top of > swagger, so > > > > > this > > > > > > >> might be > > > > > > >> > > > a useful thing for some people. > > > > > > >> > > > > > > > > > >> > > > On Sat, Oct 9, 2021 at 11:57 AM Claus Ibsen < > > > > > claus.ib...@gmail.com> > > > > > > >> wrote: > > > > > > >> > > > > > > > > > >> > > > > Hi Steven > > > > > > >> > > > > > > > > > > >> > > > > Thanks for the work. I looked as well and we can > likely > > > make > > > > > Camel > > > > > > >> > > > > automatic enlist its rest-dsl into spring boot so the > > > > > springdoc > > > > > > >> can > > > > > > >> > > > > automatic discover it > > > > > > >> > > > > https://issues.apache.org/jira/browse/CAMEL-17061 > > > > > > >> > > > > > > > > > > >> > > > > We do this in the -starter JARs and make it possible > to > > > turn > > > > > > >> on|off so > > > > > > >> > > > > users can decide. > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > On Sat, Oct 9, 2021 at 5:23 PM Steve973 < > > > steve...@gmail.com> > > > > > > >> wrote: > > > > > > >> > > > > > > > > > > > >> > > > > > Please have a look at my working example. When I > get > > > it all > > > > > > >> working, and > > > > > > >> > > > > > cleaned up, I can submit it as one of the camel > example > > > > > > >> modules, if that > > > > > > >> > > > > > would be helpful. I would make the project > resemble the > > > > > other > > > > > > >> examples > > > > > > >> > > > > as > > > > > > >> > > > > > closely as possible. I thought that being able to > > > include > > > > > the > > > > > > >> actuator > > > > > > >> > > > > > endpoints would be a good illustration of how other > REST > > > > > > >> endpoints could > > > > > > >> > > > > be > > > > > > >> > > > > > included with the camel rest information. > > > > > > >> > > > > > > > > > > > >> > > > > > On Sat, Oct 9, 2021 at 10:59 AM Steve973 < > > > > > steve...@gmail.com> > > > > > > >> wrote: > > > > > > >> > > > > > > > > > > > >> > > > > > > Thank you, Claus. I have been chipping away at > this > > > > > problem, > > > > > > >> and it is > > > > > > >> > > > > > > quite possible to point springdoc to the generated > > > swagger > > > > > > >> JSON. In my > > > > > > >> > > > > > > application.yml: > > > > > > >> > > > > > > > > > > > > >> > > > > > > springdoc: > > > > > > >> > > > > > > show-actuator: true > > > > > > >> > > > > > > swagger-ui: > > > > > > >> > > > > > > disable-swagger-default-url: true > > > > > > >> > > > > > > url: /api/api-doc > > > > > > >> > > > > > > > > > > > > >> > > > > > > You can see that I have "show-actuator: true", > but I > > > have > > > > > not > > > > > > >> gotten > > > > > > >> > > > > this > > > > > > >> > > > > > > to work, yet. I don't suppose that there is any > way > > > to > > > > > have > > > > > > >> the camel > > > > > > >> > > > > > > openapi java component include this in its > openapi doc > > > > > > >> generation, is > > > > > > >> > > > > there? > > > > > > >> > > > > > > > > > > > > >> > > > > > > On Sat, Oct 9, 2021 at 10:11 AM Claus Ibsen < > > > > > > >> claus.ib...@gmail.com> > > > > > > >> > > > > wrote: > > > > > > >> > > > > > > > > > > > > >> > > > > > >> Hi > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> At first thought I would assume springdoc needs a > > > way to > > > > > > >> discover the > > > > > > >> > > > > > >> Camel Rest DSL model (api doc). > > > > > > >> > > > > > >> And maybe this can be done by exposing a bean > into > > > Spring > > > > > > >> that is of > > > > > > >> > > > > > >> type OpenApi > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> @Bean > > > > > > >> > > > > > >> public OpenApi camelRestDsl() { > > > > > > >> > > > > > >> ... // some code here that gathers the camel > > > rest-dsl > > > > > > >> model and > > > > > > >> > > > > > >> return as bean > > > > > > >> > > > > > >> } > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> However I am only speculating. > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> You can try to add a custom method in your sample > > > app and > > > > > > >> just > > > > > > >> > > > > > >> hardcode some bogus open api model as above and > see > > > if > > > > > > >> springdoc > > > > > > >> > > > > > >> detects this. > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> Otherwise it can help if you have time to read > into > > > > > > >> springodc how to > > > > > > >> > > > > > >> integrate with custom frameworks. > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> > > > > > > >> > > > > > >> On Sat, Oct 9, 2021 at 1:37 PM Steve973 < > > > > > steve...@gmail.com> > > > > > > >> wrote: > > > > > > >> > > > > > >> > > > > > > > >> > > > > > >> > Hi, Claus. Thank you for the reply! You can > find > > > > > > >> springdoc here: > > > > > > >> > > > > > >> > https://springdoc.org/ and I moved my project > from > > > > > using > > > > > > >> springfox > > > > > > >> > > > > > >> because > > > > > > >> > > > > > >> > springfox has only one developer, and > springdoc is > > > > > > >> maintained by a > > > > > > >> > > > > > >> > community. The artifact that I am using is > > > > > > >> > > > > > >> > "org.springdoc:springdoc-openapi-ui:1.5.11". > I am > > > > > using > > > > > > >> Spring Boot > > > > > > >> > > > > > >> 2.5.5, > > > > > > >> > > > > > >> > and Camel 3.12.0. So that you can also see > what I > > > am > > > > > > >> doing, in > > > > > > >> > > > > case I > > > > > > >> > > > > > >> am > > > > > > >> > > > > > >> > doing something that is prohibiting the Camel > > > OpenAPI > > > > > > >> functionality > > > > > > >> > > > > from > > > > > > >> > > > > > >> > working correctly, I pushed my example to > Github: > > > > > > >> > > > > > >> > > > > > > https://github.com/Steve973/spring-camel-rest-experiments > > > > > > >> where I > > > > > > >> > > > > am > > > > > > >> > > > > > >> trying > > > > > > >> > > > > > >> > out a minimal example just to see if I can get > it > > > > > > >> working. Thanks > > > > > > >> > > > > > >> again! > > > > > > >> > > > > > >> > > > > > > > >> > > > > > >> > Steve > > > > > > >> > > > > > >> > > > > > > > >> > > > > > >> > On Sat, Oct 9, 2021 at 3:23 AM Claus Ibsen < > > > > > > >> claus.ib...@gmail.com> > > > > > > >> > > > > > >> wrote: > > > > > > >> > > > > > >> > > > > > > > >> > > > > > >> > > Hi > > > > > > >> > > > > > >> > > > > > > > > >> > > > > > >> > > I have not tried that myself, can you maybe > point > > > > > links > > > > > > >> to where > > > > > > >> > > > > this > > > > > > >> > > > > > >> > > spring ui exists? > > > > > > >> > > > > > >> > > And what version of SB and Camel are you > using? > > > > > > >> > > > > > >> > > > > > > > > >> > > > > > >> > > > > > > > > >> > > > > > >> > > On Sat, Oct 9, 2021 at 12:37 AM Steve973 < > > > > > > >> steve...@gmail.com> > > > > > > >> > > > > wrote: > > > > > > >> > > > > > >> > > > > > > > > > >> > > > > > >> > > > Hello. I am using spring boot with the > camel > > > rest > > > > > dsl > > > > > > >> and it is > > > > > > >> > > > > > >> working > > > > > > >> > > > > > >> > > > great. I can also have swagger JSON > generated > > > and > > > > > > >> accessible. > > > > > > >> > > > > But > > > > > > >> > > > > > >> I > > > > > > >> > > > > > >> > > would > > > > > > >> > > > > > >> > > > like to use the springdoc openapi user > > > interface to > > > > > > >> interact > > > > > > >> > > > > with > > > > > > >> > > > > > >> my rest > > > > > > >> > > > > > >> > > > endpoints. I have tried for hours, and I > have > > > not > > > > > > >> been able to > > > > > > >> > > > > get > > > > > > >> > > > > > >> the > > > > > > >> > > > > > >> > > UI > > > > > > >> > > > > > >> > > > to come up. Does anyone know if it is > > > possible to > > > > > use > > > > > > >> > > > > camel-rest > > > > > > >> > > > > > >> and the > > > > > > >> > > > > > >> > > > springdoc openapi user interface together? > > > > > > >> > > > > > >> > > > > > > > > >> > > > > > >> > > > > > > > > >> > > > > > >> > > > > > > > > >> > > > > > >> > > -- > > > > > > >> > > > > > >> > > 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 > > > > > > >> > > > > > >> > > > > > > >> > > > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > -- > > > > > > >> > > > > 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 > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > -- > > > > > > >> > 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 > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > 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 > > > > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >