Hi

Josh Reagan just blogged about contract-first as well
http://blog.joshdreagan.com/2018/03/02/camel_cxfrs_contract_first/


On Thu, Mar 1, 2018 at 11:39 PM, Henrique Viecili <viec...@gmail.com> wrote:
> Thanks Claus!
>
> It's better than what I had found by myself:
> https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
>
>
>
> Henrique Viecili
>
> On 1 March 2018 at 18:53, Claus Ibsen <claus.ib...@gmail.com> wrote:
>
>> Hi
>>
>> See for example
>> https://github.com/apache/camel/blob/master/tooling/
>> maven/camel-restdsl-swagger-plugin/src/main/docs/camel-
>> package-maven-plugin.adoc
>>
>> On Thu, Mar 1, 2018 at 6:32 AM, Henrique Viecili <viec...@gmail.com>
>> wrote:
>> > As this thread is *15 months* old now, is there any update on support for
>> > swagger contract-first?
>> >
>> >
>> > On 1 March 2018 at 16:04, Henrique Viecili <viec...@gmail.com> wrote:
>> >
>> >> As this thread is 3 months old now, is there any update on support for
>> >> swagger contract-first?
>> >>
>> >>
>> >> Henrique Viecili
>> >>
>> >> On 25 November 2016 at 20:56, Claus Ibsen <claus.ib...@gmail.com>
>> wrote:
>> >>
>> >>> I wonder if there is a swagger -> retrofit generator?
>> >>> https://square.github.io/retrofit/
>> >>>
>> >>> If doing java code for REST then this library is awesome.
>> >>>
>> >>>
>> >>> On Wed, Nov 23, 2016 at 10:07 AM, Claus Ibsen <claus.ib...@gmail.com>
>> >>> wrote:
>> >>> > Hi
>> >>> >
>> >>> > Yeah option B could be nice, the rest component could be enhanced to
>> >>> > support this. And with a convention as you say with the "direct"
>> >>> > routes to map to some routes. Or allow users to configure the
>> >>> > context-path -> route id / url mappings.
>> >>> >
>> >>> > You are welcome to log a JIRA about this idea.
>> >>> >
>> >>> > For option A its outside Apache Camel to provide a swagger -> java
>> >>> > tool. Or to generate Camel XML routes. That is 3rd party tooling job
>> >>> > to do that.
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > On Tue, Nov 22, 2016 at 1:15 PM, Pontus Ullgren <ullg...@gmail.com>
>> >>> wrote:
>> >>> >> Hi.
>> >>> >>
>> >>> >> I'm looking in to the possibility to do Contract First development
>> with
>> >>> >> Camel when the contract is a Swagger document. However I have been
>> >>> unable
>> >>> >> to find any good resources on this subject. So before we run of and
>> >>> build
>> >>> >> something I would like to check with the mailing list.
>> >>> >>
>> >>> >> How do you do contract first REST development with Camel ? Is there
>> any
>> >>> >> tools out there  ?
>> >>> >> I know about,  and have used, swagger codegen (for otrher
>> frameworks).
>> >>> But
>> >>> >> as it is now it does not seem to have support OOTB for Camel REST
>> DSL.
>> >>> >>
>> >>> >> What would be the preferred way to do this from the community ?
>> >>> >>
>> >>> >> Personally I can see two ways to go.
>> >>> >>
>> >>> >> A) Add support in swagger codegen for generating Camel REST DSL (as
>> XML
>> >>> >> and/or Java). The con of this option is that after generating code
>> from
>> >>> >> swagger the resulting implementation will never expose a swagger
>> >>> definition
>> >>> >> that is exactly as the original. At least that is my experience from
>> >>> using
>> >>> >> codegen for other frameworks.
>> >>> >>
>> >>> >> B) Create a new Camel component that takes the Swagger definition
>> file
>> >>> and
>> >>> >> then acts as a dynamic router. It could be as simple as sending the
>> >>> message
>> >>> >> to an direct endpoint based on the resource "operationId".
>> >>> >> This new camel component could also expose a Swagger UI console
>> based
>> >>> on
>> >>> >> the original contract swagger definition instead of generating one
>> from
>> >>> >> REST DSL comments.
>> >>> >> The con here is obviously that it would create yet another REST
>> >>> component
>> >>> >> for camel.
>> >>> >>
>> >>> >>
>> >>> >> // Pontus
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > 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

Reply via email to