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

Commit 260c0ff

Browse files
committed
Generate validator libraries listing from a yaml file
1 parent eb2c9e2 commit 260c0ff

File tree

8 files changed

+182
-74
lines changed

8 files changed

+182
-74
lines changed

.travis.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

_config.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ google_analytics: UA-99695987-1
2626
markdown: kramdown
2727
theme: minima
2828

29-
header_pages:
30-
- documentation.md
31-
- examples.md
32-
- implementations.md
33-
3429
collections:
3530
docs:
3631
output: true

_data/validator-libraries.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
- name: .NET
2+
anchor-name: dotnet
3+
implementations:
4+
- "[Json.NET](http://james.newtonking.com/projects/json-net.aspx) (MIT)"
5+
- "[NJsonSchema](http://NJsonSchema.org) - *supports draft 4* (Ms-PL)"
6+
- name: ActionScript 3
7+
anchor-name: action-script-3
8+
implementations:
9+
- "[Frigga](https://github.com/raulbajales/Frigga) (MIT)"
10+
- name: C
11+
anchor-name: c
12+
implementations:
13+
- "[WJElement](https://github.com/netmail-open/wjelement) (LGPLv3)"
14+
- name: C++
15+
anchor-name: cpp
16+
implementations:
17+
- "[wjelement-cpp](https://github.com/petehug/wjelement-cpp) - *supports draft 4* (LGPLv3)"
18+
- "[Header-only C++ library for JSON Schema validation](https://github.com/tristanpenman/valijson) - *supports only draft 4* (BSD-2-Clause)"
19+
- "[Modern C++ JSON schema validator](https://github.com/pboettch/json-schema-validator) - *supports only draft 4* based on JSON for Modern C++ (MIT)"
20+
- name: Clojure
21+
anchor-name: clojure
22+
implementations:
23+
- "[scjsv](https://github.com/metosin/scjsv) - *supports draft 4* (wrapper for [java-json-tools/json-schema-validator](https://github.com/java-json-tools/json-schema-validator)) (Eclipse Public License v1.0)"
24+
- name: Dart
25+
anchor-name: dart
26+
implementations:
27+
- "[json_schema](https://github.com/patefacio/json_schema) *supports draft 4* (BSL-1.0)"
28+
- name: Erlang
29+
anchor-name: erlang
30+
implementations:
31+
- "[JeSSE](https://github.com/for-GET/jesse) (Apache 2.0)"
32+
- name: Go
33+
anchor-name: go
34+
implementations:
35+
- "[gojsonschema](https://github.com/sigu-399/gojsonschema) (Apache 2.0)"
36+
- "[jsonschema](https://github.com/santhosh-tekuri/jsonschema) *supports draft 4, draft 6* (BSD-3-Clause)"
37+
- name: Haskell
38+
anchor-name: haskell
39+
implementations:
40+
- "[aeson-schema](https://github.com/timjb/aeson-schema) (MIT)"
41+
- "[hjsonschema](https://github.com/seagreen/hjsonschema) - *supports draft 4* (MIT)"
42+
- name: Java
43+
anchor-name: java
44+
implementations:
45+
- "[json-schema-validator](https://github.com/java-json-tools/json-schema-validator) - *supports draft 4* (LGPLv3)"
46+
- "[json-schema (implementation based on the org.json API)](https://github.com/everit-org/json-schema) - *supports draft 4* (Apache License 2.0)"
47+
- "[json-schema-validator](https://github.com/networknt/json-schema-validator) - *supports draft 4* (Apache License 2.0)"
48+
- name: JavaScript
49+
anchor-name: javascript
50+
implementations:
51+
- "[ajv](https://github.com/epoberezkin/ajv) for Node.js and browsers - *supports draft 4, draft 6, [custom keywords](https://github.com/epoberezkin/ajv-keywords) and [$data reference](https://github.com/json-schema-org/json-schema-spec/issues/51)* (MIT)"
52+
- "[djv](https://github.com/korzio/djv) for Node.js and browsers - *supports draft 4* (MIT)"
53+
- "[jsonschema](https://github.com/tdegrunt/jsonschema) for Node.js - *supports draft 4* (MIT)"
54+
- "[is-my-json-valid](https://github.com/mafintosh/is-my-json-valid) - *supports draft 4* (MIT)"
55+
- "[tv4](http://geraintluff.github.com/tv4/) - *supports draft 4* (Public Domain)"
56+
- "[JaySchema](https://github.com/natesilva/jayschema) for Node.js - *supports draft 4* (BSD)"
57+
- "[z-schema](https://github.com/zaggino/z-schema) for Node.js - *supports draft 4* (MIT)"
58+
- "[direct-schema](http://github.com/IreneKnapp/direct-schema) (BSD)"
59+
- "[JSV](http://github.com/garycourt/JSV) (BSD)"
60+
- "[json-schema](https://github.com/kriszyp/json-schema) (AFL or BSD) part of the [Persevere](http://github.com/kriszyp/json-schema) project"
61+
- "[schema.js](https://github.com/akidee/schema.js) (MIT)"
62+
- "[json-gate](https://github.com/oferei/json-gate) (MIT)"
63+
- "[JSEN](https://github.com/bugventure/jsen) for Node.js - *supports draft 4* (MIT)"
64+
- name: PHP
65+
anchor-name: php
66+
implementations:
67+
- "[jsv4-php](https://github.com/geraintluff/jsv4-php) - *supports draft 4* (Public Domain / MIT)"
68+
- "[php-json-schema](https://github.com/hasbridge/php-json-schema) (MIT)"
69+
- "[json-schema](https://github.com/justinrainbow/json-schema) (Berkeley)"
70+
- "[JVal](https://github.com/stefk/jval) - *supports draft 4* (MIT)"
71+
- "[JSON Guard](https://github.com/thephpleague/json-guard) - *supports draft 4* (MIT)"
72+
- name: Perl
73+
anchor-name: perl
74+
implementations:
75+
- "[JSV::Validator](https://metacpan.org/module/JSV::Validator) (MIT)"
76+
- "[JSON::Schema](https://metacpan.org/module/JSON::Schema) (MIT)"
77+
- name: Python
78+
anchor-name: python
79+
implementations:
80+
- "[jsonschema](https://github.com/Julian/jsonschema) - *supports draft 4* (MIT)"
81+
- "[json-schema-validator](https://github.com/zyga/json-schema-validator) (LGPL)"
82+
- name: Ruby
83+
anchor-name: ruby
84+
implementations:
85+
- "[ruby-jsonschema](https://github.com/Constellation/ruby-jsonchema) (MIT)"
86+
- "[json-schema](https://github.com/hoxworth/json-schema) - *supports draft 4* (MIT)"

_includes/header.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<header class="site-header" role="banner">
2+
3+
<div class="wrapper">
4+
{% assign default_paths = site.pages | map: "path" %}
5+
{% assign page_paths = site.header_pages | default: default_paths %}
6+
<a class="site-title" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
7+
8+
{% if page_paths %}
9+
<nav class="site-nav">
10+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
11+
<label for="nav-trigger">
12+
<span class="menu-icon">
13+
<svg viewBox="0 0 18 15" width="18px" height="15px">
14+
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
15+
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
16+
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
17+
</svg>
18+
</span>
19+
</label>
20+
21+
<div class="trigger">
22+
<a class="page-link" href="{{ "/documentation.html" | relative_url }}">Specification</a>
23+
<a class="page-link" href="{{ "/examples.html" | relative_url }}">Examples</a>
24+
<a class="page-link" href="{{ "/implementations.html" | relative_url }}">Software</a>
25+
{% for path in page_paths %}
26+
{% assign my_page = site.pages | where: "path", path | first %}
27+
{% if my_page.menutitle %}
28+
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.menutitle | escape }}</a>
29+
{% endif %}
30+
{% endfor %}
31+
</div>
32+
</nav>
33+
{% endif %}
34+
</div>
35+
</header>

_sass/minima.scss

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@charset "utf-8";
2+
3+
// This file is the same as the one provided by the the minima theme (ie. unmodified),
4+
// but must be reproduced here because of our custom syntax-highlighting partial
5+
6+
// Define defaults for each variable.
7+
8+
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
9+
$base-font-size: 16px !default;
10+
$base-font-weight: 400 !default;
11+
$small-font-size: $base-font-size * 0.875 !default;
12+
$base-line-height: 1.5 !default;
13+
14+
$spacing-unit: 30px !default;
15+
16+
$text-color: #111 !default;
17+
$background-color: #fdfdfd !default;
18+
$brand-color: #2a7ae2 !default;
19+
20+
$grey-color: #828282 !default;
21+
$grey-color-light: lighten($grey-color, 40%) !default;
22+
$grey-color-dark: darken($grey-color, 25%) !default;
23+
24+
// Width of the content area
25+
$content-width: 800px !default;
26+
27+
$on-palm: 600px !default;
28+
$on-laptop: 800px !default;
29+
30+
// Use media queries like this:
31+
// @include media-query($on-palm) {
32+
// .wrapper {
33+
// padding-right: $spacing-unit / 2;
34+
// padding-left: $spacing-unit / 2;
35+
// }
36+
// }
37+
@mixin media-query($device) {
38+
@media screen and (max-width: $device) {
39+
@content;
40+
}
41+
}
42+
43+
@mixin relative-font-size($ratio) {
44+
font-size: $base-font-size * $ratio;
45+
}
46+
47+
// Import partials.
48+
@import
49+
"minima/base",
50+
"minima/layout",
51+
"minima/syntax-highlighting"
52+
;

_sass/minima/_syntax-highlighting.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ cyan #2aa198 strings, numbers
1818
green #859900 operators, other keywords
1919
*/
2020

21-
.highlight{
22-
.highlighter-rouge & {
23-
background: #fdf6e3;
24-
}
25-
}
2621
.highlight { background-color: #fdf6e3; color: #586e75 }
2722
.highlight .c { color: #93a1a1 } /* Comment */
2823
.highlight .err { color: #586e75 } /* Error */

assets/main.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55

66
// Import partials from the `minima` theme.
77
@import "minima";
8-
@import "minima/syntax-highlighting";
98

109
// Import navigation partial for Software page
1110
@import "intra-navigation";
1211

1312
// _base.scss overrides
1413
pre,
1514
code {
16-
background-color: unset;
15+
background-color: inherit;
1716
}
1817

1918
.wrapper {

implementations.md

Lines changed: 8 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -38,64 +38,15 @@ Validators
3838

3939
</nav>
4040

41-
<!-- -->
41+
<!-- To add a validator library, add it in _data/validator-libraries.yml -->
42+
43+
{% for language in site.data.validator-libraries %}
44+
45+
- {{language.name}} <a id="validator-{{ language.anchor-name }}"></a>{% for implementation in language.implementations %}
46+
- {{ implementation }}{% endfor %}
47+
48+
{% endfor %}
4249

43-
- .NET <a id="validator-dotnet"></a>
44-
- [Json.NET](http://james.newtonking.com/projects/json-net.aspx) (MIT)
45-
- [NJsonSchema](http://NJsonSchema.org) - *supports draft 4* (Ms-PL)
46-
- ActionScript 3 <a id="validator-action-script-3"></a>
47-
- [Frigga](https://github.com/raulbajales/Frigga) (MIT)
48-
- C <a id="validator-c"></a>
49-
- [WJElement](https://github.com/netmail-open/wjelement) (LGPLv3)
50-
- C++ <a id="validator-cpp"></a>
51-
- [wjelement-cpp](https://github.com/petehug/wjelement-cpp) - *supports draft 4* (LGPLv3)
52-
- [Header-only C++ library for JSON Schema validation](https://github.com/tristanpenman/valijson) - *supports only draft 4* (BSD-2-Clause)
53-
- [Modern C++ JSON schema validator](https://github.com/pboettch/json-schema-validator) - *supports only draft 4* based on JSON for Modern C++ (MIT)
54-
- Clojure <a id="validator-clojure"></a>
55-
- [scjsv](https://github.com/metosin/scjsv) - *supports draft 4* (wrapper for [java-json-tools/json-schema-validator](https://github.com/java-json-tools/json-schema-validator)) (Eclipse Public License v1.0)
56-
- Dart <a id="validator-dart"></a>
57-
- [json_schema](https://github.com/patefacio/json_schema) *supports draft 4* (BSL-1.0)
58-
- Erlang <a name="validator-erlang"></a>
59-
- [JeSSE](https://github.com/for-GET/jesse) (Apache 2.0)
60-
- Go <a name="validator-go"></a>
61-
- [gojsonschema](https://github.com/sigu-399/gojsonschema) (Apache 2.0)
62-
- [jsonschema](https://github.com/santhosh-tekuri/jsonschema) *supports draft 4, draft 6* (BSD-3-Clause)
63-
- Haskell <a id="validator-haskell"></a>
64-
- [aeson-schema](https://github.com/timjb/aeson-schema) (MIT)
65-
- [hjsonschema](https://github.com/seagreen/hjsonschema) - *supports draft 4* (MIT)
66-
- Java <a id="validator-java"></a>
67-
- [json-schema-validator](https://github.com/java-json-tools/json-schema-validator) - *supports draft 4* (LGPLv3)
68-
- [json-schema (implementation based on the org.json API)](https://github.com/everit-org/json-schema) - *supports draft 4* (Apache License 2.0)
69-
- [json-schema-validator](https://github.com/networknt/json-schema-validator) - *supports draft 4* (Apache License 2.0)
70-
- JavaScript <a id="validator-javascript"></a>
71-
- [ajv](https://github.com/epoberezkin/ajv) for Node.js and browsers - *supports draft 4, draft 6, [custom keywords](https://github.com/epoberezkin/ajv-keywords) and [$data reference](https://github.com/json-schema-org/json-schema-spec/issues/51)* (MIT)
72-
- [djv](https://github.com/korzio/djv) for Node.js and browsers - *supports draft 4* (MIT)
73-
- [jsonschema](https://github.com/tdegrunt/jsonschema) for Node.js - *supports draft 4* (MIT)
74-
- [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid) - *supports draft 4* (MIT)
75-
- [tv4](http://geraintluff.github.com/tv4/) - *supports draft 4* (Public Domain)
76-
- [JaySchema](https://github.com/natesilva/jayschema) for Node.js - *supports draft 4* (BSD)
77-
- [z-schema](https://github.com/zaggino/z-schema) for Node.js - *supports draft 4* (MIT)
78-
- [direct-schema](http://github.com/IreneKnapp/direct-schema) (BSD)
79-
- [JSV](http://github.com/garycourt/JSV) (BSD)
80-
- [json-schema](https://github.com/kriszyp/json-schema) (AFL or BSD) part of the [Persevere](http://github.com/kriszyp/json-schema) project
81-
- [schema.js](https://github.com/akidee/schema.js) (MIT)
82-
- [json-gate](https://github.com/oferei/json-gate) (MIT)
83-
- [JSEN](https://github.com/bugventure/jsen) for Node.js - *supports draft 4* (MIT)
84-
- PHP <a id="validator-php"></a>
85-
- [jsv4-php](https://github.com/geraintluff/jsv4-php) - *supports draft 4* (Public Domain / MIT)
86-
- [php-json-schema](https://github.com/hasbridge/php-json-schema) (MIT)
87-
- [json-schema](https://github.com/justinrainbow/json-schema) (Berkeley)
88-
- [JVal](https://github.com/stefk/jval) - *supports draft 4* (MIT)
89-
- [JSON Guard](https://github.com/thephpleague/json-guard) - *supports draft 4* (MIT)
90-
- Perl <a id="validator-perl"></a>
91-
- [JSV::Validator](https://metacpan.org/module/JSV::Validator) (MIT)
92-
- [JSON::Schema](https://metacpan.org/module/JSON::Schema) (MIT)
93-
- Python <a id="validator-python"></a>
94-
- [jsonschema](https://github.com/Julian/jsonschema) - *supports draft 4* (MIT)
95-
- [json-schema-validator](https://github.com/zyga/json-schema-validator) (LGPL)
96-
- Ruby <a id="validator-ruby"></a>
97-
- [ruby-jsonschema](https://github.com/Constellation/ruby-jsonchema) (MIT)
98-
- [json-schema](https://github.com/hoxworth/json-schema) - *supports draft 4* (MIT)
9950

10051
### Online
10152

0 commit comments

Comments
 (0)