Skip to content

fix(output-options): obey prefer-skip-optional-pointer in reference types + add tests for preferskipoptionalpointer #2021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2025

Conversation

jamietanna
Copy link
Member

No description provided.

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.
@jamietanna jamietanna requested a review from a team as a code owner July 15, 2025 09:52
@jamietanna jamietanna added bug Something isn't working chore Any maintenance tasks that are regular, not as important to call out in the changelog labels Jul 15, 2025
Copy link

Kusari Analysis Results

Analysis for commit: eb15466, performed at: 2025-07-15T09:53:01Z

@kusari-inspector rerun - Trigger a re-analysis of this PR

@kusari-inspector feedback [your message] - Send feedback to our AI and team


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,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jamietanna jamietanna merged commit f2bf249 into main Jul 15, 2025
37 checks passed
@jamietanna jamietanna deleted the tests/preferskipoptionalpointer branch July 15, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Any maintenance tasks that are regular, not as important to call out in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy