Fix warning in generated server when no operations are included in the OpenAPI doc #190
Labels
area/generator
Affects: plugin, CLI, config file.
kind/bug
Feature doesn't work as expected.
size/S
Small task. (A couple of hours of work.)
It's legal to have no operations in the OpenAPI doc, e.g. just have schemas.
Today, when someone generates a serve with such a doc, they'll get a warning because the variable
server
isn't used in the generatedregisterHandlers
method.Let's fix it by only generating this initializer if there's at least one operation. Otherwise keep the method empty.
The text was updated successfully, but these errors were encountered: