forked from APIDevTools/swagger-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
152 lines (141 loc) · 4.84 KB
/
index.html
File metadata and controls
152 lines (141 loc) · 4.84 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Swagger Parser Online</title>
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="www/css/bootstrap.min.css"/>
<link rel="stylesheet" href="www/css/style.css"/>
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<![endif]-->
</head>
<body>
<header class="jumbotron">
<div class="container">
<h1>Swagger Parser</h1>
<p>Parses, validates, and dereferences JSON/YAML Swagger specs in Node and browsers</p>
<a href="https://github.com/BigstickCarpet/swagger-parser" class="btn btn-info btn-img">
<small>View project on</small>
GitHub</a>
</div>
</header>
<main class="container">
<div class="row">
<div class="col-sm-8 col-md-9 col-lg-10">
<h2><a class="anchor"><span class="octicon octicon-link"></span></a>Try it Out</h2>
<pre id="source" class="editor">
swagger: "2.0"
info:
version: 1.0.0
title: Swagger Pet Store
description: A sample Swagger 2.0 API
paths:
/pets:
get:
responses:
200:
description: Returns all pets
schema:
type: array
items:
$ref: pet
post:
parameters:
- name: petData
in: body
schema:
$ref: pet
responses:
201:
description: Adds a new pet
definitions:
pet:
type: object
required:
- name
- type
properties:
name:
type: string
minLength: 4
pattern: "^[a-zA-Z0-9- ]+$"
age:
type: integer
type:
type: string
enum: [cat, dog, bird]
</pre>
<div id="results" class="fade">
<div id="results-success" class="alert alert-success hidden">
<i class="glyphicon glyphicon-ok-sign result-icon" aria-hidden="true"></i>
The Swagger spec was parsed successfully.
<span id="results-refs" class="label label-success">0</span> $ref pointers were resolved,
including <span id="results-files" class="label label-success">0</span> external $refs.
</div>
<div id="results-error" class="alert alert-danger hidden">
<i class="glyphicon glyphicon-remove-sign result-icon" aria-hidden="true"></i>
<span id="results-error-message"></span>
</div>
<pre id="results-output" class="editor hidden"></pre>
</div>
</div>
<aside class="col-sm-4 col-md-3 col-lg-2 sidebar">
<div class="row">
<div class="col-xs-8 col-xs-offset-2 col-sm-12 col-sm-offset-0">
<button id="parse" class="btn btn-success btn-lg btn-block btn-img">
Parse It !
</button>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="checkbox">
<label>
<input type="checkbox" id="parseYaml" checked> Allow YAML
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="resolveRefs" checked> Resolve $ref pointers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="resolveExternalRefs" checked> Resolve <em>external</em> $refs
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="dereferenceRefs" checked> Dereference $refs
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="validateSchema" checked> Validate JSON schema
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="strictValidation" checked> Strict validation
</label>
</div>
</div>
</div>
</aside>
</div>
</main>
<footer class="container">
<p>
Swagger Parser is written by <a href="https://github.com/BigstickCarpet">James Messinger</a>.<br/>
This page is based on the Architect theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
</p>
</footer>
<script src="dist/swagger-parser.min.js"></script>
<script src="www/js/jquery.min.js"></script>
<script src="www/js/ace.min.js"></script>
<script src="www/js/main.js"></script>
</body>
</html>