Skip to content

Commit 7d28c53

Browse files
committed
updated README for latest release
1 parent cc9d221 commit 7d28c53

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@ client.authorizations.add("apiKey", new client.ApiKeyAuthorization("api_key","sp
7575

7676
### Calling an API with swagger + the browser!
7777

78-
Download `swagger-client.js` and `shred.bundle.js` into your lib folder
78+
Download `browser/swagger-client.js` into your lib folder
7979

8080
```js
81-
<script src='lib/shred.bundle.js' type='text/javascript'></script>
8281
<script src='lib/swagger-client.js' type='text/javascript'></script>
8382
<script type="text/javascript">
8483
// initialize swagger, point to a resource listing
85-
window.swagger = new SwaggerClient({
84+
window.swagger = new client.SwaggerClient({
8685
url: "http://petstore.swagger.io/api/api-docs",
8786
success: function() {
8887
// upon connect, fetch a pet and set contents to element "mydata"
@@ -101,19 +100,19 @@ var pet = {
101100
id: 100,
102101
name: "dog"};
103102

104-
swagger.apis.pet.addPet({body: pet});
103+
swagger.pet.addPet({body: pet});
105104
```
106105

107106
### Sending XML in as a payload to your API?
108107
```js
109108
var pet = "<Pet><id>2</id><name>monster</name></Pet>";
110109

111-
swagger.apis.pet.addPet({body: pet}, {requestContentType:"application/xml"});
110+
swagger.pet.addPet({body: pet}, {requestContentType:"application/xml"});
112111
```
113112

114113
### Need XML response?
115114
```js
116-
swagger.apis.pet.getPetById({petId:1}, {responseContentType:"application/xml"});
115+
swagger.pet.getPetById({petId:1}, {responseContentType:"application/xml"});
117116
```
118117

119118
### Custom request signing
@@ -152,7 +151,7 @@ Development
152151
-----------
153152

154153
Please [fork the code](https://github.com/swagger-api/swagger-js) and help us improve
155-
swagger-client.js. Send us a pull request and **we'll mail you a wordnik T-shirt!**
154+
swagger-client.js. Send us a pull request to the `develop_2.0` branch! Tests make merges get accepted more quickly.
156155

157156
swagger-js use gulp for Node.js.
158157

0 commit comments

Comments
 (0)