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

Question marks in key names no longer valid? #456

Open
camerondrysdale opened this issue Apr 3, 2023 · 0 comments
Open

Question marks in key names no longer valid? #456

camerondrysdale opened this issue Apr 3, 2023 · 0 comments

Comments

@camerondrysdale
Copy link

camerondrysdale commented Apr 3, 2023

We use the Config gem: https://github.com/rubyconfig/config for our Rails application and validate using Dry Schema.

We've recently updated the gem to the latest version and noticed that keys with question marks in them like this:

required(:s3_uploads?).filled(:bool?)

Now raise the error:

s3_uploads?: is missing

Even though we have this key in our Settings.yml like this:

s3_uploads?: true

In order to fix this, we've had to remove the ? from all our keys that contain them so it becomes just s3_uploads, which looks to have all resolved the validation errors we were seeing, but has also meant we've had to update all the uses of Settings.s3_uploads? in our code as well... and we preferred to have the ? for the booleans to be inline with similar Ruby methods.

Has something changed in Dry Schema that means ? are not valid keys anymore?

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

No branches or pull requests

1 participant