Skip to content

Commit f623031

Browse files
Bentsen, TroelsBentsen, Troels
Bentsen, Troels
authored and
Bentsen, Troels
committed
Fix documentation and sample code for browser usage to reflect the new way to instantiate
1 parent df643cd commit f623031

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Download `browser/swagger-client.js` into your lib folder
8181
<script src='lib/swagger-client.js' type='text/javascript'></script>
8282
<script type="text/javascript">
8383
// initialize swagger, point to a resource listing
84-
window.swagger = new client.SwaggerClient({
84+
window.swagger = new SwaggerClient({
8585
url: "http://petstore.swagger.io/api/api-docs",
8686
success: function() {
8787
// upon connect, fetch a pet and set contents to element "mydata"

browser/index.html

+7
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
<head>
33
<title>Test Swagger Client</title>
44
<script src="swagger-client.js"></script>
5+
<script type="text/javascript">
6+
// initialize swagger
7+
var swagger = new SwaggerClient({
8+
url: "http://petstore.swagger.io/api/api-docs",
9+
success: function() {}
10+
});
11+
</script>
512
</head>
613
</html>

0 commit comments

Comments
 (0)