Skip to content

Fix server variables conflict #2045

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acm19
Copy link

@acm19 acm19 commented Jul 25, 2025

Adds a property to opt-in avoiding the default value colliding with the value default for enum server variables. When set to true Enum is added to the variable name so that it doesn't clash with the default variable name. This behaviour is opt-in to avoid backward compatibility, but the default is actually a bug, so it make sense to change that default in the next major release.

Resolves: #2003

@acm19 acm19 requested a review from a team as a code owner July 25, 2025 11:10
Copy link

kusari-inspector bot commented Jul 25, 2025

Kusari Analysis Results

Analysis for commit: cd507af, performed at: 2025-07-25T18:20: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!

@jamietanna
Copy link
Member

Nice, thank you!

Copy link
Member

Choose a reason for hiding this comment

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

Can we please revert the unrelated changes? Although those full stops at the end may be reasonable, I'd prefer to remove them from this PR to keep it atomic. Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Sure, that's done. I did leave a typo fix.

@acm19 acm19 force-pushed the fix-server-variables-conflict branch from 524b078 to 4b52cc6 Compare July 25, 2025 18:19
Copy link

Kusari PR Analysis rerun based on - 4b52cc6 performed at: 2025-07-25T18:19:32Z - link to updated analysis

Adds a property to opt-in avoiding the default value colliding with the
value `default` for enum server variables. When set to true `Enum` is
added to the variable name so that it doesn't clash with the default
variable name. This behaviour is opt-in to avoid backward compatibility,
but the default is actually a bug, so it make sense to change that
default in the next major release.

Resolves: oapi-codegen#2003
@acm19 acm19 force-pushed the fix-server-variables-conflict branch from 4b52cc6 to cd507af Compare July 25, 2025 18:20
Copy link

Kusari PR Analysis rerun based on - cd507af performed at: 2025-07-25T18:20:01Z - link to updated analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client Server URLs: support handling an enum with default as a value clashing with the default value constant
2 participants