forked from swagger-api/swagger-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreview.html
91 lines (80 loc) · 2.5 KB
/
preview.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
<div class="preview-wrapper">
<div class="dirty-message" ng-if="isDirty">
This preview is out of date. Please <a ng-click="loadLatest()">reload</a> to see the latest.
</div>
<ng-include
src="'templates/error-presenter.html'"
ng-controller="ErrorPresenterCtrl"
ng-if="errors.length || warnings.length">
</ng-include>
<ng-include src="'templates/specs-info.html'"></ng-include>
<ng-include
src="'templates/security.html'"
ng-if="specs.securityDefinitions">
</ng-include>
<ng-include src="'templates/tags.html'"></ng-include>
<header>
<h3 class="section-header">
<a ng-click="
specs.paths.$folded = !specs.paths.$folded;
foldEditor(['paths'], specs.paths.$folded);">
<span>Paths</span>
</a>
<span class="on-hover">
<a ng-click="listAllOperation()">List all operations</a>
</span>
</h3>
</header>
<ul class="paths" collapse-when="specs.paths.$folded">
<li
class="path"
ng-include
src="'templates/path.html'"
ng-repeat="(pathName, path) in specs.paths"
ng-if="showPath(path, pathName)">
</li>
</ul>
<header ng-if="specs.definitions">
<h3 class="section-header">
<a ng-click="
specs.definitions.$folded = !specs.definitions.$folded;
foldEditor(['definitions'], specs.definitions.$folded);
">Models</a>
<span class="on-hover">
<a ng-click="listAllDefnitions()">List all models</a>
</span>
</h3>
</header>
<ul
class="section-content definitions"
ng-if="showDefinitions(specs.definitions)"
collapse-when="specs.definitions.$folded"
class="models">
<li
class="definition"
ng-repeat="(modelName, model) in specs.definitions"
ng-if="!isVendorExtension(modelName)"
scroll-into-view-when="isInFocus(['definitions', modelName])">
<h4>
<a
ng-click="
model.$folded = !model.$folded;
foldEditor(['definitions', modelName], model.$folded)
"
class="definition-title">
{{modelName}}
</a>
<a
class="jump-to-yaml"
ng-click="focusEdit($event, ['definitions', modelName])"
tooltip-placement="left"
uib-tooltip="Jump to YAML"
tooltip-trigger="mouseenter">
</a>
</h4>
<div collapse-when="model.$folded">
<schema-model schema="model"></schema-model>
</div>
</li>
</ul>
</div>