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

Commit c87fdd2

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 4a76d3d commit c87fdd2

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]
@@ -134,7 +135,7 @@
134135
last-updated: "2022-08-31"
135136
- name: networknt/json-schema-validator
136137
url: https://github.com/networknt/json-schema-validator
137-
notes: Support OpenAPI 3.0 with Jackson parser
138+
notes: Support OpenAPI 3.0 with Jackson parser
138139
date-draft: [2020-12, 2019-09]
139140
draft: [7, 6, 4]
140141
license: Apache License 2.0
@@ -183,6 +184,7 @@
183184
instructions: "set option `strict: false`"
184185
last-updated: "2022-08-31"
185186
- name: "@cfworker/json-schema"
187+
anchor-name: cfworker
186188
url: https://github.com/cfworker/cfworker/blob/master/packages/json-schema/README.md
187189
notes: "Built for Cloudflare workers, browsers, and Node.js"
188190
date-draft: [2019-09]
@@ -293,11 +295,13 @@
293295
draft: [7, 6, 4]
294296
license: BSD-3-Clause
295297
last-updated: "2022-08-31"
296-
- name: jsonschema-rs
298+
- name: jsonschema-rs (Python)
297299
url: https://github.com/Stranger6667/jsonschema-rs/tree/master/bindings/python
298300
notes: Python bindings to Rust's jsonschema crate
299301
date-draft: []
300302
draft: [7, 6, 4]
303+
built-on:
304+
name: jsonschema-rs
301305
license: MIT
302306
last-updated: "2022-08-31"
303307
- name: Ruby
@@ -350,43 +354,59 @@
350354
last-updated: "2022-08-31"
351355
- name: Web (Online)
352356
implementations:
353-
- name: Hyperjump JSV
357+
- name: Hyperjump JSV (online)
354358
url: https://json-schema.hyperjump.io
355359
date-draft: [2020-12, 2019-09]
356360
draft: [7, 6, 4]
357361
notes: Supports multiple schemas and multiple instances; client-side validation
362+
built-on:
363+
name: Hyperjump JSV
358364
last-updated: "2022-08-31"
359365
- name: json-everything
360366
url: https://json-everything.net
361367
date-draft: [2020-12, 2019-09]
362368
draft: [7, 6]
363369
notes: Powered by JsonSchema.Net in Blazor WASM for client-side validation
370+
built-on:
371+
name: JsonSchema.Net
364372
last-updated: "2022-08-31"
365373
- name: jschon.dev
366374
url: https://jschon.dev/
367375
date-draft: [2020-12, 2019-09]
368376
draft: []
377+
built-on:
378+
name: jschon
369379
last-updated: "2022-08-31"
370380
- name: JSON Schema Validator
371381
url: https://www.jsonschemavalidator.net/
372382
date-draft: [2019-09]
373383
draft: [7, 6, 4, 3]
374-
notes: Powered by JSON.Net; server-side validation
384+
notes: server-side validation
385+
built-on:
386+
name: Json.NET Schema
375387
last-updated: "2022-08-31"
376388
- name: jsonschema.dev
377389
url: https://jsonschema.dev
378390
draft: [7]
379-
notes: Powered by ajv; client-side validation
391+
notes: client-side validation
392+
built-on:
393+
name: ajv
380394
last-updated: "2022-08-31"
381395
- name: JSON Schema Lint
382396
url: http://jsonschemalint.com/
383397
date-draft: []
384398
draft: [7, 6, 4, 3, 2, 1]
399+
built-on:
400+
name: ajv
401+
notes: Uses JSV for draft-03 and earlier
385402
last-updated: "2022-08-31"
386403
- name: ExtendsClass's JSON Schema Validator
404+
anchor-name: ExtendsClass
387405
url: https://extendsclass.com/json-schema-validator.html
388406
date-draft: []
389407
draft: [7]
408+
built-on:
409+
name: ajv
390410
last-updated: "2022-08-31"
391411
- name: Command Line
392412
implementations:
@@ -406,13 +426,16 @@
406426
config:
407427
docs: https://github.com/ajv-validator/ajv-cli#ajv-options
408428
instructions: "pass `--strict=false`"
429+
built-on:
430+
name: ajv
409431
last-updated: "2022-08-31"
410432
- name: yajsv
411433
license: MIT
412434
url: 'https://github.com/neilpa/yajsv'
413435
date-draft: []
414436
draft: [7, 6, 4]
415-
notes: wraps [xeipuuv/gojsonschema](https://github.com/xeipuuv/gojsonschema)
437+
built-on:
438+
name: gojsonschema
416439
last-updated: "2022-08-31"
417440
- name: Polyglottal JSON Schema Validator
418441
license: MIT
@@ -421,3 +444,5 @@
421444
draft: [6, 4]
422445
notes: can be used with YAML and many other formats besides JSON
423446
last-updated: "2022-08-31"
447+
built-on:
448+
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)