Skip to content
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

Safe server variable names when used in Swift identifiers #351

Merged
merged 2 commits into from Oct 30, 2023

Conversation

czechboy0
Copy link
Collaborator

Motivation

In the original introduction of server variable support, we didn't properly safe the variable names coming from the OpenAPI document for use as Swift identifiers.

Modifications

Fix that by running the name server variable name, provided in the OpenAPI document, through the function that safes the string for use as a Swift identifier.

Result

Documents that use variable names like protocol compile again.

Test Plan

Adapted the tests.

@czechboy0 czechboy0 merged commit 6057654 into apple:main Oct 30, 2023
8 checks passed
@czechboy0 czechboy0 deleted the hd-safe-server-variables branch October 30, 2023 15:45
@czechboy0 czechboy0 added the semver/patch No public API change. label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants