forked from loafle/openapi-generator-original
rebuilt
This commit is contained in:
parent
3a2f258517
commit
99a11636da
@ -123,7 +123,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
|||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for filter
|
||||||
* @return List[Pet]
|
* @return List[Pet]
|
||||||
*/
|
*/
|
||||||
def findPetsByStatus (status: List[String]) : Option[List[Pet]] = {
|
def findPetsByStatus (status: List[String] = available) : Option[List[Pet]] = {
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
|
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
<div class="field-items">
|
<div class="field-items">
|
||||||
<div class="param">status (optional)</div>
|
<div class="param">status (optional)</div>
|
||||||
|
|
||||||
<div class="param-desc"><span class="param-type">Query Parameter</span> — Status values that need to be considered for filter </div>
|
<div class="param-desc"><span class="param-type">Query Parameter</span> — Status values that need to be considered for filter default: available</div>
|
||||||
|
|
||||||
</div> <!-- field-items -->
|
</div> <!-- field-items -->
|
||||||
<h3 class="field-label">Return type</h3>
|
<h3 class="field-label">Return type</h3>
|
||||||
@ -98,16 +98,8 @@
|
|||||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||||
<pre class="example"><code><Pet>
|
<pre class="example"><code><Pet>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<Category>
|
|
||||||
<id>123456</id>
|
|
||||||
<name>string</name>
|
|
||||||
</Category>
|
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>string</photoUrls>
|
<photoUrls>string</photoUrls>
|
||||||
<Tag>
|
|
||||||
<id>123456</id>
|
|
||||||
<name>string</name>
|
|
||||||
</Tag>
|
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet></code></pre>
|
</Pet></code></pre>
|
||||||
|
|
||||||
@ -153,16 +145,8 @@
|
|||||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||||
<pre class="example"><code><Pet>
|
<pre class="example"><code><Pet>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<Category>
|
|
||||||
<id>123456</id>
|
|
||||||
<name>string</name>
|
|
||||||
</Category>
|
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>string</photoUrls>
|
<photoUrls>string</photoUrls>
|
||||||
<Tag>
|
|
||||||
<id>123456</id>
|
|
||||||
<name>string</name>
|
|
||||||
</Tag>
|
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet></code></pre>
|
</Pet></code></pre>
|
||||||
|
|
||||||
@ -208,16 +192,8 @@
|
|||||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||||
<pre class="example"><code><Pet>
|
<pre class="example"><code><Pet>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<Category>
|
|
||||||
<id>123456</id>
|
|
||||||
<name>string</name>
|
|
||||||
</Category>
|
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>string</photoUrls>
|
<photoUrls>string</photoUrls>
|
||||||
<Tag>
|
|
||||||
<id>123456</id>
|
|
||||||
<name>string</name>
|
|
||||||
</Tag>
|
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet></code></pre>
|
</Pet></code></pre>
|
||||||
|
|
||||||
@ -356,7 +332,7 @@
|
|||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou",
|
"status" : "aeiou",
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2015-05-21T05:19:00.242+0000"
|
"shipDate" : "2015-05-21T05:49:06.118+0000"
|
||||||
}</code></pre>
|
}</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
@ -365,7 +341,7 @@
|
|||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2015-05-20T22:19:00.244Z</shipDate>
|
<shipDate>2015-05-20T22:49:06.120Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order></code></pre>
|
</Order></code></pre>
|
||||||
@ -399,7 +375,7 @@
|
|||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou",
|
"status" : "aeiou",
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2015-05-21T05:19:00.245+0000"
|
"shipDate" : "2015-05-21T05:49:06.121+0000"
|
||||||
}</code></pre>
|
}</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
@ -408,7 +384,7 @@
|
|||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2015-05-20T22:19:00.246Z</shipDate>
|
<shipDate>2015-05-20T22:49:06.122Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order></code></pre>
|
</Order></code></pre>
|
||||||
|
@ -70,7 +70,7 @@ public class PetApi {
|
|||||||
|
|
||||||
@com.wordnik.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value") })
|
@com.wordnik.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value") })
|
||||||
|
|
||||||
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter") @QueryParam("status") List<String> status)
|
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue="available") @QueryParam("status") List<String> status)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
|
@ -43,6 +43,7 @@ public class PetApi {
|
|||||||
consumes = { "application/json", "application/xml" },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
public ResponseEntity<Void> updatePet(
|
public ResponseEntity<Void> updatePet(
|
||||||
|
|
||||||
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -59,6 +60,7 @@ public class PetApi {
|
|||||||
consumes = { "application/json", "application/xml" },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> addPet(
|
public ResponseEntity<Void> addPet(
|
||||||
|
|
||||||
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -75,7 +77,8 @@ public class PetApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
public ResponseEntity<Pet> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter") @RequestParam(value = "status", required = false) List<String> status
|
public ResponseEntity<Pet> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue = "available") @RequestParam(value = "status", required = false, defaultValue="available") List<String> status
|
||||||
|
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -93,6 +96,7 @@ public class PetApi {
|
|||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
public ResponseEntity<Pet> findPetsByTags(@ApiParam(value = "Tags to filter by") @RequestParam(value = "tags", required = false) List<String> tags
|
public ResponseEntity<Pet> findPetsByTags(@ApiParam(value = "Tags to filter by") @RequestParam(value = "tags", required = false) List<String> tags
|
||||||
|
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -110,7 +114,8 @@ public class PetApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
public ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId
|
public ResponseEntity<Pet> getPetById(
|
||||||
|
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -126,14 +131,17 @@ public class PetApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
consumes = { "application/x-www-form-urlencoded" },
|
consumes = { "application/x-www-form-urlencoded" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") String petId
|
public ResponseEntity<Void> updatePetWithForm(
|
||||||
|
@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") String petId
|
||||||
,
|
,
|
||||||
|
|
||||||
|
|
||||||
@ApiParam(value = "Updated name of the pet" )@RequestPart("name") String name,
|
|
||||||
|
@ApiParam(value = "Updated name of the pet" ) @RequestPart(value="name", required=false) String name,
|
||||||
|
|
||||||
|
|
||||||
@ApiParam(value = "Updated status of the pet" )@RequestPart("status") String status)
|
|
||||||
|
@ApiParam(value = "Updated status of the pet" ) @RequestPart(value="status", required=false) String status)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -148,9 +156,11 @@ public class PetApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
public ResponseEntity<Void> deletePet(@ApiParam(value = "" ) @RequestHeader(value="apiKey", required=false) String apiKey
|
public ResponseEntity<Void> deletePet(
|
||||||
|
@ApiParam(value = "" ) @RequestHeader(value="apiKey", required=false) String apiKey
|
||||||
,
|
,
|
||||||
@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId
|
|
||||||
|
@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -166,11 +176,14 @@ public class PetApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
consumes = { "multipart/form-data" },
|
consumes = { "multipart/form-data" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId
|
public ResponseEntity<Void> uploadFile(
|
||||||
|
@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId
|
||||||
,
|
,
|
||||||
|
|
||||||
|
|
||||||
@ApiParam(value = "Additional data to pass to server" )@RequestPart("additionalMetadata") String additionalMetadata,
|
|
||||||
|
@ApiParam(value = "Additional data to pass to server" ) @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,
|
||||||
|
|
||||||
|
|
||||||
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile fileDetail)
|
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile fileDetail)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
|
@ -57,6 +57,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Order> placeOrder(
|
public ResponseEntity<Order> placeOrder(
|
||||||
|
|
||||||
@ApiParam(value = "order placed for purchasing the pet" ) Order body)
|
@ApiParam(value = "order placed for purchasing the pet" ) Order body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -74,7 +75,8 @@ public class StoreApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
public ResponseEntity<Order> getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") String orderId
|
public ResponseEntity<Order> getOrderById(
|
||||||
|
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") String orderId
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -91,7 +93,8 @@ public class StoreApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
public ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId
|
public ResponseEntity<Void> deleteOrder(
|
||||||
|
@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
@ -41,6 +41,7 @@ public class UserApi {
|
|||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> createUser(
|
public ResponseEntity<Void> createUser(
|
||||||
|
|
||||||
@ApiParam(value = "Created user object" ) User body)
|
@ApiParam(value = "Created user object" ) User body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -57,6 +58,7 @@ public class UserApi {
|
|||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> createUsersWithArrayInput(
|
public ResponseEntity<Void> createUsersWithArrayInput(
|
||||||
|
|
||||||
@ApiParam(value = "List of user object" ) List<User> body)
|
@ApiParam(value = "List of user object" ) List<User> body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -73,6 +75,7 @@ public class UserApi {
|
|||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> createUsersWithListInput(
|
public ResponseEntity<Void> createUsersWithListInput(
|
||||||
|
|
||||||
@ApiParam(value = "List of user object" ) List<User> body)
|
@ApiParam(value = "List of user object" ) List<User> body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -90,8 +93,10 @@ public class UserApi {
|
|||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
public ResponseEntity<String> loginUser(@ApiParam(value = "The user name for login") @RequestParam(value = "username", required = false) String username
|
public ResponseEntity<String> loginUser(@ApiParam(value = "The user name for login") @RequestParam(value = "username", required = false) String username
|
||||||
|
|
||||||
,
|
,
|
||||||
@ApiParam(value = "The password for login in clear text") @RequestParam(value = "password", required = false) String password
|
@ApiParam(value = "The password for login in clear text") @RequestParam(value = "password", required = false) String password
|
||||||
|
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -124,7 +129,8 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username
|
public ResponseEntity<User> getUserByName(
|
||||||
|
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -141,9 +147,11 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
public ResponseEntity<Void> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username
|
public ResponseEntity<Void> updateUser(
|
||||||
|
@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username
|
||||||
,
|
,
|
||||||
|
|
||||||
|
|
||||||
@ApiParam(value = "Updated user object" ) User body)
|
@ApiParam(value = "Updated user object" ) User body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -160,7 +168,8 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
public ResponseEntity<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username
|
public ResponseEntity<Void> deleteUser(
|
||||||
|
@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username
|
||||||
)
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user