consistent JSON formatting of schemas?

Open
#4,072 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
json

Research direction

Start by reviewing the examples in issue #3102, the repository's JSON schema files, and CONTRIBUTING.md. Compare the proposed jq formatting with the current files and determine the formatting standard to adopt. Done means the schemas have consistent, review-friendly formatting and the standard is documented for contributors.

Written by the indexing model from the issue text.

Description

Bug Question
Description of the feature / enhancement.

Some of the issues (#3102 holding some examples) could potentially be addressed by an automated change that reads each schema, applies some fix, and writes it back out again. However, that kind of automated change is awkward to review if the round-trip results in a complete reformatting of the file, making the important part of the diff hard to see.

I may have missed something (I hope so) but ISTM that if all the JSON files were formatted in a consistent tooling-friendly way, then such changes would be straightforward.

As a straw man suggestion, how about running all the files through jq . ? Then a user can always do the same thing before committing.

If there is such a formatting standard in place, then perhaps it could be documented in https://github.com/SchemaStore/schemastore/blob/master/CONTRIBUTING.md.

Are you making a PR for this?

No, someone else must create the PR.

Dominant language
JavaScript
Stars
3.9k
Forks
2.4k
Avg merge
12h 34m
Merged PRs (30d)
134

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SchemaStore/schemastore

All issues in SchemaStore/schemastore

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.