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

parse JSON string resolved from kvr #79

Closed
wants to merge 1 commit into from
Closed

Conversation

Eskibear
Copy link
Member

@Eskibear Eskibear commented Jul 4, 2024

fix #78

Now if a JSON string is stored in Key Vault with content type "application/json", it will be loaded as parsed object instead of a raw string.

@@ -5,12 +5,11 @@ import { ConfigurationSetting } from "@azure/app-configuration";
export interface IKeyValueAdapter {
/**
* Determine whether the adapter applies to a configuration setting.
* Note: A setting is expected to be processed by at most one adapter.
Copy link
Member Author

Choose a reason for hiding this comment

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

@avanigupta
Here the use case is to store some correlated configs altogether into an object and JSON.stringify it. Maybe for some security reason, put it into a key vault, marking it as application/json. For JavaScript developers it looks a valid case. We should auto-parse it as we see the content type.

In dotnet, only one key value adapter would process a setting. But here to support the case, we should remove the constraints. The adapters should work like pipeline processors. We can rename it if you feel strange about the name "adapter".

@Eskibear Eskibear closed this Jul 19, 2024
@zhiyuanliang-ms zhiyuanliang-ms deleted the yanzh/fix-json-from-kvr branch February 22, 2025 12:59
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.

"application/json" content type is not handled in KeyVault references
1 participant