Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mheap/json-schema-spell-checker
This CLI allows you to provide a JSONPath expression and run mdspell against any matching lines.
https://github.com/mheap/json-schema-spell-checker
cli jsonpath openapi3 spellcheck
Last synced: 3 months ago
JSON representation
This CLI allows you to provide a JSONPath expression and run mdspell against any matching lines.
- Host: GitHub
- URL: https://github.com/mheap/json-schema-spell-checker
- Owner: mheap
- Created: 2019-12-10T21:03:06.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-16T10:17:23.000Z (7 months ago)
- Last Synced: 2024-10-03T11:19:55.300Z (4 months ago)
- Topics: cli, jsonpath, openapi3, spellcheck
- Language: JavaScript
- Homepage:
- Size: 996 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# json-schema-spell-checker
This CLI allows you to provide a JSONPath expression and run `mdspell` against any matching lines.
> This tool is currently in alpha and has primarily been tested against OpenAPI files. PRs are welcome!
## Installation
```bash
npm install -g json-schema-spell-checker
```## Usage
Check against specific field names at any depth:
```bash
json-schema-spell-checker -f 'description,title' /path/to/openapi.json
```Alternatively, you can specify a JSONPath expression yourself
```bash
json-schema-spell-checker -j "$..[description,title]" /path/to/openapi.json
```If you have words that aren't a spelling mistake but aren't in the dictionary, add them to a `.spelling` file (one word per line) in the current folder. Alternatively, you can provide a path with `-s`
```bash
json-schema-spell-checker -s /path/to/.spelling -f 'description,title' /path/to/openapi.json
```## Pre-commit hook
You can use this tool as a `pre-commit` hook by adding the following to your `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/mheap/json-schema-spell-checker
rev: # Use the ref you want to point at
hooks:
- id: json-schema-spell-checker
files: \.json$
```