[PROPOSAL] Use JSON Schema
- Dominant language
- Go
- Stars
- 43
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Add a new flag `--schema`
```console
pimo --schema file://schema.json
```
With regard to the [JSON Schema Specification](https://json-schema.org/), PIMO can
- enforce that every JSON Line in the input stream respect the schema (log an error and fail, or log a warning and skip if `--skip-line-on-error`)
- re-order fields in the output stream, in the same order they are defined in the schema
Some Go librairies that implement the JSON Schema specification : https://json-schema.org/implementations.html#validator-go
Contributor guide
Research direction
The issue proposes a new `--schema` CLI flag that accepts a `file://` JSON Schema. Start by locating the command-line option handling and reviewing the JSON Schema Specification and available Go libraries. Done means validating each JSON Line, honoring `--skip-line-on-error`, and ordering output fields as defined by the schema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, json
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100