A Noob's Quest

A Head of Engineering Finally Learning Tech.

Generate a Go Server with JWT Authorisation using OpenAPI 3

2022-02-27 Go Programming jsfan
While the OpenAPI standard allows for defining JWT authorisation for endpoints, the Go server generator which is part of the OpenAPI Generator does not support that specification and will nto generate any JWT authorisation code. However, despite the generator having a few limitations, most of the code generation comes down to processing Mustache templates which can be exported and modified. This post will go through the process of creating templates which introduce selective JWT authorisation step by step. Continue reading