Merge branch 'develop' into task/JAL-2196pdbeProperties
[jalview.git] / examples / biojson-doc / tests / test.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <title>Docson Test</title>
5     <meta charset="utf-8">
6     <link rel="stylesheet" href="../css/docson.css">
7     <script src="../lib/require.js"></script></head>
8     <style>
9         body {
10             font-family: verdana, helvetica;
11         }
12     </style>
13 </head>
14 <body>
15 <script charset="utf-8">
16     var tests = [ "invoice$Invoice", "enum", "schema","additionalProperties", "address", "fstab", "basic", "not", "oneOf", "anyOf", "allOf", "example2", "properties", "ref"]
17     require.config({ baseUrl: ".."});
18     require(["docson", "lib/jquery"], function(docson) {
19         docson.templateBaseUrl="../templates";
20         $(function() {
21             $.each(tests, function(k, test) {
22                 var block = $("<div/>");
23                 var segments = test.split("$");
24                 $("body").append("<h2>"+segments[0]+"</h2>");
25                 $("body").append(block);
26                 $.get(segments[0]+".json").done(function(items) {
27                     $.each(items, function(k, item) {
28                         var element = $("<div/>");
29                         block.append(element);
30                         if(!item.schema.description) {
31                             item.schema.description = item.description;
32                         }
33                         docson.doc(element, item.schema, segments[1]);
34                     });
35                 });
36             });
37         });
38     });
39 </script>
40 </body>
41 </html>