Monday, March 27, 2017

Re: GWT + Open API

Wow, awesome! Thank you, Ignacio, so much! You gave me a lot to
study! I need some time to look through it.


Best,
Irek

On 26.03.2017 22:45, Ignacio Baca Moreno-Torres wrote:
> I have applied my generator to the swagger petstore api, hehe it is
> pretty unstable, but after some NPE fixes and minor improvements I
> have generated the API Interface and models. Demo project
> here https://github.com/ibaca/petstore-client-gwt, uploaded with
> sourceMaps at https://ibaca.github.io/petstore-client-gwt/, ups, bud
> sadly github forces https but swagger petstore is not exposed in https
> so a mixed content exception is thrown. Just download locally and use
> 'mvn gwt:devmode' to try it out.
>
> On Saturday, March 25, 2017 at 8:57:29 PM UTC+1, Irek Szczesniak wrote:
>
> I'm preparing laboratory exercises for students, and we're using the
> Swagger's Pet Store:
>
> http://petstore.swagger.io/v2/swagger.json
> <http://petstore.swagger.io/v2/swagger.json>
>
> On 25.03.2017 09:46, Ignacio Baca Moreno-Torres wrote:
> > No :), just to see the complexity of the API and what happens if
> I add
> > it to my generator.
> >
> > On Friday, March 24, 2017 at 8:11:59 PM UTC+1, Irek Szczesniak
> wrote:
> >
> > It's public. Does it make some difference?
> >
> > On 23.03.2017 17:04, Ignacio Baca Moreno-Torres wrote:
> > > Just curious, the API is internal or external, the swagger
> spec is
> > > public?
> > >
> > >
> > > El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak
> > > <irek.sz...@gmail.com <javascript:>
> <mailto:irek.sz...@gmail.com
> > <javascript:>>> escribió:
> > >
> > > Thank you, Rogelio, for your input.
> > >
> > > I like the idea of generating the data model from the
> OpenAPI
> > > specification, because I will not have to write some
> boring
> > > error-prone code. I also like the optimization of the
> GWT
> > compiler.
> > >
> > > The swagger-codegen can output Jaxrs Cxf Client, which
> has
> > the API
> > > interface defined with JAX-RS annotations. So it
> seems that
> > even the
> > > interfaces could be auto-generated. You only have to
> modify
> > them so
> > > that they extend RestService, required by RestyGWT.
> > >
> > > Have you tried auto-generating the API interfaces with
> Jaxrs
> > Cxf
> > > Client?
> > >
> > > In your previous message you wrote that you
> auto-generate a GWT
> > > module. What do you specifically mean by a module
> here? Do
> > you use
> > > some publicly-available tools, or do you have something
> > home-grown?
> > >
> > > On 22.03.2017 23:51, Rogelio Flores wrote:
> > > > Yes, those are the Models I was referring to.
> > > >
> > > > I can't compare my approach to JsInterop +
> > > > RequestBuilder/XMLHttpRequest because I haven't
> tried it,
> > but having
> > > > used RequestBuilder (and direct XMLHttpRequest)
> before, I
> > can't see
> > > > how you will write less code using that approach. A
> > benefit of doing
> > > > things in Java is that GWT will optimize the resulting
> > javascript
> > > > (Java classes/methods from the generated api that don't
> > get used
> > > > aren't included).
> > > >
> > > >
> > > > On Tuesday, March 21, 2017 at 10:39:09 PM UTC-6, Irek
> > Szczesniak
> > > wrote:
> > > >
> > > > Thanks, Rogelio!
> > > >
> > > > When you auto-generate Java source code, do you use
> > > > swagger-codegen to
> > > > generate Java client code, so that you get Java
> classes
> > > implementing
> > > > the types from the OpenAPI #/definitions?
> > > >
> > > > On 21.03.2017 20:50, Rogelio Flores wrote:
> > > > > We do auto-generate Java source code out of the
> > swagger api
> > > > (including
> > > > > a GWT module). That allows us to use the
> Models on both
> > > client and
> > > > > server side. So we don't have to write much code.
> > > Basically all
> > > > we do
> > > > > is specify some options for RestyGWT and
> specify the
> > > endpoints.
> > > > >
> > > > > On Monday, March 20, 2017 at 11:32:41 PM
> UTC-6, Irek
> > > Szczesniak
> > > > wrote:
> > > > >
> > > > > Thank you, Rogelio, for your info.
> > > > >
> > > > > But I guess no code is generated
> automatically, you
> > > have to
> > > > > develop it
> > > > > yourself. Is this right?
> > > > >
> > > > > I'm not fully for code generation (such
> code is
> > usually
> > > > messy and
> > > > > hard
> > > > > to read), but generating some bits, like a
> model of
> > > the data
> > > > > structures could be useful.
> > > > >
> > > > > On 20.03.2017 18:24, Rogelio Flores wrote:
> > > > > > We use RestyGWT to consume a swagger
> REST API and
> > > are very
> > > > pleased
> > > > > > with it:
> > > > > >
> > > > > > https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>
> > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>>
> > > > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>
> > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>>>
> > > > > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>
> > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>>
> > > > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>
> > <https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>>>>
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Monday, March 20, 2017 at 7:06:08 AM
> UTC-6,
> > Irek
> > > > Szczesniak
> > > > > wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I need to develop a web client with
> GWT,
> > which
> > > > consumes a web
> > > > > > service defined with Open API (formerly
> > Swagger).
> > > > > >
> > > > > > I wonder whether someone could offer
> some
> > advice on
> > > > how to
> > > > > do it
> > > > > > best with GWT.
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > Irek
> > > > > >
> > > > > > --
> > > > > > You received this message because you are
> > subscribed
> > > to a
> > > > topic
> > > > > in the
> > > > > > Google Groups "GWT Users" group.
> > > > > > To unsubscribe from this topic, visit
> > > > > >
> > > > >
> > > >
> > >
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>
>
> >
> > > >
> > >
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>>
>
> >
> > > >
> > > > >
> > > >
> > >
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>
>
> >
> > > >
> > >
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>>>.
>
> >
> > > >
> > > > >
> > > > > > To unsubscribe from this group and all its
> > topics,
> > > send an
> > > > email to
> > > > > >
> > google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > > <javascript:> <javascript:>
> > > > > >
> > >
> <mailto:google-web-toolkit+unsubscribe@googlegroups.com <javascript:>
> > <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > > <javascript:>
> > > > > <javascript:>>.
> > > > > > To post to this group, send email to
> > > > > > google-we...@googlegroups.com
> > > <mailto:google-we...@googlegroups.com> <javascript:>
> > > > > > <mailto:google-we...@googlegroups.com
> > > <mailto:google-we...@googlegroups.com> <javascript:>>.
> > > > > > Visit this group at
> > > > >
> > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>
> > > >
> <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>>
> > > > >
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>
> > > >
> <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>>>.
> > > > > > For more options, visit
> > > https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>
> > > > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>>
> > > > > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>
> > > > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>>>.
> > > > >
> > > > > --
> > > > > You received this message because you are
> subscribed
> > to a
> > > topic
> > > > in the
> > > > > Google Groups "GWT Users" group.
> > > > > To unsubscribe from this topic, visit
> > > > >
> > > >
> > >
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>
>
> >
> > > >
> > >
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>>.
>
> >
> > > >
> > > > > To unsubscribe from this group and all its
> topics,
> > send an
> > > email to
> > > > >
> google-web-toolkit+unsubscribe@googlegroups.com <javascript:>
> > <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > <javascript:>
> > > > >
> > <mailto:google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > > <javascript:>>.
> > > > > To post to this group, send email to
> > > > > google-we...@googlegroups.com
> > > <mailto:google-we...@googlegroups.com> <javascript:>
> > > > > <mailto:google-we...@googlegroups.com
> > > <mailto:google-we...@googlegroups.com> <javascript:>>.
> > > > > Visit this group at
> > > >
> https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>
> > > >
> <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>>.
> > > > > For more options, visit
> > https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>
> > > > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>>.
> > > >
> > > > --
> > > > You received this message because you are subscribed
> to a
> > topic
> > > in the
> > > > Google Groups "GWT Users" group.
> > > > To unsubscribe from this topic, visit
> > > >
> > >
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>.
>
> >
> > > > To unsubscribe from this group and all its topics,
> send an
> > email to
> > > > google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > >
> <mailto:google-web-toolkit+unsubscribe@googlegroups.com <javascript:>
> > <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>>.
> > > > To post to this group, send email to
> > > > google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>
> > > > <mailto:google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>>.
> > > > Visit this group at
> > > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > > For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> > >
> > > --
> > > You received this message because you are subscribed
> to the
> > Google
> > > Groups "GWT Users" group.
> > > To unsubscribe from this group and stop receiving emails
> > from it,
> > > send an email to
> > google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>.
> > > To post to this group, send email to
> > > google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>.
> > > Visit this group at
> > > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> > >
> > > --
> > > You received this message because you are subscribed to a
> topic
> > in the
> > > Google Groups "GWT Users" group.
> > > To unsubscribe from this topic, visit
> > >
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>>.
>
> >
> > > To unsubscribe from this group and all its topics, send an
> email to
> > > google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:> <javascript:>
> > > <mailto:google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:>
> > <javascript:>>.
> > > To post to this group, send email to
> > > google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>.
> > > Visit this group at
> > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
> > To unsubscribe from this group and all its topics, send an email to
> > google-web-toolkit+unsubscribe@googlegroups.com <javascript:>
> > <mailto:google-web-toolkit+unsubscribe@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> > Visit this group at
> https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscribe@googlegroups.com
> <mailto:google-web-toolkit+unsubscribe@googlegroups.com>.
> To post to this group, send email to
> google-web-toolkit@googlegroups.com
> <mailto:google-web-toolkit@googlegroups.com>.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment