Update ObjC petstore with oas2, fix default value for parameter (#115)

* update objc petstore with oas2, fix default value for parameter

* update objc petstore with oas3 spec

* update objc core data oas2

* update objc petstore with oas3
This commit is contained in:
William Cheng 2018-04-18 01:47:32 +08:00 committed by GitHub
parent ddf10b98dc
commit a30e25e50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
71 changed files with 1295 additions and 262 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/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc/default -D appName=PetstoreClient"
ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc/default -D appName=PetstoreClient $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -0,0 +1,31 @@
#!/bin/sh
SCRIPT="$0"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
if [ ! -f "$executable" ]
then
mvn clean package
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/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -l objc -D apiDocs=false -D modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true -D appName=PetstoreClient"
java $JAVA_OPTS -jar $executable $ags

31
bin/openapi3/objc-petstore.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/sh
SCRIPT="$0"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
if [ ! -f "$executable" ]
then
mvn clean package
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/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -l objc -o samples/client/petstore/objc/default -D appName=PetstoreClient $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -2435,32 +2435,16 @@ public class DefaultCodegen implements CodegenConfig {
LOGGER.info("JSON schema: " + codegenParameter.jsonSchema);
}
// TODO need to revise the logic below
// move the defaultValue for headers, forms and params
/*
if (param instanceof QueryParameter) {
QueryParameter qp = (QueryParameter) parameter;
if (qp.getDefaultValue() != null) {
codegenParameter.defaultValue = qp.getDefaultValue().toString();
}
} else if (param instanceof HeaderParameter) {
HeaderParameter hp = (HeaderParameter) parameter;
if (hp.getDefaultValue() != null) {
codegenParameter.defaultValue = hp.getDefaultValue().toString();
}
} else if (param instanceof FormParameter) {
FormParameter fp = (FormParameter) parameter;
if (fp.getDefaultValue() != null) {
codegenParameter.defaultValue = fp.getDefaultValue().toString();
}
}*/
if (parameter.getExtensions() != null && !parameter.getExtensions().isEmpty()) {
codegenParameter.vendorExtensions.putAll(parameter.getExtensions());
}
if (parameter.getSchema() != null) {
Schema parameterSchema = parameter.getSchema();
// set default value
if (parameterSchema.getDefault() != null) {
codegenParameter.defaultValue = (String) parameterSchema.getDefault();
}
// TDOO revise collectionFormat
String collectionFormat = null;
if (ModelUtils.isArraySchema(parameterSchema)) { // for array parameter

View File

@ -531,6 +531,10 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
name = escapeSpecialWord(name);
}
if (name.startsWith(classPrefix)) {
name = name.replaceFirst(classPrefix, ""); //remove the class prefix, e.g. SWGPet => Pet
}
// camelize (lower first character) the variable name
// e.g. `pet_id` to `petId`
name = camelize(name, true);
@ -685,12 +689,12 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
type = p.dataType;
}
if ("NSString*".equalsIgnoreCase(type)) {
if ("NSString*".equalsIgnoreCase(type) || "NSString".equalsIgnoreCase(type)) {
if (example == null) {
example = p.paramName + "_example";
}
example = "@\"" + escapeText(example) + "\"";
} else if ("NSNumber*".equals(type)) {
} else if ("NSNumber*".equalsIgnoreCase(type) || "NSNumber".equalsIgnoreCase(type)) {
if (example == null) {
example = "56";
}
@ -704,7 +708,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
if (example == null) {
example = "True";
}
} else if ("NSURL*".equalsIgnoreCase(type)) {
} else if ("NSURL*".equalsIgnoreCase(type) || "NSURL".equalsIgnoreCase(type)) {
if (example == null) {
example = "/path/to/file";
}
@ -728,7 +732,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
// e.g. [[SWGPet alloc] init
example = "[[" + type + " alloc] init]";
} else {
LOGGER.warn("Type " + type + " not handled properly in setParameterExampleValue");
LOGGER.warn("Example value for " + type + " not handled properly in setParameterExampleValue");
}
if (example == null) {

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
2.3.0-SNAPSHOT
3.0.0-SNAPSHOT

View File

@ -1,12 +1,12 @@
# SwaggerClient
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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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:
- API version: 1.0.0
- Package version:
- Build package: io.swagger.codegen.languages.ObjcClientCodegen
- Build package: org.openapitools.codegen.languages.ObjcClientCodegen
## Requirements
@ -69,12 +69,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
// Add a new pet to the store
[apiInstance addPetWithBody:body
[apiInstance addPetWithPet:pet
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);

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 <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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -26,12 +26,12 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Add a new pet to the store
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// code:405 message:"Invalid input"
///
/// @return void
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler;
@ -92,14 +92,14 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Update an existing pet
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
/// code:405 message:"Validation exception"
///
/// @return void
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler;

View File

@ -52,11 +52,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Add a new pet to the store
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
@ -66,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -75,7 +75,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"petstore_auth"];
@ -83,7 +83,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = pet;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -141,7 +141,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
headerParams[@"api_key"] = apiKey;
}
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -363,11 +363,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Update an existing pet
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
@ -377,7 +377,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", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -386,7 +386,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"petstore_auth"];
@ -394,7 +394,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = pet;
return [self.apiClient requestWithPath: resourcePath
method: @"PUT"
@ -452,7 +452,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", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -532,7 +532,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", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -64,13 +64,13 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode;
/// Place an order for a pet
///
///
/// @param body order placed for purchasing the pet (optional)
/// @param order order placed for purchasing the pet (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"
///
/// @return SWGOrder*
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;

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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -240,11 +240,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// Place an order for a pet
///
/// @param body order placed for purchasing the pet (optional)
/// @param order order placed for purchasing the pet (optional)
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"];
@ -263,7 +263,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]];
// Authentication setting
NSArray *authSettings = @[];
@ -271,7 +271,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = order;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -26,36 +26,36 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Create user
/// This can only be done by the logged in user.
///
/// @param body Created user object (optional)
/// @param user Created user object (optional)
///
/// code:0 message:"successful operation"
///
/// @return void
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
-(NSURLSessionTask*) createUserWithUser: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// code:0 message:"successful operation"
///
/// @return void
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// code:0 message:"successful operation"
///
/// @return void
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler;
@ -116,14 +116,14 @@ 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 (optional)
/// @param user Updated user object (optional)
///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"
///
/// @return void
-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username
body: (SWGUser*) body
user: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler;

View File

@ -52,11 +52,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Create user
/// This can only be done by the logged in user.
/// @param body Created user object (optional)
/// @param user Created user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
-(NSURLSessionTask*) createUserWithUser: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"];
@ -66,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -75,7 +75,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]];
// Authentication setting
NSArray *authSettings = @[];
@ -83,7 +83,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -107,11 +107,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"];
@ -121,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -138,7 +138,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -162,11 +162,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"];
@ -176,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -193,7 +193,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -245,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -428,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -470,12 +470,12 @@ 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 (optional)
/// @param user Updated user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username
body: (SWGUser*) body
user: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'username' is set
if (username == nil) {
@ -499,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -508,7 +508,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]];
// Authentication setting
NSArray *authSettings = @[];
@ -516,7 +516,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"PUT"

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -5,7 +5,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -66,7 +66,7 @@ extern NSString *const SWGResponseObjectErrorKey;
/**
* Updates header parameters and query parameters for authentication
*
* @param headers The header parameter will be udpated, passed by pointer to pointer.
* @param headers The header parameter will be updated, passed by pointer to pointer.
* @param querys The query parameters will be updated, passed by pointer to pointer.
* @param authSettings The authentication names NSArray.
*/

View File

@ -90,7 +90,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock {
NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
NSURLSessionDataTask *task = [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
SWGDebugLogResponse(response, responseObject,request,error);
if(!error) {
completionBlock(responseObject, nil);
@ -112,7 +112,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
__block NSString * tempFolderPath = [self.configuration.tempFolderPath copy];
NSURLSessionDataTask* task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
NSURLSessionDataTask* task = [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
SWGDebugLogResponse(response, responseObject,request,error);
if(error) {

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -7,7 +7,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -7,7 +7,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -9,7 +9,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -7,7 +7,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -7,7 +7,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -1 +1 @@
2.3.0-SNAPSHOT
3.0.0-SNAPSHOT

View File

@ -1,12 +1,12 @@
# SwaggerClient
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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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:
- API version: 1.0.0
- Package version:
- Build package: io.swagger.codegen.languages.ObjcClientCodegen
- Build package: org.openapitools.codegen.languages.ObjcClientCodegen
## Requirements
@ -69,12 +69,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
// Add a new pet to the store
[apiInstance addPetWithBody:body
[apiInstance addPetWithPet:pet
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);

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 <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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -26,12 +26,12 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Add a new pet to the store
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// code:405 message:"Invalid input"
///
/// @return void
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler;
@ -92,14 +92,14 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Update an existing pet
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
/// code:405 message:"Validation exception"
///
/// @return void
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler;

View File

@ -52,11 +52,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Add a new pet to the store
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
@ -66,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -75,7 +75,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"petstore_auth"];
@ -83,7 +83,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = pet;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -141,7 +141,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
headerParams[@"api_key"] = apiKey;
}
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -363,11 +363,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Update an existing pet
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param pet Pet object that needs to be added to the store (optional)
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
@ -377,7 +377,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", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -386,7 +386,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json", @"application/xml"]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"petstore_auth"];
@ -394,7 +394,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = pet;
return [self.apiClient requestWithPath: resourcePath
method: @"PUT"
@ -452,7 +452,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", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -532,7 +532,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", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -64,13 +64,13 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode;
/// Place an order for a pet
///
///
/// @param body order placed for purchasing the pet (optional)
/// @param order order placed for purchasing the pet (optional)
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"
///
/// @return SWGOrder*
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;

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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -240,11 +240,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// Place an order for a pet
///
/// @param body order placed for purchasing the pet (optional)
/// @param order order placed for purchasing the pet (optional)
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"];
@ -263,7 +263,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]];
// Authentication setting
NSArray *authSettings = @[];
@ -271,7 +271,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = order;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com
@ -26,36 +26,36 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Create user
/// This can only be done by the logged in user.
///
/// @param body Created user object (optional)
/// @param user Created user object (optional)
///
/// code:0 message:"successful operation"
///
/// @return void
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
-(NSURLSessionTask*) createUserWithUser: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// code:0 message:"successful operation"
///
/// @return void
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// code:0 message:"successful operation"
///
/// @return void
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler;
@ -116,14 +116,14 @@ 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 (optional)
/// @param user Updated user object (optional)
///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"
///
/// @return void
-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username
body: (SWGUser*) body
user: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler;

View File

@ -52,11 +52,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Create user
/// This can only be done by the logged in user.
/// @param body Created user object (optional)
/// @param user Created user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
-(NSURLSessionTask*) createUserWithUser: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"];
@ -66,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -75,7 +75,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]];
// Authentication setting
NSArray *authSettings = @[];
@ -83,7 +83,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -107,11 +107,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"];
@ -121,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -138,7 +138,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -162,11 +162,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param user List of user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler {
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"];
@ -176,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -193,7 +193,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"POST"
@ -245,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -428,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -470,12 +470,12 @@ 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 (optional)
/// @param user Updated user object (optional)
///
/// @returns void
///
-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username
body: (SWGUser*) body
user: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'username' is set
if (username == nil) {
@ -499,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/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@ -508,7 +508,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @"";
// request content type
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]];
// Authentication setting
NSArray *authSettings = @[];
@ -516,7 +516,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init];
bodyParam = body;
bodyParam = user;
return [self.apiClient requestWithPath: resourcePath
method: @"PUT"

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -5,7 +5,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -4,7 +4,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -2,7 +2,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -3,7 +3,7 @@
/**
* Swagger Petstore
* 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 is a sample server Petstore server. You can find out more about Swagger at http://swagger.io 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@wordnik.com

View File

@ -16,14 +16,12 @@ Method | HTTP request | Description
# **addPet**
```objc
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
-(NSURLSessionTask*) addPetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler;
```
Add a new pet to the store
### Example
```objc
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
@ -32,12 +30,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
// Add a new pet to the store
[apiInstance addPetWithBody:body
[apiInstance addPetWithPet:pet
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGPetApi->addPet: %@", error);
@ -49,7 +47,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional]
**pet** | [**SWGPet**](SWGPet.md)| Pet object that needs to be added to the store | [optional]
### Return type
@ -61,8 +59,8 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
@ -75,8 +73,6 @@ void (empty response body)
Deletes a pet
### Example
```objc
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
@ -118,7 +114,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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)
@ -294,14 +290,12 @@ Name | Type | Description | Notes
# **updatePet**
```objc
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
-(NSURLSessionTask*) updatePetWithPet: (SWGPet) pet
completionHandler: (void (^)(NSError* error)) handler;
```
Update an existing pet
### Example
```objc
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
@ -310,12 +304,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
// Update an existing pet
[apiInstance updatePetWithBody:body
[apiInstance updatePetWithPet:pet
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGPetApi->updatePet: %@", error);
@ -327,7 +321,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional]
**pet** | [**SWGPet**](SWGPet.md)| Pet object that needs to be added to the store | [optional]
### Return type
@ -339,8 +333,8 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
@ -354,8 +348,6 @@ void (empty response body)
Updates a pet in the store with form data
### Example
```objc
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
@ -400,7 +392,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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)
@ -414,8 +406,6 @@ void (empty response body)
uploads an image
### Example
```objc
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
@ -426,7 +416,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
NSNumber* petId = @789; // ID of pet to update
NSString* additionalMetadata = @"additionalMetadata_example"; // Additional data to pass to server (optional)
NSURL* file = [NSURL fileURLWithPath:@"/path/to/file.txt"]; // file to upload (optional)
NSURL* file = [NSURL fileURLWithPath:@"/path/to/file"]; // file to upload (optional)
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@ -447,7 +437,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **NSNumber***| ID of pet to update |
**additionalMetadata** | **NSString***| Additional data to pass to server | [optional]
**file** | **NSURL***| file to upload | [optional]
**file** | **NSURL*****NSURL***| file to upload | [optional]
### Return type
@ -460,7 +450,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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/json, application/xml
- **Accept**: Not defined
[[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)
@ -162,23 +162,21 @@ No authorization required
# **placeOrder**
```objc
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder) order
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
```
Place an order for a pet
### Example
```objc
SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional)
SWGOrder order = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional)
SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
// Place an order for a pet
[apiInstance placeOrderWithBody:body
[apiInstance placeOrderWithOrder:order
completionHandler: ^(SWGOrder* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
@ -193,7 +191,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional]
**order** | [**SWGOrder**](SWGOrder.md)| order placed for purchasing the pet | [optional]
### Return type
@ -205,7 +203,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: 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

@ -16,7 +16,7 @@ Method | HTTP request | Description
# **createUser**
```objc
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
-(NSURLSessionTask*) createUserWithUser: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler;
```
@ -27,12 +27,12 @@ This can only be done by the logged in user.
### Example
```objc
SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional)
SWGUser user = [[SWGUser alloc] init]; // Created user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Create user
[apiInstance createUserWithBody:body
[apiInstance createUserWithUser:user
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGUserApi->createUser: %@", error);
@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGUser***](SWGUser.md)| Created user object | [optional]
**user** | [**SWGUser**](SWGUser.md)| Created user object | [optional]
### Return type
@ -56,30 +56,28 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Content-Type**: application/json
- **Accept**: Not defined
[[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)
# **createUsersWithArrayInput**
```objc
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler;
```
Creates list of users with given input array
### Example
```objc
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object (optional)
NSArray<SWGUser>* user = @[[[SWGUser alloc] init]]; // List of user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Creates list of users with given input array
[apiInstance createUsersWithArrayInputWithBody:body
[apiInstance createUsersWithArrayInputWithUser:user
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGUserApi->createUsersWithArrayInput: %@", error);
@ -91,7 +89,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
**user** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
### Return type
@ -104,29 +102,27 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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)
# **createUsersWithListInput**
```objc
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray<SWGUser>*) user
completionHandler: (void (^)(NSError* error)) handler;
```
Creates list of users with given input array
### Example
```objc
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object (optional)
NSArray<SWGUser>* user = @[[[SWGUser alloc] init]]; // List of user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Creates list of users with given input array
[apiInstance createUsersWithListInputWithBody:body
[apiInstance createUsersWithListInputWithUser:user
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGUserApi->createUsersWithListInput: %@", error);
@ -138,7 +134,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
**user** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
### Return type
@ -151,7 +147,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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 +194,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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)
@ -210,8 +206,6 @@ No authorization required
Get user by user name
### Example
```objc
@ -261,8 +255,6 @@ No authorization required
Logs user into the system
### Example
```objc
@ -314,8 +306,6 @@ No authorization required
Logs out current logged in user session
### Example
```objc
@ -345,14 +335,14 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: Not defined
[[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)
# **updateUser**
```objc
-(NSURLSessionTask*) updateUserWithUsername: (NSString*) username
body: (SWGUser*) body
user: (SWGUser) user
completionHandler: (void (^)(NSError* error)) handler;
```
@ -364,13 +354,13 @@ 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 (optional)
SWGUser user = [[SWGUser alloc] init]; // Updated user object (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Updated user
[apiInstance updateUserWithUsername:username
body:body
user:user
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGUserApi->updateUser: %@", error);
@ -383,7 +373,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 | [optional]
**user** | [**SWGUser**](SWGUser.md)| Updated user object | [optional]
### Return type
@ -395,8 +385,8 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Content-Type**: application/json
- **Accept**: Not defined
[[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)