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

Dynamic provider config #93

Merged
merged 6 commits into from
Dec 8, 2024
Merged

Dynamic provider config #93

merged 6 commits into from
Dec 8, 2024

Conversation

sixlive
Copy link
Contributor

@sixlive sixlive commented Dec 8, 2024

Description

Closes #92

This PR adds support for overriding / updating the provider configuration on the fly. This is great for multi-tenant situations where users may bring their own API keys.

Prism::text()
    ->usingProviderConfig(['api_key' => '1234']);

Prism::structured()
    ->usingProviderConfig(['api_key' => '1234']);

These values are merged with the original provider config values so partial overrides are possible.

@sixlive sixlive self-assigned this Dec 8, 2024
Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for stunning-cannoli-238aa5 ready!

Name Link
🔨 Latest commit 5998d71
🔍 Latest deploy log https://app.netlify.com/sites/stunning-cannoli-238aa5/deploys/6756131613689c000839f138
😎 Deploy Preview https://deploy-preview-93--stunning-cannoli-238aa5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sixlive sixlive merged commit 32387ef into main Dec 8, 2024
10 checks passed
@sixlive sixlive deleted the dynamic-provider-config branch December 8, 2024 21:48
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.

Dynamic provider configs
1 participant