Closed svix-onelson closed 1 month ago
It'd be great to have some basic tests before merging this / confirmation that they're passing. They don't need to be wired into CI now, but just having some that can be run manually would be a good starting point.
It'd be great to have some basic tests before merging this / confirmation that they're passing. They don't need to be wired into CI now, but just having some that can be run manually would be a good starting point.
I raised https://github.com/svix/svix-webhooks/pull/1452 which will run any Go tests for this in CI.
Will need to add more tests to cover the 27 model sources impacted, and like you suggested, they may need to be skipped in CI until we get the infra side of this figured out.
It'll take me a minute to get that going. In the meantime, #1452 should de-risk an accidental revert of the hand-edit for EndpointIn
.
So do you want this merged now, or hold off?
So do you want this merged now, or hold off?
Hold off.
In #1448 the
EndpointIn
model was hand-edited such thatchannels
andfilterTypes
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:
model_simple
(src) as-is, taken from openapi at the v5.2.0 tag (matching the version of the generator we're using currently).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.