Consider not generating empty input/output structs (e.g. paths, query, etc) #229
Labels
area/generator
Affects: plugin, CLI, config file.
kind/enhancement
Improvements to existing feature.
Milestone
Consider not generating empty input/output structs (e.g. paths, query, etc).
Today, we generate them all, even when they're empty.
To try to see impact of not doing so on real-world docs, I prototyped a version of the generator that skips those empty structs on my fork (diff).
The result: it removes about 10% of the code of GitHub's OpenAPI document, about 50k LOC.
Saving lines of code is a nice benefit, but I actually find that the code is more readable as well, and code completion guides you better (as you can see which containers have some parameters, whereas today you can't).
Opening this issue to start the discussion, happy to take this through a proposal if there are varying views.
The text was updated successfully, but these errors were encountered: