Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 7f51e57

Browse files
committed
Schema for the impls data file, structured page
This does two things in preparation for showing more information on this page in a way that is easy to see when quickly skimming the list. It adds a schema (in yaml because it will get pulled in to the jekyll/liquid template in the future) which documents the current fields. It also makes the rendered form of the list more structured by giving each implementation a field list. I anticipate more fields as important information that is currently inconsistenlty reported in the notes gets pulled out, starting with the configuration compliance information in the next commit. This commit also fixes where the language-level notes were not being rendered correctly, and updates the draft list for ajv-cli because I happened to notice it was out of date. For hyper-schema, the updated layout is simpler because there is only one modern implementation anyway. The other was moved to obsolete following the similar recent moves of validators that have not followed through on draft-06 or newer support. The obsolete data files are supported by changing a handful of license values from arrays to strings, which display identically. Allowing arrays didn't seem worth the trouble since the modern file doesn't use them. I did not change the layout of the obsolete page because really we'd rather people not look at it at all. Also, one obsolete validator did not specify which draft it supported, but from the last modified date in the repo it must have been draft-03. At this point, I doubt it matters anyway.
1 parent bf7b5d9 commit 7f51e57

6 files changed

+186
-91
lines changed

_data/hyper-libraries-modern.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
- name: mokkabonna/json-hyper-schema
44
url: "https://github.com/mokkabonna/json-hyper-schema"
55
license: MIT
6+
date-draft: []
67
draft: [7]
7-
- name: Python
8-
implementations:
9-
- name: Core API Hyper-Schema codec
10-
url: "https://github.com/core-api/python-jsonhyperschema-codec"
11-
notes: "Draft-06+ progress: issue [12](https://github.com/core-api/python-jsonhyperschema-codec/issues/12)"
12-
draft: [4]
13-
license: BSD-2-Clause

_data/hyper-libraries-obsolete.yml

+9
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@
33
- name: Jsonary
44
url: "http://jsonary.com/"
55
license: MIT
6+
date-draft: []
67
draft: [4]
8+
- name: Python
9+
implementations:
10+
- name: Core API Hyper-Schema codec
11+
url: "https://github.com/core-api/python-jsonhyperschema-codec"
12+
notes: "Draft-06+ progress: issue [12](https://github.com/core-api/python-jsonhyperschema-codec/issues/12)"
13+
date-draft: []
14+
draft: [4]
15+
license: BSD-2-Clause

_data/schema.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
$id: https://json-schema.org/implementations/schema
3+
type: array
4+
items:
5+
$ref: "#/$defs/language"
6+
$defs:
7+
language:
8+
description: |
9+
A group of implementations grouped by programming language or
10+
runtime environment.
11+
type: object
12+
unevaluatedProperties: false
13+
required: [name]
14+
oneOf:
15+
- required: [implementations]
16+
- required: [notes]
17+
properties:
18+
name:
19+
type: string
20+
anchor-name:
21+
type: string
22+
description: A name suitable for us as an HTML id.
23+
implementations:
24+
description: |
25+
The list of implementations for this language/environment,
26+
sorted with those supporting the most recent
27+
drafts/versions first.
28+
type: array
29+
items:
30+
$ref: "#/$defs/implementation"
31+
notes:
32+
type: [string, "null"]
33+
implementation:
34+
description: |
35+
An implementation and its associated information.
36+
type: object
37+
unevaluatedProperties: false
38+
required: [name, url]
39+
anyOf:
40+
- required: [draft]
41+
- required: [date-draft]
42+
properties:
43+
name:
44+
description: The human-friendly name of the implementation
45+
type: string
46+
url:
47+
description: |
48+
The URL of the implementation's repository or documentation
49+
type: string
50+
format: uri
51+
draft:
52+
description: The supported drafts (up through draft-07)
53+
type: array
54+
items:
55+
type: integer
56+
enum: [1, 2, 3, 4, 6, 7]
57+
date-draft:
58+
description: The supported drafts (2019-09+)
59+
type: array
60+
items:
61+
type: string
62+
enum: [2019-09, 2020-12]
63+
license:
64+
description: |
65+
The software license under which the implementation
66+
is available
67+
type: string
68+
notes:
69+
description: |
70+
Additional information. Overly promotional (or critical)
71+
wording should be avoided.
72+
type: string

0 commit comments

Comments
 (0)