Comments (3)
I'n entirely clueless as to what the root problem is in my schema file, however unless I'm doing it wrong I expected more information from a
-v/--verbose
This puts me in a difficult position with respect to answering your question or regarding it as resolved.
-v/--verbose
has significant impact on output in some cases, but not in others.
If schema validation encountered multiple errors, not all of them would be printed. But --verbose
enables full output of all errors.
Let me break down the error message for you a little bit to help:
/tmp/inventory.json::$: 'all', 'firewalls', 'not_set', 'routers', 'switches', 'ups', 'wlc' do not match any of the regexes: '^\w$', '_meta'
/tmp/inventory.json
is the instance being checked.::
is a delimiter$
is the JSON Path within the instance to the failing component.$
in JSON Path means "the root of the document":
is another delimiter- The rest of this is the message from the validation library, unmodified
a.'all', 'firewalls', 'not_set', 'routers', 'switches', 'ups', 'wlc' do not match any of the regexes
might indicate a failure to match patternProperties? I'm guessing without seeing the schema or instance
b.'^\\w$', '_meta'
these two strings are apparently regexes in your schema (again, I'm guessing patternProperties)
-v
or -vv
could be made to turn on other behaviors, and I'm open to suggestions. It's only really been tuned for a couple of use-cases thusfar.
The only constraint I'll note is that I don't think we want it to reformat the existing output -- it should only add new lines of output.
from check-jsonschema.
Thanks @sirosen I know this is not an appropriate place to ask for help in resolving the problem with my json or schema files. I just wanted to ensure that either:
A: I was invoking verbosity correctly or
B: That the flag was working at is should.
Not having any prior experience using the tool makes me a poor source of suggestions for really anything potential changes. So I guess in this case, if you believe that -v
is doing what it should then my question is solved, and now I just need to dig elsewhere.
from check-jsonschema.
Okay, I'm going to close this. If you continue using check-jsonschema
(and I hope you do!) and have ideas later for more output that you'd like from --verbose
, feel free to circle back with a new feature request. I'm always open to ideas.
If you're looking for a place to learn more about JSON Schema, you might want to visit the community Slack, which is very active. Spec maintainers often answer questions about how to structure schemas there.
There are also other validators you could try out to get another view of your schema and data. For example, there's a very cool fully in-browser one: https://json-everything.net/
(json-everything is made by one of the JSON Schema maintainers)
from check-jsonschema.
Related Issues (20)
- Support for `default.json` for `renovate` HOT 6
- Allow validating YAML with inline yaml-language-server comments HOT 2
- Allow optionally interpreting .json files as JSON5 HOT 4
- Failure resolving ref to anchor within same schema after v0.24.0 HOT 5
- Support new GitHub Actions Runner Scale Sets HOT 2
- Opening concurrent file handles for all instancefiles risks breaching OS limit. HOT 6
- Support ECMAScript unicode-mode RegExp usage for 'pattern' and 'patternProperties' HOT 3
- [BUG] `github-workflows-require-timeout.json`: `timeout-minutes` should allow expressions HOT 4
- Feature request: add line numbers to the output HOT 3
- Update vendored bitbucket schema HOT 1
- Feature request: add file names to the ouptut even if validation is OK HOT 3
- "unexpected keyword argument 'registry'" when validating specific GitHub workflow HOT 4
- Bug: Globs work in my machine but fails on CI HOT 3
- AttributeError not parsing schema correctly. HOT 2
- Cannot validate date-time via the CLI tool HOT 4
- Distribute the check-jsonschema tool in a manner which does not assume a Python environment
- Validation passes for misspelled optional child properties in Google Cloud Build schema HOT 7
- check-gitlab-ci: coverage is not a regex HOT 9
- Check yaml with check-metaschema option HOT 3
- Non-JSON files ignored despite --default-type being set HOT 4
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 check-jsonschema.