-
Notifications
You must be signed in to change notification settings - Fork 73
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
Allow to override nested array / maps properties #358
Comments
More specifically, it would be great if |
@sksamuel I'm willing to work on this, but I have no clue where to start. Is my approach outlined above even feasible to implement? |
I think your approach for map property source and cli property source are perfectly reasonable. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
While I didn't have time to work on this yet, I believe it still makes sense as a feature to add. |
Maybe by now https://github.com/eygraber/JsonPathKt could be leveraged... |
Not sure we even need that. Just need to take [n] and apply that to the list ? |
For lists you're probably right. But we basically have the same issue also for overriding values in a map. And there, in order to refer to the key's name in the map, maybe JsonPathKt would be helpful. |
For reference, Spring Boot does environment variable binding to object lists by the It'd probably be a good idea to implement the same in Hoplite for compatibility / consistency. Also, from https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html:
So while characters like It seems like JsonPathKt would be overkill / too complicated syntax for this use case. I'm not sure what you were thinking about for maps. I don't think Spring Boot supports that. That's not to say that Hoplite couldn't. Maybe the syntax for a map key could be double-underscore or something. |
I didn't have a concrete syntax in mind yet. I only know our requirement to be able to set |
I'd still be interested to override single properties within a list of a config read from a file via CLI options like that, without the need to declare "placeholder properties" that refer to environment variables. Is something like that supported by now?
Originally posted by @sschuberth in #144 (comment)
The text was updated successfully, but these errors were encountered: