Skip to content

[Generator] Generate server variables #348

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 2 commits into from
Oct 26, 2023

Conversation

czechboy0
Copy link
Contributor

Motivation

The generator side of #24. Depends on apple/swift-openapi-runtime#64 landing and getting released.

Modifications

See the file-based reference tests first to get a sense of how server variables work in templates. Most of this PR is test changes, plus slightly changed formatting of arrays, to put each item on new line for non-empty ones.

Result

Server variables are supported, allowing e.g. services that have enterprise versions to use the feature instead of having to hardcode the remote URL.

Test Plan

Adapted tests.

@czechboy0
Copy link
Contributor Author

The CI will fail until the runtime changes land and get released, just FYI.

@czechboy0 czechboy0 linked an issue Oct 26, 2023 that may be closed by this pull request
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

LGTM

@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Oct 26, 2023
@czechboy0 czechboy0 merged commit dfdbd72 into apple:main Oct 26, 2023
@czechboy0 czechboy0 deleted the hd-server-variables branch October 26, 2023 15:33
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.

Support variable generation and template expansion in serverURL
2 participants