Publishing a Compodoc Site to Nexus

Recently I have been looking at Compodoc for generating documentation sites for Angular projects. Some of these projects are for libraries that will be reused elsewhere, so this documentation requires to be published somewhere.

The libraries are published as NPM modules to a Sonatype Nexus instance, so it would be ideal if the documentation could be published to the same place.

» Continue reading

Selective Generation with Swagger Codegen

Swagger Codegen is a tool for generating server stubs and client SDKs for any API defined with an OpenAPI specification. This is particularly useful when you are following a spec-first API development approach.

When generating the stub code for the backend powering the API, it may not always be desirable to generate stubs for every endpoint in the same module. This will depend on the number of endpoints in your API definition, and your approach to the contents of deployed services (Microservices or otherwise). There does not appear to be a documented way to only generate stubs for some API paths using this tool. There does however appear to be an undocumented one.

» Continue reading

Git Commit Hooks for Branch Naming Using Pre-commit

In many organisations there are conventions on how Git branches should be named. As with all aspects of code quality, it is better to be able to identify these issues before they are pushed into version control.

There is not a hook that we can specifically use at the point that a branch is created, so the best we can do is ensure that commits are not made to the newly created branch.

» Continue reading