I love to code, I code for passion and then for work.
Lot of people asked me if, excluding money, it’s really interesting to work on an open source project. I found so interesting that I can do that for free and for a lot of reasons: increase skills, help the community, promote myself and work on code that I haven’t wrote!
Mixing the two things I said, Google Summer of Code is perfect for me!
As my project page says, my object is implement the api design driven development techniques inside vertx-web. Actually the first idea was to implement OpenAPI 2 (fka Swagger) and RAML, then this happened.
With OpenAPI 3 at horizon we decided to focus on it, because, as for Swagger 2, OpenAPI 3 have converters from old specification versions to newest one. As my mentor says, we are pioneers of OAS 3 😄. For OpenAPI 3 parsing, we decided to use Kaizen-OpenAPI-Parser and I often helped this new project with pull requests.
But I kept the idea to abstract as much as possible the router factory and the validation methods to enable future implementations of new api specification standards. I’ve also created an interface for users to validate HTTP requests without writing an api spec. Also, to complete my work, I wrote a lot of unit tests
At the end of implementation of validation and router factory for OAS 3, I wrote a lot of documentation and also a blog post on Eclipse Vert.x blog
After the first evaluation phase, I refactored the code splitting it in different maven packages. Then I started focusing on code generation: swagger-codegen doesn’t support for now OAS 3, and they don’t know when they will release OAS 3 support, so we decided to create our generator. Basing on my mentor’s project, I started creating the code generator. I’ve done huge changes from original project, to enable it to add different generators to same project and support different languages and package managers. I’ve also take advantage of this work to generate new unit tests for OAS 3 router factory and validation (with a tremendous first run 😢).
I’ve also done other pull requests to vertx-web complementary to my work. I added a method to get query parameters and I enabled
Route object to contain multiple handlers (like Express middlewares).
Before the end of the summer, I will give to Vert.x a set of classes for HTTP requests validation, OAS 3 support and a generator multi-purpose simple to extend with new templates.
In the next articles I’m going to discuss about all technical things about my project, stay tuned!