Comments (6)
My guess is that you need memberONE/memberTWO and reference to be at the same "depth".
i.e. both should have the member-config{} outer object or not.
from config.
yes, you are right;
https://github.com/barchart/barchart-inst/blob/master/barchart-inst-store-sql/src/test/java/typesafe/TestCheckValid1.java
but it seems highly counter-intuitive if you think of
final Config memberONE = reference.getConfig("member-config");
as extracted bean properties; what is the way to avoid redundant root object
https://github.com/barchart/barchart-inst/blob/master/barchart-inst-store-sql/src/test/java/typesafe/TestCheckValid1.java
?
from config.
I guess one answer would be:
"the bean should not check its own validity; checkValid should be done by whoever instantiates the bean"
but it does not sound right to me, when there are many places doing instantiation
from config.
current checkValid approach also seems to force use of redundant root to validate list members?
from config.
The normal case is assumed to be config.checkValid(reference, "something")
where config
and reference
were from say application.conf and reference.conf, and therefore would have the full paths to everything including "something"
. The sample lib in examples/ I think shows how the API is expected to be used.
In the latest version you can always use atPath("member-config") or atKey("member-config") to quickly wrap that full path around your config.
You can also solve this by just being consistent about doing the getConfig
on both sides of the operation; config.getConfig("member-config").checkValid(reference.getConfig("member-config"))
from config.
ok, got it;
-
atPath("member-config")
seems to be the best way to go -
config.getConfig("member-config").checkValid(reference.getConfig("member-config"))
is begging
for an alternative form of checkValid
from config.
Related Issues (20)
- Inefficient getDuration() parsing - Re-creation of Pattern
- Get the line/pos information from a ConfigObject HOT 1
- `ConfigFactory.parseResources()` overrides `ConfigParseOptions.setSyntax()`
- Is this project active? HOT 4
- Find a StackOverflowError in config
- Find a StackOverflowError in config
- Find a StackOverflowError in config HOT 1
- underscore characters HOT 2
- Problems with com.typesafe/config and maven-dependency-plugin
- introduce method accepting a list of Objects to add a value
- Should this project be explicitly considered as deprecated/not supported? HOT 29
- Community fork? HOT 7
- Resolving Variable Substitutions Between Multiple Config HOT 1
- Something error when use com.typesafe.config API convert conf file to scala bean class
- withFallBack is not adding value if not present
- how to load the config with substitution details HOT 3
- Add info about which signing keys will be used for published artifacts.
- Cannot provide environment variables programmatically
- Rendering partially resolved appended array results in invalid configuration HOT 1
- Inconsistent behavior with Overflow/Underflow and Exceptions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config.