update objc petstore to use petstore.json

This commit is contained in:
wing328
2017-06-05 12:25:51 +08:00
parent f3da691a72
commit 40163b26d2
67 changed files with 287 additions and 544 deletions

View File

@@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l objc -DapiDocs=false,modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -DapiDocs=false,modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true"
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags

View File

@@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l objc -o samples/client/petstore/objc/default"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc/default"
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags

View File

@@ -1,6 +1,6 @@
# SwaggerClient
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
@@ -41,7 +41,6 @@ Import the following:
#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGDefaultConfiguration.h>
// load models
#import <SwaggerClient/SWGApiResponse.h>
#import <SwaggerClient/SWGCategory.h>
#import <SwaggerClient/SWGOrder.h>
#import <SwaggerClient/SWGPet.h>
@@ -70,7 +69,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPet* *body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
@@ -114,7 +113,6 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [SWGApiResponse](docs/SWGApiResponse.md)
- [SWGCategory](docs/SWGCategory.md)
- [SWGOrder](docs/SWGOrder.md)
- [SWGPet](docs/SWGPet.md)
@@ -143,6 +141,6 @@ Class | Method | HTTP request | Description
## Author
apiteam@swagger.io
apiteam@wordnik.com

View File

@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.summary = "Swagger Petstore"
s.description = <<-DESC
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
DESC
s.platform = :ios, '7.0'

View File

@@ -1,14 +1,13 @@
#import <Foundation/Foundation.h>
#import "SWGApiResponse.h"
#import "SWGPet.h"
#import "SWGApi.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -27,7 +26,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Add a new pet to the store
///
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// code:405 message:"Invalid input"
///
@@ -53,7 +52,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
///
/// @param status Status values that need to be considered for filter
/// @param status Status values that need to be considered for filter (optional) (default to available)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid status value"
@@ -66,7 +65,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
/// @param tags Tags to filter by
/// @param tags Tags to filter by (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid tag value"
@@ -77,9 +76,9 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Find pet by ID
/// Returns a single pet
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
///
/// @param petId ID of pet to return
/// @param petId ID of pet that needs to be fetched
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid ID supplied",
@@ -93,7 +92,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Update an existing pet
///
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
@@ -114,7 +113,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// code:405 message:"Invalid input"
///
/// @return
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler;
@@ -127,13 +126,13 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// @param additionalMetadata Additional data to pass to server (optional)
/// @param file file to upload (optional)
///
/// code:200 message:"successful operation"
/// code:0 message:"successful operation"
///
/// @return SWGApiResponse*
/// @return
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler;
completionHandler: (void (^)(NSError* error)) handler;

View File

@@ -1,7 +1,6 @@
#import "SWGPetApi.h"
#import "SWGQueryParamCollection.h"
#import "SWGApiClient.h"
#import "SWGApiResponse.h"
#import "SWGPet.h"
@@ -53,23 +52,12 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Add a new pet to the store
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -78,7 +66,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -153,7 +141,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
headerParams[@"api_key"] = apiKey;
}
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -193,36 +181,25 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
/// @param status Status values that need to be considered for filter
/// @param status Status values that need to be considered for filter (optional, default to available)
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray<NSString*>*) status
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'status' is set
if (status == nil) {
NSParameterAssert(status);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"status"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (status != nil) {
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"];
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -262,36 +239,25 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// @param tags Tags to filter by
/// @param tags Tags to filter by (optional)
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray<NSString*>*) tags
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'tags' is set
if (tags == nil) {
NSParameterAssert(tags);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"tags"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (tags != nil) {
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"];
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -330,8 +296,8 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Find pet by ID
/// Returns a single pet
/// @param petId ID of pet to return
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// @param petId ID of pet that needs to be fetched
///
/// @returns SWGPet*
///
@@ -359,7 +325,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -371,7 +337,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"api_key"];
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
@@ -399,23 +365,12 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Update an existing pet
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -424,7 +379,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -473,7 +428,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler {
@@ -499,7 +454,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -551,19 +506,19 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @param file file to upload (optional)
///
/// @returns SWGApiResponse*
/// @returns void
///
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler {
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'petId' is set
if (petId == nil) {
NSParameterAssert(petId);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
handler(error);
}
return nil;
}
@@ -579,7 +534,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -612,10 +567,10 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
authSettings: authSettings
requestContentType: requestContentType
responseContentType: responseContentType
responseType: @"SWGApiResponse*"
responseType: nil
completionBlock: ^(id data, NSError *error) {
if(handler) {
handler((SWGApiResponse*)data, error);
handler(error);
}
}];
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -57,14 +57,14 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode;
/// code:404 message:"Order not found"
///
/// @return SWGOrder*
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
/// Place an order for a pet
///
///
/// @param body order placed for purchasing the pet
/// @param body order placed for purchasing the pet (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"

View File

@@ -80,7 +80,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -132,7 +132,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -176,7 +176,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'orderId' is set
if (orderId == nil) {
@@ -200,7 +200,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -240,23 +240,12 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// Place an order for a pet
///
/// @param body order placed for purchasing the pet
/// @param body order placed for purchasing the pet (optional)
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGStoreApiErrorDomain code:kSWGStoreApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -265,7 +254,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -26,7 +26,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Create user
/// This can only be done by the logged in user.
///
/// @param body Created user object
/// @param body Created user object (optional)
///
/// code:0 message:"successful operation"
///
@@ -38,7 +38,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// code:0 message:"successful operation"
///
@@ -50,7 +50,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// code:0 message:"successful operation"
///
@@ -89,8 +89,8 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Logs user into the system
///
///
/// @param username The user name for login
/// @param password The password for login in clear text
/// @param username The user name for login (optional)
/// @param password The password for login in clear text (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid username/password supplied"
@@ -116,7 +116,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// This can only be done by the logged in user.
///
/// @param username name that need to be deleted
/// @param body Updated user object
/// @param body Updated user object (optional)
///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"

View File

@@ -52,23 +52,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Create user
/// This can only be done by the logged in user.
/// @param body Created user object
/// @param body Created user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -77,7 +66,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -118,23 +107,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -143,7 +121,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -184,23 +162,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -209,7 +176,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -278,7 +245,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -346,7 +313,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -386,37 +353,15 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Logs user into the system
///
/// @param username The user name for login
/// @param username The user name for login (optional)
///
/// @param password The password for login in clear text
/// @param password The password for login in clear text (optional)
///
/// @returns NSString*
///
-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username
password: (NSString*) password
completionHandler: (void (^)(NSString* output, NSError* error)) handler {
// verify the required parameter 'username' is set
if (username == nil) {
NSParameterAssert(username);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
// verify the required parameter 'password' is set
if (password == nil) {
NSParameterAssert(password);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"password"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -431,7 +376,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -483,7 +428,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -525,7 +470,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
/// This can only be done by the logged in user.
/// @param username name that need to be deleted
///
/// @param body Updated user object
/// @param body Updated user object (optional)
///
/// @returns void
///
@@ -543,17 +488,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
return nil;
}
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -565,7 +499,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -5,10 +5,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Xcode 7.0">
<entity name="SWGApiResponseManagedObject" representedClassName="SWGApiResponseManagedObject" syncable="YES">
<attribute name="code" optional="YES" attributeType="Integer 16" syncable="YES"/>
<attribute name="type" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="message" optional="YES" attributeType="String" syncable="YES"/>
</entity>
<entity name="SWGCategoryManagedObject" representedClassName="SWGCategoryManagedObject" syncable="YES">
<attribute name="_id" optional="YES" attributeType="Double" syncable="YES"/>
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -6,7 +6,6 @@
self = [super init];
if (self) {
// initialize property's default value, if any
self.complete = @0;
}
return self;

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -9,10 +9,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -1,6 +1,6 @@
# SwaggerClient
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
@@ -41,7 +41,6 @@ Import the following:
#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGDefaultConfiguration.h>
// load models
#import <SwaggerClient/SWGApiResponse.h>
#import <SwaggerClient/SWGCategory.h>
#import <SwaggerClient/SWGOrder.h>
#import <SwaggerClient/SWGPet.h>
@@ -70,7 +69,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPet* *body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
@@ -114,7 +113,6 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [SWGApiResponse](docs/SWGApiResponse.md)
- [SWGCategory](docs/SWGCategory.md)
- [SWGOrder](docs/SWGOrder.md)
- [SWGPet](docs/SWGPet.md)
@@ -143,6 +141,6 @@ Class | Method | HTTP request | Description
## Author
apiteam@swagger.io
apiteam@wordnik.com

View File

@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.summary = "Swagger Petstore"
s.description = <<-DESC
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
DESC
s.platform = :ios, '7.0'

View File

@@ -1,14 +1,13 @@
#import <Foundation/Foundation.h>
#import "SWGApiResponse.h"
#import "SWGPet.h"
#import "SWGApi.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -27,7 +26,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Add a new pet to the store
///
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// code:405 message:"Invalid input"
///
@@ -53,7 +52,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
///
/// @param status Status values that need to be considered for filter
/// @param status Status values that need to be considered for filter (optional) (default to available)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid status value"
@@ -66,7 +65,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
/// @param tags Tags to filter by
/// @param tags Tags to filter by (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid tag value"
@@ -77,9 +76,9 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Find pet by ID
/// Returns a single pet
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
///
/// @param petId ID of pet to return
/// @param petId ID of pet that needs to be fetched
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid ID supplied",
@@ -93,7 +92,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Update an existing pet
///
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
@@ -114,7 +113,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// code:405 message:"Invalid input"
///
/// @return
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler;
@@ -127,13 +126,13 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// @param additionalMetadata Additional data to pass to server (optional)
/// @param file file to upload (optional)
///
/// code:200 message:"successful operation"
/// code:0 message:"successful operation"
///
/// @return SWGApiResponse*
/// @return
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler;
completionHandler: (void (^)(NSError* error)) handler;

View File

@@ -1,7 +1,6 @@
#import "SWGPetApi.h"
#import "SWGQueryParamCollection.h"
#import "SWGApiClient.h"
#import "SWGApiResponse.h"
#import "SWGPet.h"
@@ -53,23 +52,12 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Add a new pet to the store
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -78,7 +66,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -153,7 +141,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
headerParams[@"api_key"] = apiKey;
}
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -193,36 +181,25 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
/// @param status Status values that need to be considered for filter
/// @param status Status values that need to be considered for filter (optional, default to available)
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray<NSString*>*) status
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'status' is set
if (status == nil) {
NSParameterAssert(status);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"status"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (status != nil) {
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"];
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -262,36 +239,25 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// @param tags Tags to filter by
/// @param tags Tags to filter by (optional)
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray<NSString*>*) tags
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'tags' is set
if (tags == nil) {
NSParameterAssert(tags);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"tags"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (tags != nil) {
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"];
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -330,8 +296,8 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Find pet by ID
/// Returns a single pet
/// @param petId ID of pet to return
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// @param petId ID of pet that needs to be fetched
///
/// @returns SWGPet*
///
@@ -359,7 +325,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -371,7 +337,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"api_key"];
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
@@ -399,23 +365,12 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Update an existing pet
///
/// @param body Pet object that needs to be added to the store
/// @param body Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -424,7 +379,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -473,7 +428,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler {
@@ -499,7 +454,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -551,19 +506,19 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @param file file to upload (optional)
///
/// @returns SWGApiResponse*
/// @returns void
///
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler {
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'petId' is set
if (petId == nil) {
NSParameterAssert(petId);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
handler(error);
}
return nil;
}
@@ -579,7 +534,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -612,10 +567,10 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
authSettings: authSettings
requestContentType: requestContentType
responseContentType: responseContentType
responseType: @"SWGApiResponse*"
responseType: nil
completionBlock: ^(id data, NSError *error) {
if(handler) {
handler((SWGApiResponse*)data, error);
handler(error);
}
}];
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -57,14 +57,14 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode;
/// code:404 message:"Order not found"
///
/// @return SWGOrder*
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
/// Place an order for a pet
///
///
/// @param body order placed for purchasing the pet
/// @param body order placed for purchasing the pet (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"

View File

@@ -80,7 +80,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -132,7 +132,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -176,7 +176,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'orderId' is set
if (orderId == nil) {
@@ -200,7 +200,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -240,23 +240,12 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// Place an order for a pet
///
/// @param body order placed for purchasing the pet
/// @param body order placed for purchasing the pet (optional)
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGStoreApiErrorDomain code:kSWGStoreApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -265,7 +254,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -26,7 +26,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Create user
/// This can only be done by the logged in user.
///
/// @param body Created user object
/// @param body Created user object (optional)
///
/// code:0 message:"successful operation"
///
@@ -38,7 +38,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// code:0 message:"successful operation"
///
@@ -50,7 +50,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// code:0 message:"successful operation"
///
@@ -89,8 +89,8 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Logs user into the system
///
///
/// @param username The user name for login
/// @param password The password for login in clear text
/// @param username The user name for login (optional)
/// @param password The password for login in clear text (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid username/password supplied"
@@ -116,7 +116,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// This can only be done by the logged in user.
///
/// @param username name that need to be deleted
/// @param body Updated user object
/// @param body Updated user object (optional)
///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"

View File

@@ -52,23 +52,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Create user
/// This can only be done by the logged in user.
/// @param body Created user object
/// @param body Created user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -77,7 +66,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -118,23 +107,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -143,7 +121,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -184,23 +162,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object
/// @param body List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -209,7 +176,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -278,7 +245,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -346,7 +313,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -386,37 +353,15 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Logs user into the system
///
/// @param username The user name for login
/// @param username The user name for login (optional)
///
/// @param password The password for login in clear text
/// @param password The password for login in clear text (optional)
///
/// @returns NSString*
///
-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username
password: (NSString*) password
completionHandler: (void (^)(NSString* output, NSError* error)) handler {
// verify the required parameter 'username' is set
if (username == nil) {
NSParameterAssert(username);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
// verify the required parameter 'password' is set
if (password == nil) {
NSParameterAssert(password);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"password"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -431,7 +376,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -483,7 +428,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -525,7 +470,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
/// This can only be done by the logged in user.
/// @param username name that need to be deleted
///
/// @param body Updated user object
/// @param body Updated user object (optional)
///
/// @returns void
///
@@ -543,17 +488,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
return nil;
}
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -565,7 +499,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -5,10 +5,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -6,7 +6,6 @@
self = [super init];
if (self) {
// initialize property's default value, if any
self.complete = @0;
}
return self;

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Contact: apiteam@wordnik.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**quantity** | **NSNumber*** | | [optional]
**shipDate** | **NSDate*** | | [optional]
**status** | **NSString*** | Order Status | [optional]
**complete** | **NSNumber*** | | [optional] [default to @0]
**complete** | **NSNumber*** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -32,7 +32,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPet* body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -49,7 +49,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](SWGPet*.md)| Pet object that needs to be added to the store |
**body** | [**SWGPet***](Pet.md)| Pet object that needs to be added to the store | [optional]
### Return type
@@ -62,7 +62,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -118,7 +118,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -140,7 +140,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSArray<NSString*>* status = @[@"status_example"]; // Status values that need to be considered for filter
NSArray<NSString*>* status = @[@"available"]; // Status values that need to be considered for filter (optional) (default to available)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -160,7 +160,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Status values that need to be considered for filter |
**status** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Status values that need to be considered for filter | [optional] [default to available]
### Return type
@@ -173,7 +173,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -195,7 +195,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSArray<NSString*>* tags = @[@"tags_example"]; // Tags to filter by
NSArray<NSString*>* tags = @[@"tags_example"]; // Tags to filter by (optional)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -215,7 +215,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Tags to filter by |
**tags** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Tags to filter by | [optional]
### Return type
@@ -228,7 +228,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -240,7 +240,7 @@ Name | Type | Description | Notes
Find pet by ID
Returns a single pet
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Example
```objc
@@ -251,8 +251,11 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSNumber* petId = @789; // ID of pet to return
NSNumber* petId = @789; // ID of pet that needs to be fetched
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -272,7 +275,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **NSNumber***| ID of pet to return |
**petId** | **NSNumber***| ID of pet that needs to be fetched |
### Return type
@@ -280,12 +283,12 @@ Name | Type | Description | Notes
### Authorization
[api_key](../README.md#api_key)
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -307,7 +310,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPet* body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -324,7 +327,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](SWGPet*.md)| Pet object that needs to be added to the store |
**body** | [**SWGPet***](Pet.md)| Pet object that needs to be added to the store | [optional]
### Return type
@@ -337,13 +340,13 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updatePetWithForm**
```objc
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler;
@@ -361,7 +364,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSNumber* petId = @789; // ID of pet that needs to be updated
NSString* petId = @"petId_example"; // ID of pet that needs to be updated
NSString* name = @"name_example"; // Updated name of the pet (optional)
NSString* status = @"status_example"; // Updated status of the pet (optional)
@@ -382,7 +385,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **NSNumber***| ID of pet that needs to be updated |
**petId** | **NSString***| ID of pet that needs to be updated |
**name** | **NSString***| Updated name of the pet | [optional]
**status** | **NSString***| Updated status of the pet | [optional]
@@ -397,7 +400,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -406,7 +409,7 @@ void (empty response body)
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler;
completionHandler: (void (^)(NSError* error)) handler;
```
uploads an image
@@ -431,10 +434,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
[apiInstance uploadFileWithPetId:petId
additionalMetadata:additionalMetadata
file:file
completionHandler: ^(SWGApiResponse* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGPetApi->uploadFile: %@", error);
}
@@ -451,7 +451,7 @@ Name | Type | Description | Notes
### Return type
[**SWGApiResponse***](SWGApiResponse.md)
void (empty response body)
### Authorization
@@ -460,7 +460,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -53,7 +53,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -106,13 +106,13 @@ This endpoint does not need any parameter.
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getOrderById**
```objc
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
```
@@ -123,7 +123,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```objc
NSNumber* orderId = @789; // ID of pet that needs to be fetched
NSString* orderId = @"orderId_example"; // ID of pet that needs to be fetched
SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
@@ -143,7 +143,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **NSNumber***| ID of pet that needs to be fetched |
**orderId** | **NSString***| ID of pet that needs to be fetched |
### Return type
@@ -156,7 +156,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -173,7 +173,7 @@ Place an order for a pet
### Example
```objc
SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet
SWGOrder* body = [[Order alloc] init]; // order placed for purchasing the pet (optional)
SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
@@ -193,7 +193,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGOrder***](SWGOrder*.md)| order placed for purchasing the pet |
**body** | [**SWGOrder***](Order.md)| order placed for purchasing the pet | [optional]
### Return type
@@ -206,7 +206,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -27,7 +27,7 @@ This can only be done by the logged in user.
### Example
```objc
SWGUser* body = [[SWGUser alloc] init]; // Created user object
SWGUser* body = [[User alloc] init]; // Created user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGUser***](SWGUser*.md)| Created user object |
**body** | [**SWGUser***](User.md)| Created user object | [optional]
### Return type
@@ -57,7 +57,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -74,7 +74,7 @@ Creates list of users with given input array
### Example
```objc
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -91,7 +91,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object |
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
### Return type
@@ -104,7 +104,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -121,7 +121,7 @@ Creates list of users with given input array
### Example
```objc
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -138,7 +138,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object |
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
### Return type
@@ -151,7 +151,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -198,7 +198,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -248,7 +248,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -266,8 +266,8 @@ Logs user into the system
### Example
```objc
NSString* username = @"username_example"; // The user name for login
NSString* password = @"password_example"; // The password for login in clear text
NSString* username = @"username_example"; // The user name for login (optional)
NSString* password = @"password_example"; // The password for login in clear text (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -288,8 +288,8 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **NSString***| The user name for login |
**password** | **NSString***| The password for login in clear text |
**username** | **NSString***| The user name for login | [optional]
**password** | **NSString***| The password for login in clear text | [optional]
### Return type
@@ -302,7 +302,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -345,7 +345,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -364,7 +364,7 @@ This can only be done by the logged in user.
```objc
NSString* username = @"username_example"; // name that need to be deleted
SWGUser* body = [[SWGUser alloc] init]; // Updated user object
SWGUser* body = [[User alloc] init]; // Updated user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -383,7 +383,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **NSString***| name that need to be deleted |
**body** | [**SWGUser***](SWGUser*.md)| Updated user object |
**body** | [**SWGUser***](User.md)| Updated user object | [optional]
### Return type
@@ -396,7 +396,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)