Swagger4Jaxrs 0.2 has been released

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Swagger4Jaxrs 0.2 has been released

aruizca
Dear all,

for all of you that prefer the JAXRS style to define your REST web services and use the JAXRS Grails plugin, you can now document and publish your APIs nicely with Swagger.

http://grails.org/plugin/swagger4jaxrs

Cheers,
Angel.
Reply | Threaded
Open this post in threaded view
|

RE: Swagger4Jaxrs 0.2 has been released

Jim Johnson

Team,

What are the advantages/disadvantages to the different implementations of RESTful interfaces between Grails out-of-the-box, JAX-RS plugin or Api Toolkit Plugin?

Thanks, Jim

 

Jim Johnson

770-851-1477

LinkedIn: http://www.linkedin.com/pub/james-johnson/2/a09/17a

 

From: Ángel Ruiz [mailto:[hidden email]]
Sent: Monday, March 24, 2014 6:55 PM
To: [hidden email]
Subject: [grails-user] Swagger4Jaxrs 0.2 has been released

 

Dear all,

for all of you that prefer the JAXRS style to define your REST web services and use the JAXRS Grails plugin, you can now document and publish your APIs nicely with Swagger.

http://grails.org/plugin/swagger4jaxrs

Cheers,
Angel.

Reply | Threaded
Open this post in threaded view
|

Re: Swagger4Jaxrs 0.2 has been released

aruizca
Hi Jim,

I think it is just a matter of preferences. Coming from the Java EE world I was already familiar with Spring MVC annotations and JAXRS annotations for REST web services. When I started with Grails  there was not out of the box support for REST so I used what I knew and has already been a mature and proven technology in the Java world

When I knew about the incoming Grails 2.3 REST support, I tried to convince Graeme Rocher to support annotation driven REST API definition as well (check here and here), because I don't like the centralized and programmatic way of defining REST APIs that Grails 2.3 provides inside the URLMappings.groovy. Like me, there are many others that consider REST APIs should be expressed as metadata, inline with your controllers. And annotations are an awesome way of doing it. Graeme did not agree and consider it "nasty" because there are no separation of concerns. IMO they are the same concerns. On the other hand,in the new Grails 2.3 you can pretty much publish a domain class as a REST WS. That IMHO, is the opposite to separation of concerns. it is the overlapping of concerns :-)

If you check this mailing list, most of the messages regarding Grails 2.3 are about REST. Why? IMO is because the wheel has been reinvented and it requires time to mature. On the other hand you have Java EE standards like JAXRS or defacto standards like Spring MVC that have a very mature REST implementation support.

When it comes to REST in Grails, I have used the JAXRS Grails plugin to implement REST services with no issues whatsoever. So I just created this swagger4jaxrs plugin to add a little bit of candy coating to present your REST APIs nicely.

Having choices is a good thing :-)

Cheers,
Angel.



On 25 March 2014 10:26, Jim Johnson <[hidden email]> wrote:

Team,

What are the advantages/disadvantages to the different implementations of RESTful interfaces between Grails out-of-the-box, JAX-RS plugin or Api Toolkit Plugin?

Thanks, Jim

 

Jim Johnson

<a href="tel:770-851-1477" value="+17708511477" target="_blank">770-851-1477

LinkedIn: http://www.linkedin.com/pub/james-johnson/2/a09/17a

 

From: Ángel Ruiz [mailto:[hidden email]]
Sent: Monday, March 24, 2014 6:55 PM
To: [hidden email]
Subject: [grails-user] Swagger4Jaxrs 0.2 has been released

 

Dear all,

for all of you that prefer the JAXRS style to define your REST web services and use the JAXRS Grails plugin, you can now document and publish your APIs nicely with Swagger.

http://grails.org/plugin/swagger4jaxrs

Cheers,
Angel.


Reply | Threaded
Open this post in threaded view
|

Re: Swagger4Jaxrs 0.2 has been released

arcseldon
Hi Angel / Jim,

Please let me clarify my position towards Grails 2.3.x REST since I have generated a number of the mailing list items.

Using core Grails 2.3.x REST features (no REST plugins) has been an excellent decision. Have worked with Java since version 1, and most of the core Java libraries since inception. The point of stating that is to just to provide some context. Have spent times cursing Grails and the automagical stuff when it falls over, the stack traces and debugger can be cryptic at times, and definitely the familiarity with knowing the solutions in several other languages has led to some impatience. But.. the results speak for themselves.

Within one month of picking up Grails for the first time, we have deployed several MicroServices to Production. Not noddy, hello world type services. Full, enterprise strength REST services - some heavily customised internally with logic in Services (rather than simply 101 CRUD type ops). Baked in security, etc. At present, one of our endpoints is now well over 1000,000 hits per day supporting internally all Bid requests for products on behalf of an online shopping price comparison site. We have had zero support issues to date.

To re-iterate - the functional and non-functional requirements, using Core Grails 2.3.x REST features, have more than adequately addressed our requirements. 

And now we have ironed out some initial misunderstandings in usage, cookie cutting further micro-services is becoming almost trivially easy to do. Have just handed over some work to a junior developer to add further Endpoints based on what is already written.

The real issue here has been:

— New to Grails so definitely some ignorance creeps in
— A clear lack of documentation on features beyond hello world type situations, 
— and more importantly, no real world type sample applications or books that lay out the blue print for how it works. With that, we could have done the RESTful part of the development work in the space of hours not days.

Yes, there are surely some more bugs out there, but the core REST features are still quite immature relative to the overall Grails offering. Would also state that there are features to be avoided with Core Grails 2.3.x (and no plugin support) - but it is still a learning process for us so will only list examples once the project is completed.

If you are interested in knowing specifics on REST adoption, feel free to contact me directly offline.

Best regards,









On 25 Mar 2014, at 09:24, Ángel Ruiz <[hidden email]> wrote:

Hi Jim,

I think it is just a matter of preferences. Coming from the Java EE world I was already familiar with Spring MVC annotations and JAXRS annotations for REST web services. When I started with Grails  there was not out of the box support for REST so I used what I knew and has already been a mature and proven technology in the Java world

When I knew about the incoming Grails 2.3 REST support, I tried to convince Graeme Rocher to support annotation driven REST API definition as well (check here and here), because I don't like the centralized and programmatic way of defining REST APIs that Grails 2.3 provides inside the URLMappings.groovy. Like me, there are many others that consider REST APIs should be expressed as metadata, inline with your controllers. And annotations are an awesome way of doing it. Graeme did not agree and consider it "nasty" because there are no separation of concerns. IMO they are the same concerns. On the other hand,in the new Grails 2.3 you can pretty much publish a domain class as a REST WS. That IMHO, is the opposite to separation of concerns. it is the overlapping of concerns :-)

If you check this mailing list, most of the messages regarding Grails 2.3 are about REST. Why? IMO is because the wheel has been reinvented and it requires time to mature. On the other hand you have Java EE standards like JAXRS or defacto standards like Spring MVC that have a very mature REST implementation support.

When it comes to REST in Grails, I have used the JAXRS Grails plugin to implement REST services with no issues whatsoever. So I just created this swagger4jaxrs plugin to add a little bit of candy coating to present your REST APIs nicely.

Having choices is a good thing :-)

Cheers,
Angel.



On 25 March 2014 10:26, Jim Johnson <[hidden email]> wrote:

Team,

What are the advantages/disadvantages to the different implementations of RESTful interfaces between Grails out-of-the-box, JAX-RS plugin or Api Toolkit Plugin?

Thanks, Jim

 

Jim Johnson

<a href="tel:770-851-1477" value="+17708511477" target="_blank">770-851-1477

LinkedIn: http://www.linkedin.com/pub/james-johnson/2/a09/17a

 

From: Ángel Ruiz [mailto:[hidden email]]
Sent: Monday, March 24, 2014 6:55 PM
To: [hidden email]
Subject: [grails-user] Swagger4Jaxrs 0.2 has been released

 

Dear all,

for all of you that prefer the JAXRS style to define your REST web services and use the JAXRS Grails plugin, you can now document and publish your APIs nicely with Swagger.

http://grails.org/plugin/swagger4jaxrs

Cheers,
Angel.



Reply | Threaded
Open this post in threaded view
|

Re: Swagger4Jaxrs 0.2 has been released

Owen Rubel
In reply to this post by Jim Johnson
Api Toolkit allows Roles/privileges to be places on your api and your data thus allowing one method to return different datasets upon call to the api and to SHOW different datasets to the apidocs/OPTIONS based upon role/privilege.

The api toolkit also uses a common api object so you can transform your ORM object, SQL, command object, file stream, external api calls, etc into one common dataset associated with the URI rather that having 'links' be the common denominator. This allows you to validate incoming requests and outgoing responses for each uri on the api object.

And as the URIs request/response calls are associated with a common api object, you can also easily chain them to each other using api chaining thus using one request call to chain multiple api calls. This reduces api traffic on your network easily by 50% and simplifies and reduces client calls.

The api toolkit also has webhooks, simplifies api generation and alot more.

Owen Rubel
415-971-0976
[hidden email]


On Mon, Mar 24, 2014 at 4:26 PM, Jim Johnson <[hidden email]> wrote:

Team,

What are the advantages/disadvantages to the different implementations of RESTful interfaces between Grails out-of-the-box, JAX-RS plugin or Api Toolkit Plugin?

Thanks, Jim

 

Jim Johnson

<a href="tel:770-851-1477" value="+17708511477" target="_blank">770-851-1477

LinkedIn: http://www.linkedin.com/pub/james-johnson/2/a09/17a

 

From: Ángel Ruiz [mailto:[hidden email]]
Sent: Monday, March 24, 2014 6:55 PM
To: [hidden email]
Subject: [grails-user] Swagger4Jaxrs 0.2 has been released

 

Dear all,

for all of you that prefer the JAXRS style to define your REST web services and use the JAXRS Grails plugin, you can now document and publish your APIs nicely with Swagger.

http://grails.org/plugin/swagger4jaxrs

Cheers,
Angel.