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

feat(openapi): add support for server variables #962

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

Conversation

cristicbz
Copy link

@cristicbz cristicbz commented Feb 6, 2025

Add support for server variables like:

            .server(
                ServerObject::new("https://{environment}.example.com/{organization}/{tenant}/api/v1")
                .enum_variable(
                    "environment",
                    "The environment to call (e.g. alpha).",
                    "alpha",
                    vec!["alpha", "staging", "cloud"],
                )
                .variable(
                    "organization",
                    "Organization name or UUID",
                    "00000000-0000-0000-0000-000000000000",
                )
                .variable(
                    "tenant",
                    "Tenant name or UUID",
                    "00000000-0000-0000-0000-000000000000",
                )
            )

I didn't find a very natural place to add tests for this, please let me know if there is a good place to do so.

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.

1 participant