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