Skip to content

Commit

Permalink
match with 3.0.1-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
kongchen committed May 22, 2015
1 parent fb4e2d9 commit 47c3e03
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 42 deletions.
56 changes: 29 additions & 27 deletions generated/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@





# APIs


Expand All @@ -38,7 +40,7 @@

### PUT

Update an existing pet
<a id="updatePet">Update an existing pet</a>



Expand Down Expand Up @@ -79,7 +81,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>Pet object that needs to be added to the store</td>
<td> - </td>

Expand Down Expand Up @@ -113,7 +115,7 @@
### POST


Add a new pet to the store
<a id="addPet">Add a new pet to the store</a>



Expand Down Expand Up @@ -154,7 +156,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>Pet object that needs to be added to the store</td>
<td> - </td>

Expand Down Expand Up @@ -198,7 +200,7 @@

### GET

Finds Pets by status
<a id="findPetsByStatus">Finds Pets by status</a>

Multiple status values can be provided with comma seperated strings

Expand Down Expand Up @@ -285,7 +287,7 @@

### GET

Finds Pets by tags
<a id="findPetsByTags">Finds Pets by tags</a>

Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.

Expand Down Expand Up @@ -372,7 +374,7 @@

### GET

Find pet by ID
<a id="getPetById">Find pet by ID</a>

Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions

Expand Down Expand Up @@ -452,7 +454,7 @@
### POST


Updates a pet in the store with form data
<a id="updatePetWithForm">Updates a pet in the store with form data</a>



Expand Down Expand Up @@ -550,7 +552,7 @@

### DELETE

Deletes a pet
<a id="deletePet">Deletes a pet</a>



Expand Down Expand Up @@ -648,7 +650,7 @@
### POST


Place an order for a pet
<a id="placeOrder">Place an order for a pet</a>



Expand Down Expand Up @@ -679,7 +681,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>order placed for purchasing the pet</td>
<td> - </td>

Expand Down Expand Up @@ -724,7 +726,7 @@

### GET

Find purchase order by ID
<a id="getOrderById">Find purchase order by ID</a>

For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions

Expand Down Expand Up @@ -791,7 +793,7 @@

### DELETE

Delete purchase order by ID
<a id="deleteOrder">Delete purchase order by ID</a>

For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors

Expand Down Expand Up @@ -868,7 +870,7 @@
### POST


Create user
<a id="createUser">Create user</a>

This can only be done by the logged in user.

Expand Down Expand Up @@ -899,7 +901,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>Created user object</td>
<td> - </td>

Expand Down Expand Up @@ -948,7 +950,7 @@
### POST


Creates list of users with given input array
<a id="createUsersWithArrayInput">Creates list of users with given input array</a>



Expand Down Expand Up @@ -979,7 +981,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>List of user object</td>
<td> - </td>

Expand Down Expand Up @@ -1028,7 +1030,7 @@
### POST


Creates list of users with given input array
<a id="createUsersWithListInput">Creates list of users with given input array</a>



Expand Down Expand Up @@ -1059,7 +1061,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>List of user object</td>
<td> - </td>

Expand Down Expand Up @@ -1103,7 +1105,7 @@

### GET

Logs user into the system
<a id="loginUser">Logs user into the system</a>



Expand Down Expand Up @@ -1194,7 +1196,7 @@

### GET

Logs out current logged in user session
<a id="logoutUser">Logs out current logged in user session</a>



Expand Down Expand Up @@ -1246,7 +1248,7 @@

### GET

Get user by user name
<a id="getUserByName">Get user by user name</a>



Expand Down Expand Up @@ -1309,7 +1311,7 @@

### PUT

Updated user
<a id="updateUser">Updated user</a>

This can only be done by the logged in user.

Expand Down Expand Up @@ -1353,7 +1355,7 @@
<tr>
<th>body</th>
<td>body</td>
<td>no</td>
<td>yes</td>
<td>Updated user object</td>
<td> - </td>

Expand Down Expand Up @@ -1387,7 +1389,7 @@

### DELETE

Delete user
<a id="deleteUser">Delete user</a>

This can only be done by the logged in user.

Expand Down Expand Up @@ -1615,7 +1617,7 @@
<td>category</td>
<td>

<a href="#/definitions/#/definitions/Category">#/definitions/Category</a>
<a href="#/definitions/Category">Category</a>


</td>
Expand Down Expand Up @@ -1655,7 +1657,7 @@
<td>


array[<a href="#/definitions/#/definitions/Tag">#/definitions/Tag</a>]
array[<a href="#/definitions/Tag">Tag</a>]



Expand Down
18 changes: 9 additions & 9 deletions generated/swagger-ui/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"basePath" : "/api",
"tags" : [ {
"name" : "pet"
}, {
"name" : "store"
}, {
"name" : "user"
}, {
"name" : "store"
} ],
"schemes" : [ "http", "https" ],
"paths" : {
Expand All @@ -38,7 +38,7 @@
"in" : "body",
"name" : "body",
"description" : "Pet object that needs to be added to the store",
"required" : false,
"required" : true,
"schema" : {
"$ref" : "#/definitions/Pet"
}
Expand All @@ -63,7 +63,7 @@
"in" : "body",
"name" : "body",
"description" : "Pet object that needs to be added to the store",
"required" : false,
"required" : true,
"schema" : {
"$ref" : "#/definitions/Pet"
}
Expand Down Expand Up @@ -272,7 +272,7 @@
"in" : "body",
"name" : "body",
"description" : "order placed for purchasing the pet",
"required" : false,
"required" : true,
"schema" : {
"$ref" : "#/definitions/Order"
}
Expand Down Expand Up @@ -353,7 +353,7 @@
"in" : "body",
"name" : "body",
"description" : "Created user object",
"required" : false,
"required" : true,
"schema" : {
"$ref" : "#/definitions/User"
}
Expand All @@ -376,7 +376,7 @@
"in" : "body",
"name" : "body",
"description" : "List of user object",
"required" : false,
"required" : true,
"schema" : {
"type" : "array",
"items" : {
Expand All @@ -402,7 +402,7 @@
"in" : "body",
"name" : "body",
"description" : "List of user object",
"required" : false,
"required" : true,
"schema" : {
"type" : "array",
"items" : {
Expand Down Expand Up @@ -509,7 +509,7 @@
"in" : "body",
"name" : "body",
"description" : "Updated user object",
"required" : false,
"required" : true,
"schema" : {
"$ref" : "#/definitions/User"
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.0.1-SNAPSHOT</version>
<configuration>
<apiSources>
<apiSource>
Expand Down
8 changes: 6 additions & 2 deletions templates/markdown.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

{{#if produces}}**Produces:** {{join produces ", "}}{{/if}}

{{#if securityDefinitions}}
# Security Definitions
{{/if}}
{{> security}}

# APIs

Expand Down Expand Up @@ -86,11 +90,11 @@
<td>
{{#ifeq type "array"}}
{{#items.$ref}}
{{type}}[<a href="#/definitions/{{items.$ref}}">{{items.$ref}}</a>]
{{type}}[<a href="{{items.$ref}}">{{basename items.$ref}}</a>]
{{/items.$ref}}
{{^items.$ref}}{{type}}[{{items.type}}]{{/items.$ref}}
{{else}}
{{#$ref}}<a href="#/definitions/{{$ref}}">{{$ref}}</a>{{/$ref}}
{{#$ref}}<a href="{{$ref}}">{{basename $ref}}</a>{{/$ref}}
{{^$ref}}{{type}}{{#format}} ({{format}}){{/format}}{{/$ref}}
{{/ifeq}}
</td>
Expand Down
6 changes: 3 additions & 3 deletions templates/operation.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#deprecated}}-deprecated-{{/deprecated}}
{{summary}}
<a id="{{operationId}}">{{summary}}</a>

{{description}}

Expand Down Expand Up @@ -41,11 +41,11 @@
<th>{{name}}</th>
<td>{{in}}</td>
<td>{{#if required}}yes{{else}}no{{/if}}</td>
<td>{{description}}</td>
<td>{{description}}{{#if pattern}} (**Pattern**: `{{pattern}}`){{/if}}</td>
<td> - </td>
{{#ifeq in "body"}}
<td>
{{#ifeq schema.type "array"}}Array[<a href="#/definitions/{{basename schema.items.$ref}}">{{basename schema.items.$ref}}</a>]{{/ifeq}}
{{#ifeq schema.type "array"}}Array[<a href="{{schema.items.$ref}}">{{basename schema.items.$ref}}</a>]{{/ifeq}}
{{#schema.$ref}}<a href="{{schema.$ref}}">{{basename schema.$ref}}</a> {{/schema.$ref}}
</td>
{{else}}
Expand Down
Loading

0 comments on commit 47c3e03

Please sign in to comment.