Skip to content

Commit 652ccd3

Browse files
author
Bruno Tremblay
committed
adding example
1 parent a11e544 commit 652ccd3

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

docs/examples/binary-response.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!doctype html>
2+
<head>
3+
<!-- Global site tag (gtag.js) - Google Analytics -->
4+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-132775238-1"></script>
5+
<script>
6+
window.dataLayer = window.dataLayer || [];
7+
function gtag(){dataLayer.push(arguments);}
8+
gtag('js', new Date());
9+
10+
gtag('config', 'UA-132775238-1');
11+
</script>
12+
13+
<meta charset="utf-8">
14+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
15+
<script type="text/javascript" src="../rapidoc-min.js"></script>
16+
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&family=Roboto+Mono&display=swap" rel="stylesheet">
17+
<style>
18+
rapi-doc{
19+
width:100%;
20+
}
21+
</style>
22+
</head>
23+
<body>
24+
<rapi-doc spec-url="../specs/binary-response.json"
25+
show-info = "false"
26+
allow-server-selection = "false"
27+
allow-authentication = "false"
28+
show-header = "false"
29+
render-style = "read"
30+
regular-font = 'Open Sans'
31+
mono-font = "Roboto Mono"
32+
> </rapi-doc>
33+
</body>
34+
</html>

docs/list.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,13 @@ <h2 style="font-weight:700"> Branding Ideas </h2>
278278
</div>
279279
</div>
280280

281+
<div class = "container">
282+
<a href="./examples/binary-response.html"> Binary Response </a>
283+
<div class = "c-description" >
284+
Download or view binary response
285+
</div>
286+
</div>
287+
281288
<div class = "container">
282289
<a href="./examples/multipart-formdata.html"> Multipart Formdata </a>
283290
<div class = "c-description" >

docs/specs/binary-response.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"openapi" : "3.0.0",
3+
"info" : {
4+
"title" : "photos API",
5+
"description" : "picsum",
6+
"version" : "1.0.0"
7+
},
8+
"servers" : [ {
9+
"url" : "https://picsum.photos/",
10+
"description" : "picsum photos"
11+
} ],
12+
"paths" : {
13+
"/{width}/{height}" : {
14+
"get" : {
15+
"description" : "Return a photo",
16+
"parameters" : [ {
17+
"name" : "width",
18+
"in" : "path",
19+
"description" : "photo width",
20+
"required" : true,
21+
"schema" : {
22+
"minimum" : 100,
23+
"type" : "integer",
24+
"format" : "int32"
25+
}
26+
}, {
27+
"name" : "height",
28+
"in" : "path",
29+
"description" : "photo height",
30+
"required" : true,
31+
"schema" : {
32+
"minimum" : 100,
33+
"type" : "integer",
34+
"format" : "int32"
35+
}
36+
} ],
37+
"responses" : {
38+
"200" : {
39+
"description" : "Default response"
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)