Can I use enunciate module to only display swagger UI? - jax-rs

I have a Java Spring-based RESTful API that uses enunciate for auto-generated documentation. I am upgrading from Enunciate 1.x to 2.8.0, and would like to stop using the base Enunciate documentation in favor of SwaggerUI ONLY.
Is there a way to suppress the base enunciate documentation and generate only the swagger docs?

Related

Java Bean Mapper Framework in Spring

I am planning to use MapStruct as Java Bean Mapper Library into my project. But before choosing this, I would like to see any such library is there in the Spring framework. I could not able to find such, Can anyone confirm do we have any such library? If not, is MapStruct is the good option to use along with other Spring Framework libraries?

Ballerina pdf library

I am a newbie in using Ballerina and like to generate pdf files on server side for providing it to the client. Is there a library or a smart way to do that in Ballerina?
Unfortunately Ballerina does not have a such module so far. It would be great if one could implement one and contribute to Ballerina Central.
You can use Ballerina interop to integrate with existing Java library. You can read more about Ballerina interop in this article

How to use swagger (swagger.yaml) to make API testing easier?

I am using swagger for documenting my API. Now I want to write python test for end to end testing of the api. How will swagger.yaml file help me in this process?
You can use Swagger Codegen to generate Python API client, which comes with test files.
Here are some examples of test files auto-generated by Swagger Codegen
https://github.com/swagger-api/swagger-codegen/tree/master/samples/client/petstore/python/test
Then you can update the test files with the actual tests you want to conduct.

Using Enunciate with Grails

I am creating Web APIs, in a RESTful manner. Grails of course has good support for creating REST web services. Enunciate claims to help in the API part, where things like documentation, client libraries, etc are important.
The purpose of this post is to invite experiences on using Enunciate with Grails, or ideas on how that can be done.
There are two main issues using them together:
Enunciate works with JAX-RS, not the native implementation of REST by Grails. Thankfully there's a JAX-RS plugin available, but am not sure if Enunciate will be able to work with it.
Grails domain classes are in Groovy while Enunciate works with Java
source code (example).
Enunciate works with both Java source code and Java compiled bytecode to do its work. But if you don't have Java source code, Enunciate won't be able to pull stuff out of your JavaDocs to enhance its generated documentation. Given that, there should (theoretically) be a way to apply Enunciate to compiled Groovy bytecode, but your docs won't be as rich because Enunciate won't be able to see your JavaDoc documentation. I say theoretically because I don't have any personal experience with it nor do I know how painful it is to pull off.
There is an open issue at ENUNCIATE-356 to investigate this complexity. Note that ENUNCIATE-356 depends on ENUNCIATE-584, which might get some more traction soon, being driven by ENUNCIATE-585 as we move from using APT (introduced in Java 5, deprecated in Java 7) to the Javac tool (introduced in Java 6). It would be interesting to know whether the Javac tool supports languages other than Java, in which case we'd get Groovy support for free.

Using Grails GORM standalone

I'm currently wondering how it is possible to use the Groovy ORM Layer from Grails standalone outside of the Grails Framework. There is a Documentation Entry for doing so, but the ZIP file only links to an empty page. I downloaded Grails 1.2-M3 but I couldn't find anything in the docs either.
Does anybody know what the current state is and how to accomplish this?
AFAIK it is possible to use GORM standalone since Grails 1.1.
This allows you to use GORM as your ORM without using the full Grails framework
However, I don't think it's possible to use GORM outside of Spring (which is the foundation on which Grails is built). To summarise:
You can use GORM without using Grails
You cannot use GORM without using Spring
A sample application demonstrating how to use GORM outside Grails is available here. If you want to browse the source code of this example in a browser (instead of checking it out from the SVN repository), start here.
As of Grails 2.3.6, GORM is officially supported as a standalone module. See the release notes for more details.