Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Libs(Go): template overrides for nullable non-required containers (#1450
) In #1448 the `EndpointIn` model was hand-edited such that `channels` and `filterTypes` were nullable, and thus correctly omitted from request bodies sent to the server. This series of commits attempts to remove the need to keep reapplying this patch with each spec bump by updating the codegen template used to produce the model code. This change is comprised of 3 commits: 1. the addition of a template override for `model_simple` ([src](https://github.com/OpenAPITools/openapi-generator/blob/v5.2.0/modules/openapi-generator/src/main/resources/go/model_simple.mustache)) as-is, taken from openapi at the v5.2.0 tag (matching the version of the generator we're using currently). 2. some modifications to said template, i.e. _our patch_. 3. updated go sources from running the generator. When reviewing the template, it'll therefore be useful to go commit by commit so you can see the diff applied against the upstream. This change has widespread impact as many models are changing. I'm still trying to figure out how we can prove everything is kosher and not causing accidental breakage. Open to ideas 🤔 Existing tests are passing, and everything typechecks, so at the very least the codegen output is self-consistent.
- Loading branch information