website icon indicating copy to clipboard operation
website copied to clipboard

Important Fix: Inconsistent JSON Schema Draft Sorting Causes Incorrect Tool Grouping and Filtering.

Open SHASHI9705 opened this issue 1 month ago • 1 comments

The JSON Schema Tooling page displays drafts in two different sorting orders, causing tools to appear in the wrong draft groups and making the draft filter inconsistent. This leads to incorrect data representation, misleading UI, and unexpected filtering behavior. Inside getStaticProps, drafts are sorted descending inside tools:

Image

Later, the same drafts are sorted ascending inside filterCriteria:

Image

Actual Behavior:

The draft list shown in the tools table is in descending order.The filter dropdown shows drafts in ascending order. This causes: 1)Tools appearing under the wrong draft group 2)Missing results when filtering 3)(Confusion because UI elements show different draft orders 4)Mismatch between the sidebar and the main table

Expected Behavior:

Drafts should be sorted once and in one consistent direction, ideally using DRAFT_ORDER as the single source of truth.

Suggested Fix

Apply one unified sorting strategy for drafts-e.g.: *Use DRAFT_ORDER as the canonical order *Sort both toolingData and filterCriteria.drafts the same way *Or centralize sorting into a shared helper function

SHASHI9705 avatar Nov 20 '25 17:11 SHASHI9705

@Utkarsh-123github I would like to work on this issue. Please review & assign it to me so that I can start working on the fix.

SHASHI9705 avatar Nov 20 '25 17:11 SHASHI9705