Mojo Wonk Blog.

A semi-offical blog dedicated to the Mojolicious web framework

Day 7: MetaCPAN, Mojolicious and OpenAPI

Contract signing

During this years meta::hack 3, I was extremely fortunate to work with Joel Berger on integrating/documenting OpenAPI with the MetaCPAN API via Mojolicious.

What is it?

OpenAPI is a specification for designing, documenting, validating and driving your RESTful API. It can be used to provide documentation to an existing API, or when creating a new one.

The OpenAPI Specification originated as the Swagger specification and was renamed to separate the API description format (OpenAPI) from the open source tooling (Swagger). The specification moved into a new GitHub repository, but did not change.

In the case of the MetaCPAN API, we set out to provide documentation to the existing API, but quickly moved into supporting validation to API calls as well.

Continue reading Day 7: MetaCPAN, Mojolicious and OpenAPI...

Day 2: Automatic Reload for Rapid Development

Mojolicious art and reload icon, original artwork by Doug Bell

Developing webapps with Mojolicious is a lot of fun! Using the morbo server for development, every change to my webapp causes a restart to load my changes. This way the next request I make has all my new code!

So, I change my code, the webapp restarts, and I go back to my browser window. Wait... Where's my new code? Why isn't the bug fixed? Did... Did I forget to reload my browser window again? Ugh! Of course!

Does this happen to you? Probably not. But, it's still annoying to reload the browser window after every backend code change. It'd be nice if my browser window automatically reloaded every time the web server restarted!

Continue reading Day 2: Automatic Reload for Rapid Development...