Comments (10)
Not having format checkers present when the required dependencies aren't satisfied doesn't bother me that much. If anything we could improve the documentation if you think there's something there that could be clearer. We could perhaps more prominently discuss the attribute on format checkers that contains all the known checkers, which is public and could be used to inspect the available checkers.
Putting all the format checkers in the class though is fine with me if we have a reasonable way of doing that.
Since this is mostly for our own sanity this is pretty low priority I'm guessing.
from jsonschema.
Since this is mostly for our own sanity this is pretty low priority I'm guessing.
My goal was so that an user can instantiate a FormatChecker
with the subset of properties they desire. Right now you can't do FormatChecker(formats=('time', 'email'))
because 'time' checker is just in the draft3_format_checker
instance, not on the class.
I'll have another go at doing this.
from jsonschema.
What do you think about something like this? gazpachoking@b0a694f
from jsonschema.
Or maybe _checks_drafts
should be usable like @_checks_drafts("email", raises=blah)
for checkers on both drafts, and @_checks_drafts(draft3="ip-address", draft4="ipv4", raises=blah)
for checkers on draft 3 only or when the name differs.
from jsonschema.
Um, I'm OK with that.
from jsonschema.
You sound hesitant...
from jsonschema.
:) nah. We should document the canonical names for the format checkers.
Other than that I'm not hesitant, just not particularly excited :p.
On Apr 11, 2013 9:08 AM, "Chase Sterling" [email protected] wrote:
You sound hesitant...
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-16233127
.
from jsonschema.
The way I have it now puts both names onto the class, should it only add the canonical name? That might complicated things a bit.
BTW, do you prefer _checks_drafts
like I have it, or the keyword idea?
from jsonschema.
Slight preference for the keyword way, but it's private so I don't really
care either way too strongly.
And yeah I saw both names are going to be on the class, but we should have
a table somewhere in the documentation where we mention format validation
and that table should list a single name for simplicity I think.
On Apr 11, 2013 9:16 AM, "Chase Sterling" [email protected] wrote:
The way I have it now puts both names onto the class, should it only add
the canonical name? That might complicated things a bit.BTW, do you prefer _checks_drafts like I have it, or the keyword idea?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-16233571
.
from jsonschema.
Sounds good.
from jsonschema.
Related Issues (20)
- Issue with oneOf validation HOT 6
- Unable to resolve a realtive `$ref` from a schema with `$id` pointed to a subschema in `$defs` with `$id` HOT 2
- Self referenced schema encapsulation breaks reference resolution HOT 1
- jsonschema.TypeChecker with additional types fails to work after several reference resolutions by the referencing.Registry HOT 2
- validate fails to identify incorrect uuid strings HOT 3
- 'Tuple' arrays not handled correctly HOT 3
- validate() throwing exception for a valid schema HOT 1
- Draft7Validator(TyperError: create.<locals>.Validator.__init__() got an unexpected keyword argument 'registry' HOT 2
- Which is the last version not requiring Rust via its dependencies?
- Migrating From RefResolver, unable to resolve $ref
- Feature request: Add support for a second message attribute on errors which is guaranteed not to include the failing instance HOT 5
- Python NaN validates against all numeric limits, and shouldn't HOT 2
- validating nan in an enum is no longer supported HOT 1
- Need a custom ref resolver
- Support custom Registry for meta schema in check_schema HOT 4
- `"format":"date-time"` not working HOT 6
- The latest version is slower than 3.2.0 validator HOT 5
- Validation error messages changed after upgrading jsonschema version from 3.2.0 to 4.21.1 HOT 5
- multipleOf fails to validate that 4.02 is a multiple of 0.01 due to floating point math HOT 1
- Unexpected KeyError while running test suite inside GitLab Worker 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 jsonschema.