replaced SWG by classPrefix and ran tests (#4871)

This commit is contained in:
patulacci
2017-03-03 10:29:16 +01:00
committed by wing328
parent 39a42d014b
commit e23a24c138
38 changed files with 432 additions and 918 deletions

View File

@@ -6,8 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi
- API version: 1.0.0
- Package version:
- Build date: 2016-08-23T10:56:26.470+02:00
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
- Build package: io.swagger.codegen.languages.ObjcClientCodegen
## Requirements
@@ -56,7 +55,7 @@ Import the following:
## Recommendation
It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issue.
It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.
## Getting Started
@@ -124,6 +123,12 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
## api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
## petstore_auth
- **Type**: OAuth
@@ -133,12 +138,6 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
## Author

View File

@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
s.framework = 'SystemConfiguration'
s.homepage = "https://github.com/swagger-api/swagger-codegen"
s.license = "Apache License, Version 2.0"
s.license = "Proprietary"
s.source = { :git => "https://github.com/swagger-api/swagger-codegen.git", :tag => "#{s.version}" }
s.author = { "Swagger" => "apiteam@swagger.io" }

View File

@@ -12,21 +12,10 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface SWGPetApi: NSObject <SWGApi>
extern NSString* kSWGPetApiErrorDomain;
@@ -61,7 +50,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by status
/// Multiple status values can be provided with comma seperated strings
/// Multiple status values can be provided with comma separated strings
///
/// @param status Status values that need to be considered for filter (optional) (default to available)
///
@@ -74,7 +63,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by tags
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
/// @param tags Tags to filter by (optional)
///

View File

@@ -186,7 +186,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by status
/// Multiple status values can be provided with comma seperated strings
/// Multiple status values can be provided with comma separated strings
/// @param status Status values that need to be considered for filter (optional, default to available)
///
/// @returns NSArray<SWGPet>*
@@ -247,7 +247,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by tags
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// @param tags Tags to filter by (optional)
///
/// @returns NSArray<SWGPet>*

View File

@@ -12,21 +12,10 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface SWGStoreApi: NSObject <SWGApi>
extern NSString* kSWGStoreApiErrorDomain;

View File

@@ -12,21 +12,10 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface SWGUserApi: NSObject <SWGApi>
extern NSString* kSWGUserApiErrorDomain;

View File

@@ -13,20 +13,9 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A key for `NSError` user info dictionaries.
*

View File

@@ -89,7 +89,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
#pragma mark - Task Methods
- (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock {
NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
SWGDebugLogResponse(response, responseObject,request,error);
if(!error) {
@@ -104,7 +104,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo];
completionBlock(nil, augmentedError);
}];
return task;
}
@@ -135,7 +135,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
completionBlock(file, nil);
}];
return task;
}
@@ -222,7 +222,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
[self postProcessRequest:request];
NSURLSessionTask *task = nil;
if ([self.downloadTaskResponseTypes containsObject:responseType]) {
@@ -241,9 +241,9 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
completionBlock(response, error);
}];
}
[task resume];
return task;
}
@@ -330,7 +330,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
NSMutableDictionary *headersWithAuth = [NSMutableDictionary dictionaryWithDictionary:*headers];
NSMutableDictionary *querysWithAuth = [NSMutableDictionary dictionaryWithDictionary:*querys];
id<SWGConfiguration> config = self.configuration;
for (NSString *auth in authSettings) {
NSDictionary *authSetting = config.authSettings[auth];

View File

@@ -12,20 +12,9 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
static NSString * const kSWGAPIVersion = @"1.0.0";
@protocol SWGConfiguration <NSObject>

View File

@@ -11,20 +11,9 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@class SWGApiClient;
@interface SWGDefaultConfiguration : NSObject <SWGConfiguration>
@@ -117,7 +106,7 @@
/**
* Sets the prefix for API key
*
* @param apiKeyPrefix API key prefix.
* @param prefix API key prefix.
* @param identifier API key identifier.
*/
- (void) setApiKeyPrefix:(NSString *)prefix forApiKeyPrefixIdentifier:(NSString *)identifier;
@@ -157,7 +146,7 @@
/**
* Removes header from defaultHeaders
*
* @param Header name.
* @param key Header name.
*/
-(void) removeDefaultHeaderForKey:(NSString*)key;
@@ -170,7 +159,7 @@
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key;
/**
* @param Header key name.
* @param key Header key name.
*/
-(NSString*) defaultHeaderForKey:(NSString*)key;

View File

@@ -104,13 +104,6 @@
- (NSDictionary *) authSettings {
return @{
@"petstore_auth":
@{
@"type": @"oauth",
@"in": @"header",
@"key": @"Authorization",
@"value": [self getAccessToken]
},
@"api_key":
@{
@"type": @"api_key",
@@ -118,6 +111,13 @@
@"key": @"api_key",
@"value": [self getApiKeyWithPrefix:@"api_key"]
},
@"petstore_auth":
@{
@"type": @"oauth",
@"in": @"header",
@"key": @"Authorization",
@"value": [self getAccessToken]
},
};
}