-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1047 lines (972 loc) · 43.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Movie reviewer project API</title>
<meta name="description" content="REST APIs availables for a backend server to manage a movie reviewer website">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="assets/bootstrap.min.css?v=1691870003783" rel="stylesheet" media="screen">
<link href="assets/prism.css?v=1691870003783" rel="stylesheet" />
<link href="assets/prism-toolbar.css?v=1691870003783" rel="stylesheet" />
<link href="assets/prism-diff-highlight.css?v=1691870003783" rel="stylesheet" />
<link href="assets/main.css?v=1691870003783" rel="stylesheet" media="screen, print">
<link href="assets/favicon.ico?v=1691870003783" rel="icon" type="image/x-icon">
<link href="assets/apple-touch-icon.png?v=1691870003783" rel="apple-touch-icon" sizes="180x180">
<link href="assets/favicon-32x32.png?v=1691870003783" rel="icon" type="image/png" sizes="32x32">
<link href="assets/favicon-16x16.png?v=1691870003783" rel="icon" type="image/png" sizes="16x16">
</head>
<body class="container-fluid">
<!-- SIDENAV -->
<script id="template-sidenav" type="text/x-handlebars-template">
<nav id="scrollingNav" class="col-sm-3 col-lg-2 sidebar-offcanvas">
<div class="nav-toggle visible-xs">
<button type="button" class="btn btn-link" data-toggle="offcanvas">
<span class="sr-only">{{__ "Toggle navigation"}}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="sidenav-search">
<input class="form-control search" data-action='filter-search' type="text" placeholder="{{__ "Filter..."}}">
<span class="search-reset">x</span>
</div>
<ul class="sidenav nav nav-list list">
{{#each nav}}
{{#if title}}
{{#if isHeader}}
{{#if isFixed}}
<li class="nav-fixed nav-header navbar-btn nav-list-item" data-group="{{group}}"><a href="#api-{{group}}" data-name="show-api-{{group}}" class="show-api api-{{group}}-init">{{underscoreToSpace title}}</a></li>
{{else}}
<li class="nav-header nav-list-item" data-group="{{group}}"><a href="#api-{{group}}" data-group="show-api-{{group}}" class="show-group api-{{group}}-init">{{underscoreToSpace title}}</a></li>
{{/if}}
{{else}}
<li class="{{#if hidden}}hide {{/if}}" data-group="{{group}}" data-name="{{name}}" data-version="{{version}}">
<a href="#api-{{group}}-{{name}}" title="{{url}}" data-group="show-api-{{group}}" data-name="show-api-{{group}}-{{name}}" class="nav-list-item show-api api-{{group}}-{{name}}-init">{{title}}<div class="nav-list-url-item hide">{{url}}</div></a>
</li>
{{/if}}
{{/if}}
{{/each}}
</ul>
</nav>
</script>
<!-- PROJECT -->
<script id="template-project" type="text/x-handlebars-template">
<div class="pull-left">
<h1>{{name}}</h1>
{{#if description}}<h2>{{{nl2br description}}}</h2>{{/if}}
</div>
<div class="pull-right">
{{#if template.withCompare}}
<div class="btn-group">
<button id="version" class="btn btn-lg btn-default dropdown-toggle" data-toggle="dropdown">
<strong>{{version}}</strong> <span class="caret"></span>
</button>
<ul id="versions" class="dropdown-menu open-left">
<li><a id="compareAllWithPredecessor" href="#">{{__ "Compare all with predecessor"}}</a></li>
<li class="divider"></li>
<li class="disabled"><a href="#">{{__ "show up to version:"}}</a></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
</ul>
</div>
{{else}}
<div id="version" class="well well-sm">
<strong>{{version}}</strong>
</div>
{{/if}}
</div>
<div class="clearfix"></div>
</script>
<script id="template-header" type="text/x-handlebars-template">
{{#if content}}
<div id="api-_header" class="show-api-article show-api-_-article">{{{content}}}</div>
{{/if}}
</script>
<script id="template-footer" type="text/x-handlebars-template">
{{#if content}}
<div id="api-_footer" class="show-api-article show-api-_-article">{{{content}}}</div>
{{/if}}
</script>
<script id="template-generator" type="text/x-handlebars-template">
{{#if template.withGenerator}}
{{#if generator}}
<div>
<p class="text-muted">
{{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}}
</p>
</div>
{{/if}}
{{/if}}
</script>
<script id="template-sections" type="text/x-handlebars-template">
<section id="api-{{group}}" class="show-api-group show-api-{{group}}-group {{#if aloneDisplay}} hide{{/if}}">
<h1 class="color-primary font-weight-bold">{{underscoreToSpace title}}</h1>
{{#if description}}
<p>{{{nl2br description}}}</p>
{{/if}}
{{#each articles}}
<div id="api-{{group}}-{{name}}" class="show-api-article show-api-{{group}}-article show-api-{{group}}-{{name}}-article {{#if aloneDisplay}} hide{{/if}}">
{{{article}}}
</div>
{{/each}}
</section>
</script>
<script id="template-article" type="text/x-handlebars-template">
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}">
<div class="pull-left">
<h1><span class="color-primary">{{underscoreToSpace article.groupTitle}}</span>{{#if article.title}} <span class="text-muted">|</span> {{article.title}}{{/if}}</h1>
</div>
{{#if template.withCompare}}
<div class="pull-right">
<div class="btn-group">
<button class="version btn btn-default dropdown-toggle" data-toggle="dropdown">
<strong>{{article.version}}</strong> <span class="caret"></span>
</button>
<ul class="versions dropdown-menu open-left">
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
</ul>
</div>
</div>
{{/if}}
<div class="clearfix"></div>
{{#if article.author}}<h4 class="muted">Authored by: {{article.author}}</h4>{{/if}}
{{#if article.deprecated}}
<p class="deprecated"><span>{{__ "DEPRECATED"}}</span>
{{{markdown article.deprecated.content}}}
</p>
{{/if}}
{{#if article.description}}
<p>{{{nl2br article.description}}}</p>
{{/if}}
<span class="method meth-{{toLowerCase article.type}}">{{article.type}}</span>
<pre
data-type="{{toLowerCase article.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-http">{{article.url}}</code></pre>
{{#if article.permission}}
<p>
{{__ "Permission:"}}
{{#each article.permission}}
{{name}}
{{#if title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{title}}" data-content="{{nl2br description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{/if}}
{{/each}}
</p>
{{/if}}
{{!-- CODE EXAMPLES IN TABS --}}
{{#ifCond article.examples.length '>' 0}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each article.examples}}
<li{{#ifCond @index '==' 0}} class="active"{{/ifCond}}>
<a href="#examples-{{../id}}-{{@index}}" role="tab" data-toggle="tab">{{title}}</a>
</li>
{{/each}}
</ul>
<div class="tab-content">
{{#each article.examples}}
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="examples-{{../id}}-{{@index}}">
<pre
data-type="{{type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-{{type}}">{{content}}</code></pre>
</div>
{{/each}}
</div>
{{/ifCond}}
{{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}}
{{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
{{subTemplate "article-query-block" params=article.query _hasType=_hasTypeInParameterFields section="query"}}
{{subTemplate "article-body-block" params=article.body _hasType=_hasTypeInParameterFields section="body"}}
{{subTemplate "article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}}
{{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
{{subTemplate "article-sample-request" article=article id=id}}
</article>
</script>
<script id="template-article-query-block" type="text/x-handlebars-template">
{{#if article.query}}
<h2>{{__ "Query Parameter(s)"}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#unless this.Type compare=null}}
<th style="width: 10%">{{__ "Type"}}</th>
{{/unless}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each params}}
<tr>
<td class="code">
{{{nestObject this}}}
{{#if this.optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
{{#if ../template.showRequiredLabels}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
{{/if}}
</td>
{{#unless this.Type compare=null}}
<td class="code">{{this.type}}</td>
{{/unless}}
<td>{{{nl2br this.description}}}
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
{{#each allowedValues}}
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
{{/each}}
</p>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/if}}
</script>
<script id="template-article-body-block" type="text/x-handlebars-template">
{{#if article.body}}
<h2>{{__ "Request Body"}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#unless this.Type compare=null}}
<th style="width: 10%">{{__ "Type"}}</th>
{{/unless}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each params}}
<tr>
<td class="code">
{{{nestObject this}}}
{{#if this.optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
{{#if ../template.showRequiredLabels}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
{{/if}}
</td>
{{#unless this.Type compare=null}}
<td class="code">{{this.type}}</td>
{{/unless}}
<td>
{{{nl2br this.description}}}
{{#if defaultValue}}
<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>
{{/if}}
{{#if size}}
<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>
{{/if}}
{{#if allowedValues}}
<p class="type-size">{{__ "Allowed values:"}}
{{#each allowedValues}}
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
{{/each}}
</p>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/if}}
</script>
<script id="template-article-param-block" type="text/x-handlebars-template">
{{#if params}}
{{#each params.fields}}
<h2>{{__ @key}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each this}}
<tr>
<td class="code">
{{{nestObject this}}}
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
{{#if ../../template.showRequiredLabels}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
{{/if}}</td>
{{#if ../../_hasType}}
<td class="code">
{{{type}}}
</td>
{{/if}}
<td>
{{{nl2br description}}}
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
{{#each allowedValues}}
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
{{/each}}
</p>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/each}}
{{#ifCond params.examples.length '>' 0}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each params.examples}}
<li{{#ifCond @index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../section}}-examples-{{../id}}-{{@index}}" role="tab" data-toggle="tab">{{title}}</a>
</li>
{{/each}}
</ul>
<div class="tab-content">
{{#each params.examples}}
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="{{../section}}-examples-{{../id}}-{{@index}}">
<pre
data-type="{{type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-{{type}}">{{reformat content type}}</code></pre>
</div>
{{/each}}
</div>
{{/ifCond}}
{{/if}}
</script>
<script id="template-article-sample-request" type="text/x-handlebars-template">
{{#if article.sampleRequest}}
<div class="well">
<h3>{{__ "Send a Sample Request"}}</h3>
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-md-3 control-label" for="{{../id}}-sample-request-url">URL</label>
<div class="input-group">
<span class="input-group-addon">{{__ "url"}}</span>
<input id="{{../id}}-sample-request-url" type="url" class="form-control sample-request-url" value="{{article.sampleRequest.0.url}}" />
</div>
</div>
{{#if article.header}}
{{#if article.header.fields}}
<h3>{{__ "Headers"}}</h3>
{{#each article.header.fields}}
<div class="{{../id}}-sample-request-header-fields">
{{#each this}}
<div class="form-group">
<label class="col-md-3 control-label" for="sample-request-header-field-{{field}}">{{field}}</label>
<div class="input-group">
<span class="input-group-addon">{{{type}}}</span>
<input type="text" id="sample-request-header-field-{{field}}"
class="form-control sample-request-input"
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
data-family="header"
data-name="{{field}}"
data-group="{{@../index}}">
</div>
</div>
{{/each}}
</div>
{{/each}}
{{/if}}
{{/if}}
{{#if article.parameter}}
{{#if article.parameter.fields}}
<h3>{{__ "Parameters"}}</h3>
{{#each article.parameter.fields}}
<div class="col-md-3">
<select name="{{../id}}-sample-header-content-type" class="{{../id}}-sample-request-param-select sample-header-content-type sample-header-content-type-switch">
<option value="auto" selected>ajax-auto</option>
<option value="json" >json</option>
<option value="form-data" >form-data</option>
</select>
</div>
<div class="{{../id}}-sample-request-param-body {{../id}}-sample-header-content-type-body hide">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">json</div>
<textarea id="sample-request-body-json" class="form-control sample-request-body" data-sample-request-body-group="sample-request-param-{{@./index}}" rows="6" style="OVERFLOW: visible" {{#if optional}}data-sample-request-param-optional="true"{{/if}}></textarea>
</div>
</div>
</div>
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
{{#each this}}
<div class="form-group">
{{#ifNotObject type}}
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
<div class="input-group">
<div class="input-group-addon">{{{type}}}</div>
{{#if allowedValues}}
<div class="input-group-addon sample-request-select">
<select class="form-control" data-name="{{dot2bracket this}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
<option value="" class="empty"><{{__ "No value"}}></option>
{{#each allowedValues}}
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
{{/each}}
</select>
</div>
<input class="invisible">
{{else}}
<div class="sample-request-input-{{type}}-container"><div>
<input id="sample-request-param-field-{{field}}"
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-param"
type="{{setInputType type}}"
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
placeholder="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
data-name="{{dot2bracket this}}"
data-family="query"
data-group="{{@../index}}"
{{#if optional}}data-optional="true"{{/if}}>
</div></div>
{{/if}}
</div>
{{/ifNotObject}}
</div>
{{/each}}
</div>
{{/each}}
{{/if}}
{{/if}}
{{#if article.query}}
<h3>{{__ "Query Parameters"}}</h3>
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
{{#each article.query}}
<div class="form-group">
{{#ifNotObject type}}
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}{{#if optional}} ({{__ "optional"}}){{/if}}</label>
<div class="input-group col-md-6">
<div class="input-group-addon">{{{type}}}</div>
{{#if allowedValues}}
<div class="input-group-addon sample-request-select">
<select class="form-control" data-name="{{dot2bracket this}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
<option value="" class="empty"><{{__ "No value"}}></option>
{{#each allowedValues}}
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
{{/each}}
</select>
</div>
<input class="invisible">
{{else}}
<div class="sample-request-input-{{type}}-container"><div>
<input id="sample-request-param-field-{{field}}"
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
type="{{setInputType type}}"
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
placeholder="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
data-name="{{dot2bracket this}}"
data-family="query"
data-group="{{@../index}}"
{{#if optional}}data-optional="true"{{/if}}>
</div></div>
{{/if}}
</div>
{{/ifNotObject}}
</div>
{{/each}}
</div>
{{/if}}
{{#if article.body}}
<h3>{{__ "Body"}}</h3>
<div class="col-md-3">
<label for="body-content-type-{{this.id}}">{{__ "Content-Type"}}</label>
<select id="body-content-type-{{this.id}}" data-id="{{this.id}}" class="sample-request-content-type-switch form-control">
<option value="body-json" selected>json</option>
<option value="body-form-data">form-data</option>
</select>
</div>
<div class="col-md-9" id="sample-request-body-json-input-{{this.id}}">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">json</div>
<textarea class="form-control sample-request-input" rows="6"
data-family="body-json"
data-name={{"body"}}
data-content-type="json"
{{#if optional}}data-optional="true"{{/if}}>{{body2json article.body}}</textarea>
</div>
</div>
</div>
<div hidden class="col-md-9" id="sample-request-body-form-input-{{this.id}}">
{{#each article.body}}
<div class="form-group">
{{#ifNotObject type}}
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
<div class="input-group">
<div class="input-group-addon">{{{type}}}</div>
{{#if allowedValues}}
<div class="input-group-addon sample-request-select">
<select class="form-control" data-name="{{dot2bracket this}}" data-family="body" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
<option value="" class="empty"><{{__ "No value"}}></option>
{{#each allowedValues}}
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
{{/each}}
</select>
</div>
<input class="invisible">
{{else}}
<div class="sample-request-input-{{type}}-container"><div>
<input id="sample-request-param-field-{{field}}"
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
type="{{setInputType type}}"
value="{{#ifCond type '!==' 'Boolean'}}{{#if defaultValue}}{{ defaultValue }}{{/if}}{{/ifCond}}"
{{#if checked}}checked{{/if}}
placeholder="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
data-family="body"
data-name="{{dot2bracket this}}"
data-content-type="form"
{{#if optional}}data-optional="true"{{/if}}>
</div></div>
{{/if}}
</div>
{{/ifNotObject}}
</div>
{{/each}}
</div>
{{/if}}
<div class="form-group">
<div class="controls pull-right">
<button class="btn btn-primary bg-primary sample-request-send" data-type="{{article.type}}">{{__ "Send"}}</button>
<button class="btn btn-danger bg-red sample-request-clear" data-type="{{article.type}}">{{__ "Reset"}}</button>
</div>
</div>
<div class="form-group sample-request-response" hidden>
<h3>
{{__ "Response"}}
<button class="btn btn-default btn-xs pull-right sample-request-clear">X</button>
</h3>
<pre
data-type="json"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-json sample-request-response-json"></code></pre>
</div>
</fieldset>
</form>
</div>
{{/if}}
</script>
<script id="template-compare-article" type="text/x-handlebars-template">
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}">
<div class="pull-left">
<h1>{{underscoreToSpace article.groupTitle}} | {{{showDiff article.title compare.title}}}</h1>
</div>
<div class="pull-right">
<div class="btn-group">
<button class="btn btn-success" disabled>
<strong>{{article.version}}</strong> {{__ "compared to"}}
</button>
<button class="version btn btn-danger dropdown-toggle" data-toggle="dropdown">
<strong>{{compare.version}}</strong> <span class="caret"></span>
</button>
<ul class="versions dropdown-menu open-left">
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
<li class="divider"></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
</ul>
</div>
</div>
<div class="clearfix"></div>
{{#if article.description}}
<p>{{{showDiff article.description compare.description "nl2br"}}}</p>
{{else}}
{{#if compare.description}}
<p>{{{showDiff "" compare.description "nl2br"}}}</p>
{{/if}}
{{/if}}
<span class="method meth-{{toLowerCase compare.type}}">{{compare.type}}</span>
<pre
data-type="{{toLowerCase article.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
class="language-html"
>{{{showDiff article.url compare.url}}}</pre>
{{subTemplate "article-compare-permission" article=article compare=compare}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each_compare_title article.examples compare.examples}}
{{#if typeSame}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#compare-examples-{{../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
</li>
{{/if}}
{{#if typeIns}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#compare-examples-{{../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
</li>
{{/if}}
{{#if typeDel}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#compare-examples-{{../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
</li>
{{/if}}
{{/each_compare_title}}
</ul>
<div class="tab-content">
{{#each_compare_title article.examples compare.examples}}
{{#if typeSame}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../article.id}}-{{index}}">
<pre
data-type="{{source.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-diff-{{source.type}} diff-highlight">{{{showDiff source.content compare.content "code"}}}</code></pre>
</div>
{{/if}}
{{#if typeIns}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../article.id}}-{{index}}">
<pre
data-type="{{source.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
</div>
{{/if}}
{{#if typeDel}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../article.id}}-{{index}}">
<pre
data-type="{{compare.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
</div>
{{/if}}
{{/each_compare_title}}
</div>
{{subTemplate "article-compare-param-block" source=article.header compare=compare.header _hasType=_hasTypeInHeaderFields section="header"}}
{{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
{{subTemplate "article-compare-query-block" source=article.query compare=compare.query _hasType=_hasTypeInParameterFields section="query"}}
{{subTemplate "article-compare-body-block" source=article.body compare=compare.body _hasType=_hasTypeInParameterFields section="body"}}
{{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields section="success"}}
{{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
{{subTemplate "article-sample-request" article=article id=id}}
</article>
</script>
<script id="template-article-compare-permission" type="text/x-handlebars-template">
<p>
{{__ "Permission:"}}
{{#each_compare_list_field article.permission compare.permission field="name"}}
{{#if source}}
{{#if typeSame}}
{{source.name}}
{{#if source.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeIns}}
<ins>{{source.name}}</ins>
{{#if source.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeDel}}
<del>{{source.name}}</del>
{{#if source.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{else}}
{{#if typeSame}}
{{compare.name}}
{{#if compare.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeIns}}
<ins>{{compare.name}}</ins>
{{#if compare.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeDel}}
<del>{{compare.name}}</del>
{{#if compare.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{/if}}
{{/each_compare_list_field}}
</p>
</script>
<script id="template-article-compare-param-block" type="text/x-handlebars-template">
{{#if source}}
{{#each_compare_keys source.fields compare.fields}}
{{#if typeSame}}
<h2>{{__ source.key}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../_hasType}}
</table>
{{/if}}
{{#if typeIns}}
<h2><ins>{{__ source.key}}</ins></h2>
<table class="ins">
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../_hasType}}
</table>
{{/if}}
{{#if typeDel}}
<h2><del>{{__ compare.key}}</del></h2>
<table class="del">
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../_hasType}}
</table>
{{/if}}
{{/each_compare_keys}}
{{#if source.examples}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each_compare_title source.examples compare.examples}}
{{#if typeSame}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../section}}-compare-examples-{{../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
</li>
{{/if}}
{{#if typeIns}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../section}}-compare-examples-{{../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
</li>
{{/if}}
{{#if typeDel}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../section}}-compare-examples-{{../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
</li>
{{/if}}
{{/each_compare_title}}
</ul>
<div class="tab-content">
{{#each_compare_title source.examples compare.examples}}
{{#if typeSame}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../section}}-compare-examples-{{../article.id}}-{{index}}">
<pre
data-type="{{source.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-diff-{{source.type}} diff-highlight">{{{showDiff source.content compare.content "code"}}}</code></pre>
</div>
{{/if}}
{{#if typeIns}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../section}}-compare-examples-{{../article.id}}-{{index}}">
<pre
data-type="{{source.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
</div>
{{/if}}
{{#if typeDel}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../section}}-compare-examples-{{../article.id}}-{{index}}">
<pre
data-type="{{compare.type}}"
data-prismjs-copy="{{__ "Copy"}}"
data-prismjs-copy-error="{{__ "Press Ctrl+C to copy"}}"
data-prismjs-copy-success="{{__ "copied!"}}"
><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
</div>
{{/if}}
{{/each_compare_title}}
</div>
{{/if}}
{{/if}}
</script>
<script id="template-article-compare-query-block" type="text/x-handlebars-template">
{{#if article.query}}
<h2>{{__ "Query Parameter(s)"}}</h2>
<table class="table table-hover">
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#unless this.Type compare=null}}
<th style="width: 10%">{{__ "Type"}}</th>
{{/unless}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source compare=compare _hasType=this.type}}
</table>
{{/if}}
</script>
<script id="template-article-compare-body-block" type="text/x-handlebars-template">
{{#if article.body}}
<h2>{{__ "Request Body"}}</h2>
<table class="table table-hover">
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#unless this.Type compare=null}}
<th style="width: 10%">{{__ "Type"}}</th>
{{/unless}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source compare=compare _hasType=this.type}}
</table>
{{/if}}
</script>
<script id="template-article-compare-param-block-body" type="text/x-handlebars-template">
<tbody>
{{#each_compare_field source compare}}
{{#if typeSame}}
<tr>
<td class="code">
{{{nestObject source}}}
{{#if source.optional}}
{{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span>
{{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span>
{{/if}}
{{else}}
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
{{/if}}
</td>
{{#if source.type}}
{{#if compare.type}}
<td>{{{showDiff source.type compare.type}}}</td>
{{else}}
<td>{{{source.type}}}</td>
{{/if}}
{{else}}
{{#if compare.type}}
<td>{{{compare.type}}}</td>
{{else}}
{{#if ../../../../_hasType}}<td></td>{{/if}}
{{/if}}
{{/if}}
<td>
{{{showDiff source.description compare.description "nl2br"}}}
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{showDiff source.defaultValue compare.defaultValue}}}</code><p>{{/if}}
</td>
</tr>
{{/if}}
{{#if typeIns}}
<tr class="ins">
<td class="code">
{{{nestObject source}}}
{{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}}
</td>
{{#if source.type}}
<td>{{{source.type}}}</td>
{{else}}
{{{typRowTd}}}
{{/if}}
<td>
{{{nl2br source.description}}}
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{source.defaultValue}}}</code><p>{{/if}}
</td>
</tr>
{{/if}}
{{#if typeDel}}
<tr class="del">
<td class="code">
{{{nestObject compare}}}
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
</td>
{{#if compare.type}}