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

Commit ebdd0b5

Browse files
committed
Add built-on field
Some implementations, particularly but not exclusively CLI and web ones, are implemented on top of other validator libraries. This adds a structured field to account for that, and updates all known cases where it is relevant. It was necessary to also support an anchor-name field for implementations as with programming languages, and in the process disambiguate a few duplicate names.
1 parent f6158ef commit ebdd0b5

File tree

3 files changed

+74
-17
lines changed

3 files changed

+74
-17
lines changed

_data/schema.yml

+33-8
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,8 @@ $defs:
3131
oneOf:
3232
- required: [implementations]
3333
- required: [notes]
34+
$ref: "#/$defs/name-and-anchor-name"
3435
properties:
35-
name:
36-
type: string
37-
anchor-name:
38-
type: string
39-
description: A name suitable for us as an HTML id.
4036
implementations:
4137
description: |
4238
The list of implementations for this language/environment,
@@ -55,6 +51,30 @@ $defs:
5551
required: [last-updated]
5652
notes:
5753
type: [string, "null"]
54+
name-and-anchor-name:
55+
$comment: |
56+
Require an anchor-name if the name is not suitable for
57+
use as an anchor (HTML id attribute)
58+
if:
59+
required: [name]
60+
not:
61+
properties:
62+
name:
63+
$ref: "#/$defs/anchor-name"
64+
then:
65+
required: [anchor-name]
66+
properties:
67+
name:
68+
type: string
69+
anchor-name:
70+
$ref: "#/$defs/anchor-name"
71+
anchor-name:
72+
description: |
73+
A name suitable for us as an HTML id, if the regular name
74+
is not a vald id. The regex is looser than the HTML spec
75+
but is based on what was already working on the page.
76+
type: string
77+
pattern: '^[A-Za-z][A-Za-z0-9+-_:./ ()]*$'
5878
implementation:
5979
description: |
6080
An implementation and its associated information.
@@ -64,10 +84,8 @@ $defs:
6484
anyOf:
6585
- required: [draft]
6686
- required: [date-draft]
87+
$ref: "#/$defs/name-and-anchor-name"
6788
properties:
68-
name:
69-
description: The human-friendly name of the implementation
70-
type: string
7189
url:
7290
description: |
7391
The URL of the implementation's repository or documentation
@@ -95,6 +113,13 @@ $defs:
95113
Additional information. Overly promotional (or critical)
96114
wording should be avoided.
97115
type: string
116+
built-on:
117+
description: |
118+
Indicates that this implementation is built on another
119+
implementation, typically to make it available through
120+
a web page, CLI, or a different programming language.
121+
type: object
122+
$ref: "#/$defs/name-and-anchor-name"
98123
compliance:
99124
$ref: "#/$defs/compliance"
100125
last-updated:

_data/validator-libraries-modern.yml

+33-8
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
draft: [7]
5353
license: MIT
5454
last-updated: "2022-08-31"
55-
- name: json-schema
55+
- name: json-schema (luposlip)
5656
url: https://github.com/luposlip/json-schema
5757
date-draft: []
5858
draft: [4, 6, 7]
@@ -61,14 +61,15 @@
6161
- name: COM/ActiveX
6262
implementations:
6363
- name: JSON Essentials for COM/ActiveX
64+
anchor-name: JSONEssentials
6465
url: https://pinery.systems/json-essentials-com/index.html
6566
draft: [7]
6667
license: proprietary
6768
notes: Language independent, includes JSON DOM parser, REST ready, 4 licensing options for free and business uses. For Windows platform only.
6869
last-updated: "2022-08-31"
6970
- name: Common Lisp
7071
implementations:
71-
- name: json-schema
72+
- name: json-schema (fisxoj)
7273
url: https://github.com/fisxoj/json-schema
7374
date-draft: [2019-09]
7475
draft: [7, 6, 4]
@@ -135,7 +136,7 @@
135136
last-updated: "2022-08-31"
136137
- name: networknt/json-schema-validator
137138
url: https://github.com/networknt/json-schema-validator
138-
notes: Support OpenAPI 3.0 with Jackson parser
139+
notes: Support OpenAPI 3.0 with Jackson parser
139140
date-draft: [2020-12, 2019-09]
140141
draft: [7, 6, 4]
141142
license: Apache License 2.0
@@ -184,6 +185,7 @@
184185
instructions: "set option `strict: false`"
185186
last-updated: "2022-08-31"
186187
- name: "@cfworker/json-schema"
188+
anchor-name: cfworker
187189
url: https://github.com/cfworker/cfworker/blob/master/packages/json-schema/README.md
188190
notes: "Built for Cloudflare workers, browsers, and Node.js"
189191
date-draft: [2019-09]
@@ -294,11 +296,13 @@
294296
draft: [7, 6, 4]
295297
license: BSD-3-Clause
296298
last-updated: "2022-08-31"
297-
- name: jsonschema-rs
299+
- name: jsonschema-rs (Python)
298300
url: https://github.com/Stranger6667/jsonschema-rs/tree/master/bindings/python
299301
notes: Python bindings to Rust's jsonschema crate
300302
date-draft: []
301303
draft: [7, 6, 4]
304+
built-on:
305+
name: jsonschema-rs
302306
license: MIT
303307
last-updated: "2022-08-31"
304308
- name: Ruby
@@ -351,43 +355,59 @@
351355
last-updated: "2022-08-31"
352356
- name: Web (Online)
353357
implementations:
354-
- name: Hyperjump JSV
358+
- name: Hyperjump JSV (online)
355359
url: https://json-schema.hyperjump.io
356360
date-draft: [2020-12, 2019-09]
357361
draft: [7, 6, 4]
358362
notes: Supports multiple schemas and multiple instances; client-side validation
363+
built-on:
364+
name: Hyperjump JSV
359365
last-updated: "2022-08-31"
360366
- name: json-everything
361367
url: https://json-everything.net
362368
date-draft: [2020-12, 2019-09]
363369
draft: [7, 6]
364370
notes: Powered by JsonSchema.Net in Blazor WASM for client-side validation
371+
built-on:
372+
name: JsonSchema.Net
365373
last-updated: "2022-08-31"
366374
- name: jschon.dev
367375
url: https://jschon.dev/
368376
date-draft: [2020-12, 2019-09]
369377
draft: []
378+
built-on:
379+
name: jschon
370380
last-updated: "2022-08-31"
371381
- name: JSON Schema Validator
372382
url: https://www.jsonschemavalidator.net/
373383
date-draft: [2019-09]
374384
draft: [7, 6, 4, 3]
375-
notes: Powered by JSON.Net; server-side validation
385+
notes: server-side validation
386+
built-on:
387+
name: Json.NET Schema
376388
last-updated: "2022-08-31"
377389
- name: jsonschema.dev
378390
url: https://jsonschema.dev
379391
draft: [7]
380-
notes: Powered by ajv; client-side validation
392+
notes: client-side validation
393+
built-on:
394+
name: ajv
381395
last-updated: "2022-08-31"
382396
- name: JSON Schema Lint
383397
url: http://jsonschemalint.com/
384398
date-draft: []
385399
draft: [7, 6, 4, 3, 2, 1]
400+
built-on:
401+
name: ajv
402+
notes: Uses JSV for draft-03 and earlier
386403
last-updated: "2022-08-31"
387404
- name: ExtendsClass's JSON Schema Validator
405+
anchor-name: ExtendsClass
388406
url: https://extendsclass.com/json-schema-validator.html
389407
date-draft: []
390408
draft: [7]
409+
built-on:
410+
name: ajv
391411
last-updated: "2022-08-31"
392412
- name: Command Line
393413
implementations:
@@ -407,13 +427,16 @@
407427
config:
408428
docs: https://github.com/ajv-validator/ajv-cli#ajv-options
409429
instructions: "pass `--strict=false`"
430+
built-on:
431+
name: ajv
410432
last-updated: "2022-08-31"
411433
- name: yajsv
412434
license: MIT
413435
url: 'https://github.com/neilpa/yajsv'
414436
date-draft: []
415437
draft: [7, 6, 4]
416-
notes: wraps [xeipuuv/gojsonschema](https://github.com/xeipuuv/gojsonschema)
438+
built-on:
439+
name: gojsonschema
417440
last-updated: "2022-08-31"
418441
- name: Polyglottal JSON Schema Validator
419442
license: MIT
@@ -422,3 +445,5 @@
422445
draft: [6, 4]
423446
notes: can be used with YAML and many other formats besides JSON
424447
last-updated: "2022-08-31"
448+
built-on:
449+
name: ajv

implementations.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Validators
4646
<ul>
4747
{% for implementation in language.implementations %}
4848
<li>
49-
<a href="{{implementation.url}}">{{ implementation.name }}</a>
49+
<a name="{{ implementation.anchor-name | default: implementation.name }}"></a>
50+
<a href="{{ implementation.url}}">{{ implementation.name }}</a>
5051
<ul>
5152
<li><em>Supports:</em>
5253
{% if implementation.date-draft %}
@@ -68,6 +69,12 @@ Validators
6869
{% endif %}
6970
{% endif %}
7071

72+
{% if implementation.built-on %}
73+
<li><em>Built on:</em>
74+
<a href="#{{ implementation.built-on.anchor-name | default: implementation.built-on.name }}">{{ implementation.built-on.name }}</a>
75+
</li>
76+
{% endif %}
77+
7178
{% if implementation.license %}
7279
<li><em>License:</em>
7380
{{ implementation.license | join: ", " }}

0 commit comments

Comments
 (0)