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> > > > > > > > > > > > > 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>. > > > > > > > To unsubscribe from this group and all its topics, send an email > to > > > [email protected] <javascript:> > <javascript:> > > > <mailto:[email protected] > <javascript:> > > <javascript:>>. > > > To post to this group, send email to > > > [email protected] <javascript:> > > > <mailto:[email protected] <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 > > [email protected] <javascript:> > > <mailto:[email protected] <javascript:>>. > > To post to this group, send email to > > [email protected] <javascript:> > > <mailto:[email protected] <javascript:>>. > > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
