fix(output-options): obey prefer-skip-optional-pointer in reference types + add tests for preferskipoptionalpointer#2021
Conversation
As part of a future change, we're adding the Output Option `prefer-skip-optional-pointer-with-omitzero`. As part of this, we want to make sure that the existing behaviour, with the `omitempty` default, works as expected.
This builds on top of the previous commit's fix to ensure that it gets generated correctly.
Kusari Analysis ResultsAnalysis for commit: eb15466, performed at: 2025-07-15T09:53:01Z • • Recommendation✅ PROCEED with this Pull Request Summary✅ No Flagged Issues Detected All values appear to be within acceptable risk parameters. No pinned version dependency changes, code issues or exposed secrets detected! Found this helpful? Give it a 👍 or 👎 reaction! |
| Description: schema.Description, | ||
| DefineViaAlias: true, | ||
| OAPISchema: schema, | ||
| SkipOptionalPointer: globalState.options.OutputOptions.PreferSkipOptionalPointer, |
There was a problem hiding this comment.
There seem to be a couple of other places that Schemas are constructed without this being set, but - as far as I can see from some initial testing - it's not straightforward to trigger that codepath from examples/output-options/preferskipoptionalpointer to validate them
No description provided.