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

Support custom Json serde for SecretsManager #423

Merged
merged 8 commits into from
Sep 16, 2024

Conversation

samu-developments
Copy link
Contributor

Thanks for this great library!

We had a use case where we needed to deserialize a json with a number value (not a quoted number string) from AWS secretsmanager, eg:

{
  "port": 5432,
  "username": "test",
  ...
}

To do this one need to set the isLenient field to true in Json builder:

val json = Json { 
  isLenient = true 
}

This PR adds Json as a constructor parameter to AwsSecretsManagerPreprocessor to support custom json serde config. Let me know what you think.

(In the end we just added our own custom preprocessor, which also works fine)

@samu-developments samu-developments mentioned this pull request Jul 26, 2024
Copy link
Owner

@sksamuel sksamuel left a comment

Choose a reason for hiding this comment

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

see comment

@sksamuel
Copy link
Owner

sksamuel commented Aug 5, 2024

Couple of test failures. Will merge once green.

@samu-developments
Copy link
Contributor Author

Couple of test failures. Will merge once green.

Local tests were loading region from local config, works now. Thank you!

@sksamuel sksamuel merged commit 40182da into sksamuel:master Sep 16, 2024
1 check passed
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.

2 participants