Redocly / Redocly/redocly-cli

Consider upgrading to a conformant, maintained, JSON Schema implementation

Open
#1,229 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Idea
Dominant language
TypeScript
Stars
1.5k
Forks
228
Avg merge
1d 14h
Merged PRs (30d)
48

Description

ajv has long been the "go-to" json schema validation implementation but more recently it seems the maintainer has focused his efforts more so on his own variation of JSON validation, JTD (JSON Type Defition, https://datatracker.ietf.org/doc/rfc8927/)

There have been few updates to the JSON Schema validation capability since 2021 and more importantly, the support for 2020-12 is still lacking functionality. This capability is vital to the development of OpenAPI 3.1.x+ tooling like Redocly. One glaring bug has been open for two years which is directly related to how the OAS 3.1.x schema is written. ajv doesn't support validation of the OAS metaschema; it fails to resolve $dynamicRef. https://github.com/ajv-validator/ajv/issues/1573

JSON Schema has recently written an implementation test suite to verify the capability of different tools in respect to the specification. You can find more information about Bowtie, here. ajv, by far, is the worst offender of the test suite.

I'm not here to dictate which implementation should be used, other than recommending a validator that conforms closer to 100% of the JSON Schema test suite.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the repository's current ajv dependency and JSON Schema validation entry points, then compare its 2020-12 and $dynamicRef behavior with the Bowtie test suite and the linked OAS metaschema failure. Done means a maintained replacement or upgrade is selected and the relevant OpenAPI 3.1 validation behavior is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.