Closed edyan closed 2 years ago
You're right. It may be resolved by f921986.
I've released 0.11.0 and it may resolve your issue as far as I tested. Could you please try that version?
hi, thanks for your reactivity. It seems that now I have a new problem : I have a certain amount of config files and a spec file to validate the concatenated files.
Exemple File a.yaml
---
services:
php:
enabled: false
environment: dev
file z.yaml
---
services:
php:
enabled: true
I say in my specs that I need to have "environment". And anyconfig tells me : - 'environment' is a required property
---
"$schema": http://json-schema.org/draft-04/schema#
type: object
required:
- environment
For your information I tried load()
and multiload
Thanks for your report!
Is the issue you reported resolved by the latest release? If so, I'll close this issue.
And could you please open another issue for new issue? I could not understand what is your expected behavior in the new issue so it would be great if you add explanation about that.
Hello, I am not sure it's another issue, I think it's linked as I didn't have that in the 0.10.1 when I load the yaml "manually"
conf = {}
for filepath in self.config_files:
yaml = anyconfig.load(filepath, Loader=FullLoader)
conf = _merge_dictionaries(conf, yaml)
Could you please open another issue even if it looks related or linked? I need to know the followings at least to fix your issues.
Hello,
I am trying to load multiple files with the
load
method I and noticed that the merge between them is not done properly. Instead of loading files in respect of the list, it sort the list then load it. Then if you load az.yaml
file then aa.yaml
file, the second is loaded first and overridden by the first (instead of the opposite).File
z.yaml
file
a.yaml
Command :
anyconfig_cli -T z.yaml a.yaml -O yaml
gives :This works with anyconfig 0.9.x but not with 0.10.x