Skip to content

Commit

Permalink
Revisit command documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jun 3, 2024
1 parent 82e7f3e commit 3893ae7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
12 changes: 7 additions & 5 deletions docs/bundle.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ Bundling
jsonschema bundle <path/to/schema.json>
```

A schema may contain references to remote schemas located in other files or
even shared over the Internet. JSON Schema supports a standardized process,
referred to as
A schema may contain references to remote schemas outside the scope of the
given schema. These remote schemas may live in other files, or may be server by
others over the Internet. JSON Schema supports a standardized process, referred
to as
[bundling](https://json-schema.org/blog/posts/bundling-json-schema-compound-documents),
to resolve remote references in advance and inline them into the given schema.
The JSON Schema CLI supports this functionality through the `bundle` command.
to resolve remote references in advance and inline them into the given schema
for local consumption or further distribution. The JSON Schema CLI supports
this functionality through the `bundle` command.

Examples
--------
Expand Down
11 changes: 7 additions & 4 deletions docs/lint.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ jsonschema lint [schemas-or-directories...] [--fix|-f]
```

JSON Schema is a surprisingly expressive schema language. Like with traditional
programming languages, writing efficient and maintainable schemas take
experience, and there are lots of ways of doing it wrong. To help with this,
the JSON Schema CLI provides a `lint` command that can check your schemas
against various common anti-patterns and automatically fix many of them.
programming languages, writing efficient and maintainable schemas takes
experience, and there are lots of common pitfalls. Just like popular linters
like [ESLint](https://eslint.org),
[ClangTidy](https://clang.llvm.org/extra/clang-tidy/), and
[PyLint](https://www.pylint.org), the JSON Schema CLI provides a `lint` command
that can check your schemas against various common anti-patterns and
automatically fix many of them.

Examples
--------
Expand Down
6 changes: 4 additions & 2 deletions docs/test.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ jsonschema test [schemas-or-directories...]
```

Schemas are code. As such, you should run an automated unit testing suite
against them. The JSON Schema CLI provides a schema-oriented test runner
inspired by the [official JSON Schema test
against them. Just like popular test frameworks like [Jest](https://jestjs.io),
[GoogleTest](https://google.github.io/googletest/), and
[PyTest](https://docs.pytest.org), the JSON Schema CLI provides a
schema-oriented test runner inspired by the [official JSON Schema test
suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite).

Examples
Expand Down
4 changes: 2 additions & 2 deletions docs/validate.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ jsonschema validate <path/to/schema.json> <path/to/instance.json>
```

The most popular use case of JSON Schema is to validate JSON documents. The
JSON Schema CLI offers a `validate` command to do exactly that.
JSON Schema CLI offers a `validate` command to evaluate a JSON instance against
a JSON Schema, presenting human-friendly information on unsuccessful validation.

Examples
--------
Expand All @@ -16,4 +17,3 @@ Examples
```sh
jsonschema validate path/to/my/schema.json path/to/my/instance.json
```

0 comments on commit 3893ae7

Please sign in to comment.