mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-05 15:10:49 +00:00
rebuilt
This commit is contained in:
parent
6fe6a6daa7
commit
11dd7784f8
@ -129,7 +129,7 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-core-version>1.5.2-M2-SNAPSHOT</swagger-core-version>
|
<swagger-core-version>1.5.2-M2</swagger-core-version>
|
||||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||||
<jersey-version>1.13</jersey-version>
|
<jersey-version>1.13</jersey-version>
|
||||||
<slf4j-version>1.6.3</slf4j-version>
|
<slf4j-version>1.6.3</slf4j-version>
|
||||||
|
@ -63,7 +63,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml",
|
"application/json","application/xml"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml",
|
"application/json","application/xml"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/x-www-form-urlencoded",
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -481,7 +481,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"multipart/form-data",
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml",
|
"application/json","application/xml"
|
||||||
};
|
};
|
||||||
|
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
@ -107,7 +107,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml",
|
"application/json","application/xml"
|
||||||
};
|
};
|
||||||
|
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
@ -325,7 +325,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/x-www-form-urlencoded",
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
|
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
@ -449,7 +449,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"multipart/form-data",
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
|
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
@ -75,7 +75,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
NSArray* requestContentTypes = @[@"application/json", @"application/xml", ];
|
NSArray* requestContentTypes = @[@"application/json", @"application/xml"];
|
||||||
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
||||||
|
|
||||||
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
||||||
@ -166,7 +166,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
NSArray* requestContentTypes = @[@"application/json", @"application/xml", ];
|
NSArray* requestContentTypes = @[@"application/json", @"application/xml"];
|
||||||
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
||||||
|
|
||||||
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
||||||
@ -519,7 +519,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:[NSString stringWithFormat:@"%@%@%@", @"{", @"petId", @"}"]] withString: [SWGApiClient escape:petId]];
|
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:[NSString stringWithFormat:@"%@%@%@", @"{", @"petId", @"}"]] withString: [SWGApiClient escape:petId]];
|
||||||
|
|
||||||
|
|
||||||
NSArray* requestContentTypes = @[@"application/x-www-form-urlencoded", ];
|
NSArray* requestContentTypes = @[@"application/x-www-form-urlencoded"];
|
||||||
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
||||||
|
|
||||||
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
||||||
@ -681,7 +681,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:[NSString stringWithFormat:@"%@%@%@", @"{", @"petId", @"}"]] withString: [SWGApiClient escape:petId]];
|
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:[NSString stringWithFormat:@"%@%@%@", @"{", @"petId", @"}"]] withString: [SWGApiClient escape:petId]];
|
||||||
|
|
||||||
|
|
||||||
NSArray* requestContentTypes = @[@"multipart/form-data", ];
|
NSArray* requestContentTypes = @[@"multipart/form-data"];
|
||||||
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
NSString* requestContentType = [requestContentTypes count] > 0 ? requestContentTypes[0] : @"application/json";
|
||||||
|
|
||||||
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
NSArray* responseContentTypes = @[@"application/json", @"application/xml"];
|
||||||
|
@ -142,20 +142,21 @@ class APIClient {
|
|||||||
$response_info = curl_getinfo($curl);
|
$response_info = curl_getinfo($curl);
|
||||||
|
|
||||||
// Handle the response
|
// Handle the response
|
||||||
if ($response === false) { // error, likely in the client side
|
if ($response_info['http_code'] == 0) {
|
||||||
throw new APIClientException("API Error ($url): ".curl_error($curl), 0, $response_info, $response);
|
throw new APIClientException("TIMEOUT: api call to " . $url .
|
||||||
|
" took more than 5s to return", 0, $response_info, $response);
|
||||||
} else if ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
|
} else if ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
|
||||||
$data = json_decode($response);
|
$data = json_decode($response);
|
||||||
if (json_last_error() > 0) { // if response is a string
|
if (json_last_error() > 0) { // if response is a string
|
||||||
$data = $response;
|
$data = $response;
|
||||||
}
|
}
|
||||||
} else if ($response_info['http_code'] == 401) { // server returns 401
|
} else if ($response_info['http_code'] == 401) {
|
||||||
throw new APIClientException("Unauthorized API request to " . $url .
|
throw new APIClientException("Unauthorized API request to " . $url .
|
||||||
": " . serialize($response), 0, $response_info, $response);
|
": " . serialize($response), 0, $response_info, $response);
|
||||||
} else if ($response_info['http_code'] == 404) { // server returns 404
|
} else if ($response_info['http_code'] == 404) {
|
||||||
$data = null;
|
$data = null;
|
||||||
} else {
|
} else {
|
||||||
throw new APIClientException("Can't connect to the API: " . $url .
|
throw new APIClientException("Can't connect to the api: " . $url .
|
||||||
" response code: " .
|
" response code: " .
|
||||||
$response_info['http_code'], 0, $response_info, $response);
|
$response_info['http_code'], 0, $response_info, $response);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ class PetApi {
|
|||||||
if ($_header_accept !== '') {
|
if ($_header_accept !== '') {
|
||||||
$headerParams['Accept'] = $_header_accept;
|
$headerParams['Accept'] = $_header_accept;
|
||||||
}
|
}
|
||||||
$_header_content_type = array('application/json','application/xml',);
|
$_header_content_type = array('application/json','application/xml');
|
||||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ class PetApi {
|
|||||||
if ($_header_accept !== '') {
|
if ($_header_accept !== '') {
|
||||||
$headerParams['Accept'] = $_header_accept;
|
$headerParams['Accept'] = $_header_accept;
|
||||||
}
|
}
|
||||||
$_header_content_type = array('application/json','application/xml',);
|
$_header_content_type = array('application/json','application/xml');
|
||||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||||
|
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ class PetApi {
|
|||||||
if ($_header_accept !== '') {
|
if ($_header_accept !== '') {
|
||||||
$headerParams['Accept'] = $_header_accept;
|
$headerParams['Accept'] = $_header_accept;
|
||||||
}
|
}
|
||||||
$_header_content_type = array('application/x-www-form-urlencoded',);
|
$_header_content_type = array('application/x-www-form-urlencoded');
|
||||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||||
|
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ class PetApi {
|
|||||||
if ($_header_accept !== '') {
|
if ($_header_accept !== '') {
|
||||||
$headerParams['Accept'] = $_header_accept;
|
$headerParams['Accept'] = $_header_accept;
|
||||||
}
|
}
|
||||||
$_header_content_type = array('multipart/form-data',);
|
$_header_content_type = array('multipart/form-data');
|
||||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class PetApi(object):
|
|||||||
accepts = ['application/json', 'application/xml']
|
accepts = ['application/json', 'application/xml']
|
||||||
headerParams['Accept'] = ', '.join(accepts)
|
headerParams['Accept'] = ', '.join(accepts)
|
||||||
|
|
||||||
content_types = ['application/json', 'application/xml', ]
|
content_types = ['application/json', 'application/xml']
|
||||||
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
||||||
|
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ class PetApi(object):
|
|||||||
accepts = ['application/json', 'application/xml']
|
accepts = ['application/json', 'application/xml']
|
||||||
headerParams['Accept'] = ', '.join(accepts)
|
headerParams['Accept'] = ', '.join(accepts)
|
||||||
|
|
||||||
content_types = ['application/json', 'application/xml', ]
|
content_types = ['application/json', 'application/xml']
|
||||||
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
||||||
|
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ class PetApi(object):
|
|||||||
accepts = ['application/json', 'application/xml']
|
accepts = ['application/json', 'application/xml']
|
||||||
headerParams['Accept'] = ', '.join(accepts)
|
headerParams['Accept'] = ', '.join(accepts)
|
||||||
|
|
||||||
content_types = ['application/x-www-form-urlencoded', ]
|
content_types = ['application/x-www-form-urlencoded']
|
||||||
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
||||||
|
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ class PetApi(object):
|
|||||||
accepts = ['application/json', 'application/xml']
|
accepts = ['application/json', 'application/xml']
|
||||||
headerParams['Accept'] = ', '.join(accepts)
|
headerParams['Accept'] = ', '.join(accepts)
|
||||||
|
|
||||||
content_types = ['multipart/form-data', ]
|
content_types = ['multipart/form-data']
|
||||||
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
headerParams['Content-Type'] = content_types[0] if len(content_types) > 0 else 'application/json'
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
#include "SWGCategory.h"
|
|
||||||
#include <QList>
|
|
||||||
#include "SWGTag.h"
|
#include "SWGTag.h"
|
||||||
|
#include <QList>
|
||||||
|
#include "SWGCategory.h"
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ module SwaggerClient
|
|||||||
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
||||||
|
|
||||||
# HTTP header 'Content-Type'
|
# HTTP header 'Content-Type'
|
||||||
_header_content_type = ['application/json', 'application/xml', ]
|
_header_content_type = ['application/json', 'application/xml']
|
||||||
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
||||||
|
|
||||||
# form parameters
|
# form parameters
|
||||||
@ -62,7 +62,7 @@ module SwaggerClient
|
|||||||
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
||||||
|
|
||||||
# HTTP header 'Content-Type'
|
# HTTP header 'Content-Type'
|
||||||
_header_content_type = ['application/json', 'application/xml', ]
|
_header_content_type = ['application/json', 'application/xml']
|
||||||
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
||||||
|
|
||||||
# form parameters
|
# form parameters
|
||||||
@ -215,7 +215,7 @@ module SwaggerClient
|
|||||||
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
||||||
|
|
||||||
# HTTP header 'Content-Type'
|
# HTTP header 'Content-Type'
|
||||||
_header_content_type = ['application/x-www-form-urlencoded', ]
|
_header_content_type = ['application/x-www-form-urlencoded']
|
||||||
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
||||||
|
|
||||||
# form parameters
|
# form parameters
|
||||||
@ -297,7 +297,7 @@ module SwaggerClient
|
|||||||
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
||||||
|
|
||||||
# HTTP header 'Content-Type'
|
# HTTP header 'Content-Type'
|
||||||
_header_content_type = ['multipart/form-data', ]
|
_header_content_type = ['multipart/form-data']
|
||||||
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
||||||
|
|
||||||
# form parameters
|
# form parameters
|
||||||
|
@ -79,11 +79,37 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>[ {\n "tags" : [ {\n "id" : 123456789,\n "name" : "aeiou"\n } ],\n "id" : 123456789,\n "category" : {\n "id" : 123456789,\n "name" : "aeiou"\n },\n "status" : "aeiou",\n "name" : "doggie",\n "photoUrls" : [ "aeiou" ]\n} ]</code></pre>
|
<pre class="example"><code>[ {
|
||||||
|
"tags" : [ {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
|
"id" : 123456789,
|
||||||
|
"category" : {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
},
|
||||||
|
"status" : "aeiou",
|
||||||
|
"name" : "doggie",
|
||||||
|
"photoUrls" : [ "aeiou" ]
|
||||||
|
} ]</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<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>\n <id>123456</id>\n <Category>\n <id>123456</id>\n <name>string</name>\n </Category>\n <name>doggie</name>\n <photoUrls>string</photoUrls>\n <Tag>\n <id>123456</id>\n <name>string</name>\n </Tag>\n <status>string</status>\n</Pet></code></pre>
|
<pre class="example"><code><Pet>
|
||||||
|
<id>123456</id>
|
||||||
|
<Category>
|
||||||
|
<id>123456</id>
|
||||||
|
<name>string</name>
|
||||||
|
</Category>
|
||||||
|
<name>doggie</name>
|
||||||
|
<photoUrls>string</photoUrls>
|
||||||
|
<Tag>
|
||||||
|
<id>123456</id>
|
||||||
|
<name>string</name>
|
||||||
|
</Tag>
|
||||||
|
<status>string</status>
|
||||||
|
</Pet></code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
@ -108,11 +134,37 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>[ {\n "tags" : [ {\n "id" : 123456789,\n "name" : "aeiou"\n } ],\n "id" : 123456789,\n "category" : {\n "id" : 123456789,\n "name" : "aeiou"\n },\n "status" : "aeiou",\n "name" : "doggie",\n "photoUrls" : [ "aeiou" ]\n} ]</code></pre>
|
<pre class="example"><code>[ {
|
||||||
|
"tags" : [ {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
|
"id" : 123456789,
|
||||||
|
"category" : {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
},
|
||||||
|
"status" : "aeiou",
|
||||||
|
"name" : "doggie",
|
||||||
|
"photoUrls" : [ "aeiou" ]
|
||||||
|
} ]</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<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>\n <id>123456</id>\n <Category>\n <id>123456</id>\n <name>string</name>\n </Category>\n <name>doggie</name>\n <photoUrls>string</photoUrls>\n <Tag>\n <id>123456</id>\n <name>string</name>\n </Tag>\n <status>string</status>\n</Pet></code></pre>
|
<pre class="example"><code><Pet>
|
||||||
|
<id>123456</id>
|
||||||
|
<Category>
|
||||||
|
<id>123456</id>
|
||||||
|
<name>string</name>
|
||||||
|
</Category>
|
||||||
|
<name>doggie</name>
|
||||||
|
<photoUrls>string</photoUrls>
|
||||||
|
<Tag>
|
||||||
|
<id>123456</id>
|
||||||
|
<name>string</name>
|
||||||
|
</Tag>
|
||||||
|
<status>string</status>
|
||||||
|
</Pet></code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
@ -137,11 +189,37 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>{\n "tags" : [ {\n "id" : 123456789,\n "name" : "aeiou"\n } ],\n "id" : 123456789,\n "category" : {\n "id" : 123456789,\n "name" : "aeiou"\n },\n "status" : "aeiou",\n "name" : "doggie",\n "photoUrls" : [ "aeiou" ]\n}</code></pre>
|
<pre class="example"><code>{
|
||||||
|
"tags" : [ {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
|
"id" : 123456789,
|
||||||
|
"category" : {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
},
|
||||||
|
"status" : "aeiou",
|
||||||
|
"name" : "doggie",
|
||||||
|
"photoUrls" : [ "aeiou" ]
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<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>\n <id>123456</id>\n <Category>\n <id>123456</id>\n <name>string</name>\n </Category>\n <name>doggie</name>\n <photoUrls>string</photoUrls>\n <Tag>\n <id>123456</id>\n <name>string</name>\n </Tag>\n <status>string</status>\n</Pet></code></pre>
|
<pre class="example"><code><Pet>
|
||||||
|
<id>123456</id>
|
||||||
|
<Category>
|
||||||
|
<id>123456</id>
|
||||||
|
<name>string</name>
|
||||||
|
</Category>
|
||||||
|
<name>doggie</name>
|
||||||
|
<photoUrls>string</photoUrls>
|
||||||
|
<Tag>
|
||||||
|
<id>123456</id>
|
||||||
|
<name>string</name>
|
||||||
|
</Tag>
|
||||||
|
<status>string</status>
|
||||||
|
</Pet></code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
@ -241,11 +319,13 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>{\n "key" : 123\n}</code></pre>
|
<pre class="example"><code>{
|
||||||
|
"key" : 123
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<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>not implemented com.wordnik.swagger.models.properties.MapProperty@5076b51c</code></pre>
|
<pre class="example"><code>not implemented com.wordnik.swagger.models.properties.MapProperty@3e</code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
@ -270,11 +350,25 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>{\n "id" : 123456789,\n "petId" : 123456789,\n "complete" : true,\n "status" : "aeiou",\n "quantity" : 123,\n "shipDate" : "2015-05-12T09:58:06.953+0000"\n}</code></pre>
|
<pre class="example"><code>{
|
||||||
|
"id" : 123456789,
|
||||||
|
"petId" : 123456789,
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou",
|
||||||
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2015-05-21T05:19:00.242+0000"
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<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><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-05-12T05:58:06.956Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
<pre class="example"><code><Order>
|
||||||
|
<id>123456</id>
|
||||||
|
<petId>123456</petId>
|
||||||
|
<quantity>0</quantity>
|
||||||
|
<shipDate>2015-05-20T22:19:00.244Z</shipDate>
|
||||||
|
<status>string</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order></code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
@ -299,11 +393,25 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>{\n "id" : 123456789,\n "petId" : 123456789,\n "complete" : true,\n "status" : "aeiou",\n "quantity" : 123,\n "shipDate" : "2015-05-12T09:58:06.957+0000"\n}</code></pre>
|
<pre class="example"><code>{
|
||||||
|
"id" : 123456789,
|
||||||
|
"petId" : 123456789,
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou",
|
||||||
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2015-05-21T05:19:00.245+0000"
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<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><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-05-12T05:58:06.957Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
<pre class="example"><code><Order>
|
||||||
|
<id>123456</id>
|
||||||
|
<petId>123456</petId>
|
||||||
|
<quantity>0</quantity>
|
||||||
|
<shipDate>2015-05-20T22:19:00.246Z</shipDate>
|
||||||
|
<status>string</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order></code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
@ -415,7 +523,7 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>"aeiou"</code></pre>
|
<pre class="example"><code>"aeiou"</code></pre>
|
||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||||
@ -462,11 +570,16 @@
|
|||||||
|
|
||||||
<h3 class="field-label">Example data</h3>
|
<h3 class="field-label">Example data</h3>
|
||||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||||
<pre class="example"><code>{\n "id" : 123456789,\n "lastName" : "aeiou",\n "phone" : "aeiou",\n "username" : "aeiou",\n "email" : "aeiou",\n "userStatus" : 123,\n "firstName" : "aeiou",\n "password" : "aeiou"\n}</code></pre>
|
<pre class="example"><code>{
|
||||||
|
"id" : 1,
|
||||||
<h3 class="field-label">Example data</h3>
|
"username" : "johnp",
|
||||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
"firstName" : "John",
|
||||||
<pre class="example"><code><User>\n <id>123456</id>\n <username>string</username>\n <firstName>string</firstName>\n <lastName>string</lastName>\n <email>string</email>\n <password>string</password>\n <phone>string</phone>\n <userStatus>0</userStatus>\n</User></code></pre>
|
"lastName" : "Public",
|
||||||
|
"email" : "johnp@swagger.io",
|
||||||
|
"password" : "-secret-",
|
||||||
|
"phone" : "0123456789",
|
||||||
|
"userStatus" : 0
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
</div> <!-- method -->
|
</div> <!-- method -->
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-core-version>1.5.2-M2-SNAPSHOT</swagger-core-version>
|
<swagger-core-version>1.5.2-M2</swagger-core-version>
|
||||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||||
<jersey-version>1.13</jersey-version>
|
<jersey-version>1.13</jersey-version>
|
||||||
<slf4j-version>1.6.3</slf4j-version>
|
<slf4j-version>1.6.3</slf4j-version>
|
||||||
|
@ -21,12 +21,14 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
|
||||||
@Path("/pet")
|
@Path("/pet")
|
||||||
|
|
||||||
|
|
||||||
@com.wordnik.swagger.annotations.Api(value = "/pet", description = "the pet API")
|
@com.wordnik.swagger.annotations.Api(value = "/pet", description = "the pet API")
|
||||||
public class PetApi {
|
public class PetApi {
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml", })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@com.wordnik.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class)
|
@com.wordnik.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class)
|
||||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||||
@ -45,7 +47,7 @@ public class PetApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml", })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@com.wordnik.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class)
|
@com.wordnik.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class)
|
||||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||||
@ -113,7 +115,7 @@ public class PetApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
@Consumes({ "application/x-www-form-urlencoded", })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@com.wordnik.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class)
|
@com.wordnik.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class)
|
||||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||||
@ -146,7 +148,7 @@ public class PetApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/{petId}/uploadImage")
|
@Path("/{petId}/uploadImage")
|
||||||
@Consumes({ "multipart/form-data", })
|
@Consumes({ "multipart/form-data" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@com.wordnik.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = Void.class)
|
@com.wordnik.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = Void.class)
|
||||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||||
|
@ -21,6 +21,8 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
|
||||||
@Path("/store")
|
@Path("/store")
|
||||||
|
|
||||||
|
|
||||||
@com.wordnik.swagger.annotations.Api(value = "/store", description = "the store API")
|
@com.wordnik.swagger.annotations.Api(value = "/store", description = "the store API")
|
||||||
public class StoreApi {
|
public class StoreApi {
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
|
||||||
@Path("/user")
|
@Path("/user")
|
||||||
|
|
||||||
|
|
||||||
@com.wordnik.swagger.annotations.Api(value = "/user", description = "the user API")
|
@com.wordnik.swagger.annotations.Api(value = "/user", description = "the user API")
|
||||||
public class UserApi {
|
public class UserApi {
|
||||||
|
|
||||||
|
@ -40,9 +40,10 @@ public class PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied") })
|
@ApiResponse(code = 400, message = "Invalid ID supplied") })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "",
|
||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
consumes = { "application/json", "application/xml", },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
public ResponseEntity<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
public ResponseEntity<Void> updatePet(
|
||||||
|
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -55,9 +56,10 @@ public class PetApi {
|
|||||||
@ApiResponse(code = 405, message = "Invalid input") })
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "",
|
||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
consumes = { "application/json", "application/xml", },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
public ResponseEntity<Void> addPet(
|
||||||
|
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -73,7 +75,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") @RequestParam(value = "status", required = false) List<String> status
|
||||||
|
)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Pet>(HttpStatus.OK);
|
return new ResponseEntity<Pet>(HttpStatus.OK);
|
||||||
@ -89,7 +92,8 @@ public class PetApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
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!
|
||||||
return new ResponseEntity<Pet>(HttpStatus.OK);
|
return new ResponseEntity<Pet>(HttpStatus.OK);
|
||||||
@ -106,7 +110,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!
|
||||||
return new ResponseEntity<Pet>(HttpStatus.OK);
|
return new ResponseEntity<Pet>(HttpStatus.OK);
|
||||||
@ -119,12 +124,15 @@ public class PetApi {
|
|||||||
@ApiResponse(code = 405, message = "Invalid input") })
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/{petId}",
|
||||||
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("name") String name,
|
||||||
|
|
||||||
|
|
||||||
@ApiParam(value = "Updated status of the pet" )@RequestPart("status") String status)
|
@ApiParam(value = "Updated status of the pet" )@RequestPart("status") String status)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
@ -140,8 +148,10 @@ 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("apiKey") 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!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -154,11 +164,14 @@ public class PetApi {
|
|||||||
@ApiResponse(code = 0, message = "successful operation") })
|
@ApiResponse(code = 0, message = "successful operation") })
|
||||||
@RequestMapping(value = "/{petId}/uploadImage",
|
@RequestMapping(value = "/{petId}/uploadImage",
|
||||||
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("additionalMetadata") String additionalMetadata,
|
||||||
|
|
||||||
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile fileDetail)
|
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile fileDetail)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
@ -56,7 +56,8 @@ public class StoreApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ) Order body)
|
public ResponseEntity<Order> placeOrder(
|
||||||
|
@ApiParam(value = "order placed for purchasing the pet" ) Order body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Order>(HttpStatus.OK);
|
return new ResponseEntity<Order>(HttpStatus.OK);
|
||||||
@ -73,7 +74,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!
|
||||||
return new ResponseEntity<Order>(HttpStatus.OK);
|
return new ResponseEntity<Order>(HttpStatus.OK);
|
||||||
@ -89,7 +91,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!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
@ -40,7 +40,8 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ) User body)
|
public ResponseEntity<Void> createUser(
|
||||||
|
@ApiParam(value = "Created user object" ) User body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -55,7 +56,8 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object" ) List<User> body)
|
public ResponseEntity<Void> createUsersWithArrayInput(
|
||||||
|
@ApiParam(value = "List of user object" ) List<User> body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -70,7 +72,8 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
public ResponseEntity<Void> createUsersWithListInput(@ApiParam(value = "List of user object" ) List<User> body)
|
public ResponseEntity<Void> createUsersWithListInput(
|
||||||
|
@ApiParam(value = "List of user object" ) List<User> body)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
@ -86,8 +89,10 @@ public class UserApi {
|
|||||||
produces = { "application/json", "application/xml" },
|
produces = { "application/json", "application/xml" },
|
||||||
|
|
||||||
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!
|
||||||
return new ResponseEntity<String>(HttpStatus.OK);
|
return new ResponseEntity<String>(HttpStatus.OK);
|
||||||
@ -119,7 +124,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!
|
||||||
return new ResponseEntity<User>(HttpStatus.OK);
|
return new ResponseEntity<User>(HttpStatus.OK);
|
||||||
@ -135,7 +141,9 @@ 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!
|
||||||
@ -152,7 +160,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!
|
||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user