2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
24 <title>Docson Test</title>
25 <meta charset="utf-8">
26 <link rel="stylesheet" href="../css/docson.css">
27 <script src="../lib/require.js"></script></head>
30 font-family: verdana, helvetica;
35 <script charset="utf-8">
36 var tests = [ "invoice$Invoice", "enum", "schema","additionalProperties", "address", "fstab", "basic", "not", "oneOf", "anyOf", "allOf", "example2", "properties", "ref"]
37 require.config({ baseUrl: ".."});
38 require(["docson", "lib/jquery"], function(docson) {
39 docson.templateBaseUrl="../templates";
41 $.each(tests, function(k, test) {
42 var block = $("<div/>");
43 var segments = test.split("$");
44 $("body").append("<h2>"+segments[0]+"</h2>");
45 $("body").append(block);
46 $.get(segments[0]+".json").done(function(items) {
47 $.each(items, function(k, item) {
48 var element = $("<div/>");
49 block.append(element);
50 if(!item.schema.description) {
51 item.schema.description = item.description;
53 docson.doc(element, item.schema, segments[1]);