forked from loafle/openapi-generator-original
[Objc] - Fixed undeclared selector
This commit is contained in:
@@ -88,7 +88,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513;
|
||||
if ({{paramName}} == nil) {
|
||||
NSParameterAssert({{paramName}});
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector({{paramName}}))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"{{paramName}}"] };
|
||||
NSError* error = [NSError errorWithDomain:k{{classname}}ErrorDomain code:k{{classname}}MissingParamErrorCode userInfo:userInfo];
|
||||
handler({{#returnType}}nil, {{/returnType}}error);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version:
|
||||
- Build date: 2016-05-16T08:49:54.613+02:00
|
||||
- Build date: 2016-05-16T09:18:48.757+02:00
|
||||
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -144,7 +144,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
if (petId == nil) {
|
||||
NSParameterAssert(petId);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(petId))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(error);
|
||||
}
|
||||
@@ -343,7 +343,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
if (petId == nil) {
|
||||
NSParameterAssert(petId);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(petId))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(nil, error);
|
||||
}
|
||||
@@ -480,7 +480,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
if (petId == nil) {
|
||||
NSParameterAssert(petId);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(petId))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(error);
|
||||
}
|
||||
@@ -564,7 +564,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
if (petId == nil) {
|
||||
NSParameterAssert(petId);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(petId))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(error);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
|
||||
if (orderId == nil) {
|
||||
NSParameterAssert(orderId);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(orderId))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"orderId"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGStoreApiErrorDomain code:kSWGStoreApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(error);
|
||||
}
|
||||
@@ -210,7 +210,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
|
||||
if (orderId == nil) {
|
||||
NSParameterAssert(orderId);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(orderId))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"orderId"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGStoreApiErrorDomain code:kSWGStoreApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(nil, error);
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
if (username == nil) {
|
||||
NSParameterAssert(username);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(username))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(error);
|
||||
}
|
||||
@@ -331,7 +331,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
if (username == nil) {
|
||||
NSParameterAssert(username);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(username))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(nil, error);
|
||||
}
|
||||
@@ -529,7 +529,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
if (username == nil) {
|
||||
NSParameterAssert(username);
|
||||
if(handler) {
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),NSStringFromSelector(@selector(username))] };
|
||||
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
|
||||
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
|
||||
handler(error);
|
||||
}
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
contentTypes = @[@"application/json;charset=utf-8", @"application/vnd.github+xml"];
|
||||
XCTAssertEqualObjects([sanitizer selectHeaderContentType:contentTypes], @"application/json");
|
||||
|
||||
contentTypes = @[@"application/json;charset=utf-8", @"application/vnd.github+xml"];
|
||||
XCTAssertEqualObjects([sanitizer selectHeaderContentType:contentTypes], @"application/json");
|
||||
|
||||
contentTypes = @[@"application/vnd.github.v3.html+json", @"application/vnd.github+xml"];
|
||||
XCTAssertEqualObjects([sanitizer selectHeaderContentType:contentTypes], @"application/json");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user