Comments (7)
@Marahin Alright. Sounds plausible.
from json_schemer.
IMHO with Ruby 3 just a few months to go, let’s nudge people towards using newer Ruby versions.
Why? Why forcing people to update their well-working scripts, gems, programs would be the way to go?
Ruby is an open-minded community, and while Ruby 3 is great, I think forcing anybody to upgrade their Ruby version solely because there's a newer one is a harmful approach.
Ruby version requirement should be dictated by the need of the language functionalities, as bundler.io suggests:
Like gems, developers can setup a dependency on Ruby. This makes your app fail faster in case you depend on specific features in a Ruby VM. (...)
So, in my understanding, unless json_schemer specifically needs features that are not present in Ruby 2.4, it shouldn't be specified as a dependency.
New applications should indeed be written in the highest Ruby versions possible, but please allow users that already have their use-cases covered to have their application still working without having to upgrade everything just so they can validate their JSON inputs.
// EDIT: added linkage and quotation to bundler.io
from json_schemer.
Merged 2.4 support and released in 0.2.14.
from json_schemer.
IMHO with Ruby 3 just a few months to go, let’s nudge people towards using newer Ruby versions.
from json_schemer.
we would love to use this gem to validate JSON payloads on-failure in our gem, jsonapi_parameters.
Sounds great!
and, the third scenario is: reaching out and asking whether its possible (and if not - what is the reason for this decision) to remove the constraint in json_schemer that enforces Ruby versions above 2.4.0. This is the path that we decided to choose first.
I originally enforced Ruby 2.5 because 2.4 is EOL and I'd like to use some of the features in 2.5. Would it work for you to pin your dependency on an older version of the gem? I believe 0.2.11 works on Ruby 2.4. In fact, bundler should pick up that version when running on 2.4.
from json_schemer.
@davishmcclurg indeed we could pin down to the version before the Ruby 2.5 dependency was introduced, but this way we are giving up on the new features, fixes and changes in your library, such as more precise errors: #1
So while this would indeed allow us to include and use json_schemer, it:
- creates another issue (what about new features? We are locking ourselves to one specific version),
- already by the time its introduced will be outdated
I'd like to use some of the features in 2.5
This is a super valid point, but are there any features that json_schemer is making use of right now? If yes, then this indeed discards our request and is a great argument behind setting this dependency up.
from json_schemer.
This is a super valid point, but are there any features that json_schemer is making use of right now?
I think you're right that there aren't any. I was thinking of some things I changed when I dropped 2.3.
but this way we are giving up on the new features, fixes and changes in your library, such as more precise errors: #1
That's true. I'm open to supporting 2.4 again since it shouldn't require any other changes. How long do you plan to support it? I don't have a good sense for people's expectations on these types of things.
Please open a PR with the changes, if you can.
from json_schemer.
Related Issues (20)
- Number validation with multipleOf: 0.01 is giving false positive errors HOT 1
- Ecma 262 Validation for patterns HOT 1
- URI Escaping Error HOT 3
- tab space in json message validation fails HOT 2
- Type array validation always returning false with extra options
- array not required returns the message: "1 item required; only 0 were given" in the json schema HOT 2
- Add support for Draft 2020-12 HOT 1
- Can the gem put some short and readable validation result? HOT 4
- JSON pointers: "/" and "~" are not escaped HOT 1
- Non-string data keys HOT 10
- Regression in ref resolution for local nesting HOT 3
- InvalidFileURI "cannot have a host" on Windows HOT 4
- JRuby/Windows regex test failure
- Add support for symbolized keys HOT 3
- If, then, else keywords HOT 1
- Validate Only Works When Errors Exist HOT 1
- insert_property_defaults does not work for nested schemas (eg. oneOf) HOT 2
- Add CLI support HOT 1
- Bug: `anyOf` and `oneOf` handle the absence of `type` on subschemas differently HOT 3
- Missing require for stdlib class Set HOT 3
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 json_schemer.