forked from loafle/openapi-generator-original
[ObjC] Add version define and share default headers of each client
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#import <ISO8601/NSDate+ISO8601.h>
|
||||
|
||||
#import "{{classPrefix}}Logger.h"
|
||||
#import "{{classPrefix}}ApiClient.h"
|
||||
#import "{{classPrefix}}JSONRequestSerializer.h"
|
||||
#import "{{classPrefix}}JSONResponseSerializer.h"
|
||||
@@ -62,24 +63,18 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response)
|
||||
#pragma mark - Initialize Methods
|
||||
|
||||
- (instancetype)init {
|
||||
|
||||
return [self initWithConfiguration:[{{classPrefix}}DefaultConfiguration sharedConfig]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url {
|
||||
|
||||
return [self initWithBaseURL:url
|
||||
configuration:[{{classPrefix}}DefaultConfiguration sharedConfig]];
|
||||
|
||||
return [self initWithBaseURL:url configuration:[{{classPrefix}}DefaultConfiguration sharedConfig]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithConfiguration:(id<{{classPrefix}}Configuration>)configuration {
|
||||
|
||||
return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url
|
||||
configuration:(id<{{classPrefix}}Configuration>)configuration {
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id<{{classPrefix}}Configuration>)configuration {
|
||||
|
||||
self = [super initWithBaseURL:url];
|
||||
if (self) {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "{{classPrefix}}Logger.h"
|
||||
|
||||
@class {{classPrefix}}Logger;
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
static NSString * const k{{classPrefix}}APIVersion = @"{{podVersion}}";
|
||||
|
||||
@protocol {{classPrefix}}Configuration <NSObject>
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import "{{classPrefix}}DefaultConfiguration.h"
|
||||
#import "{{classPrefix}}BasicAuthTokenProvider.h"
|
||||
#import "{{classPrefix}}Logger.h"
|
||||
|
||||
@interface {{classPrefix}}DefaultConfiguration ()
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@class {{classPrefix}}ApiClient;
|
||||
|
||||
@interface {{classPrefix}}DefaultConfiguration : NSObject <{{classPrefix}}Configuration>
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{{#operations}}
|
||||
#import "{{classname}}.h"
|
||||
#import "{{classPrefix}}QueryParamCollection.h"
|
||||
#import "{{classPrefix}}ApiClient.h"
|
||||
{{#imports}}#import "{{import}}.h"
|
||||
{{/imports}}
|
||||
{{newline}}
|
||||
|
||||
@interface {{classname}} ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -29,7 +30,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -37,15 +38,15 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "{{classPrefix}}Object.h"
|
||||
#import "{{classPrefix}}ApiClient.h"
|
||||
|
||||
@class {{classPrefix}}ApiClient;
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
-(instancetype) initWithApiClient:({{classPrefix}}ApiClient *)apiClient;
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:");
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key;
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key;
|
||||
|
||||
-(NSDictionary *)defaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -12,9 +12,9 @@ Pod::Spec.new do |s|
|
||||
s.version = "{{podVersion}}"
|
||||
{{#apiInfo}}{{#apis}}{{^hasMore}}
|
||||
s.summary = "{{appName}}"
|
||||
s.description = <<-DESC
|
||||
{{{#appDescription}}} s.description = <<-DESC
|
||||
{{{appDescription}}}
|
||||
DESC
|
||||
DESC{{{/appDescription}}}
|
||||
{{/hasMore}}{{/apis}}{{/apiInfo}}
|
||||
s.platform = :ios, '7.0'
|
||||
s.requires_arc = true
|
||||
|
||||
@@ -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-08-04T12:24:23.866+02:00
|
||||
- Build date: 2016-08-17T10:06:58.453+02:00
|
||||
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#import "SWGPetApi.h"
|
||||
#import "SWGQueryParamCollection.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGPet.h"
|
||||
|
||||
|
||||
@interface SWGPetApi ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +28,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -35,15 +36,15 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#import "SWGStoreApi.h"
|
||||
#import "SWGQueryParamCollection.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGOrder.h"
|
||||
|
||||
|
||||
@interface SWGStoreApi ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +28,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -35,15 +36,15 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#import "SWGUserApi.h"
|
||||
#import "SWGQueryParamCollection.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGUser.h"
|
||||
|
||||
|
||||
@interface SWGUserApi ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +28,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -35,15 +36,15 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SWGObject.h"
|
||||
#import "SWGApiClient.h"
|
||||
|
||||
@class SWGApiClient;
|
||||
|
||||
/**
|
||||
* Swagger Petstore
|
||||
@@ -32,9 +32,9 @@
|
||||
|
||||
-(instancetype) initWithApiClient:(SWGApiClient *)apiClient;
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:");
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key;
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key;
|
||||
|
||||
-(NSDictionary *)defaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import <ISO8601/NSDate+ISO8601.h>
|
||||
|
||||
#import "SWGLogger.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGJSONRequestSerializer.h"
|
||||
#import "SWGJSONResponseSerializer.h"
|
||||
@@ -62,24 +63,18 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
|
||||
#pragma mark - Initialize Methods
|
||||
|
||||
- (instancetype)init {
|
||||
|
||||
return [self initWithConfiguration:[SWGDefaultConfiguration sharedConfig]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url {
|
||||
|
||||
return [self initWithBaseURL:url
|
||||
configuration:[SWGDefaultConfiguration sharedConfig]];
|
||||
|
||||
return [self initWithBaseURL:url configuration:[SWGDefaultConfiguration sharedConfig]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithConfiguration:(id<SWGConfiguration>)configuration {
|
||||
|
||||
return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url
|
||||
configuration:(id<SWGConfiguration>)configuration {
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id<SWGConfiguration>)configuration {
|
||||
|
||||
self = [super initWithBaseURL:url];
|
||||
if (self) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SWGLogger.h"
|
||||
|
||||
@class SWGLogger;
|
||||
|
||||
/**
|
||||
* Swagger Petstore
|
||||
@@ -25,6 +26,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
static NSString * const kSWGAPIVersion = @"1.0.0";
|
||||
|
||||
@protocol SWGConfiguration <NSObject>
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@class SWGApiClient;
|
||||
|
||||
@interface SWGDefaultConfiguration : NSObject <SWGConfiguration>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import "SWGDefaultConfiguration.h"
|
||||
#import "SWGBasicAuthTokenProvider.h"
|
||||
#import "SWGLogger.h"
|
||||
|
||||
@interface SWGDefaultConfiguration ()
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction>
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForTesting = "YES">
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
@@ -17,9 +23,13 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug">
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
@@ -29,8 +39,43 @@
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
useCustomWorkingDirectory = "NO">
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
BuildableName = "SwaggerClient_Tests.xctest"
|
||||
BlueprintName = "SwaggerClient_Tests"
|
||||
ReferencedContainer = "container:SwaggerClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0600"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,10 +23,10 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -48,15 +48,18 @@
|
||||
ReferencedContainer = "container:SwaggerClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
@@ -72,10 +75,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
||||
@@ -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-08-04T12:24:22.869+02:00
|
||||
- Build date: 2016-08-17T10:06:57.326+02:00
|
||||
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#import "SWGPetApi.h"
|
||||
#import "SWGQueryParamCollection.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGPet.h"
|
||||
|
||||
|
||||
@interface SWGPetApi ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +28,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -35,15 +36,15 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#import "SWGStoreApi.h"
|
||||
#import "SWGQueryParamCollection.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGOrder.h"
|
||||
|
||||
|
||||
@interface SWGStoreApi ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +28,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -35,15 +36,15 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#import "SWGUserApi.h"
|
||||
#import "SWGQueryParamCollection.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGUser.h"
|
||||
|
||||
|
||||
@interface SWGUserApi ()
|
||||
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *defaultHeaders;
|
||||
@property (nonatomic, strong, readwrite) NSMutableDictionary *mutableDefaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +28,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_apiClient = apiClient;
|
||||
_defaultHeaders = [NSMutableDictionary dictionary];
|
||||
_mutableDefaultHeaders = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -35,15 +36,15 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
|
||||
#pragma mark -
|
||||
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key {
|
||||
return self.defaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key {
|
||||
[self setDefaultHeaderValue:value forKey:key];
|
||||
return self.mutableDefaultHeaders[key];
|
||||
}
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key {
|
||||
[self.defaultHeaders setValue:value forKey:key];
|
||||
[self.mutableDefaultHeaders setValue:value forKey:key];
|
||||
}
|
||||
|
||||
-(NSDictionary *)defaultHeaders {
|
||||
return self.mutableDefaultHeaders;
|
||||
}
|
||||
|
||||
#pragma mark - Api Methods
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SWGObject.h"
|
||||
#import "SWGApiClient.h"
|
||||
|
||||
@class SWGApiClient;
|
||||
|
||||
/**
|
||||
* Swagger Petstore
|
||||
@@ -32,9 +32,9 @@
|
||||
|
||||
-(instancetype) initWithApiClient:(SWGApiClient *)apiClient;
|
||||
|
||||
-(void) addHeader:(NSString*)value forKey:(NSString*)key DEPRECATED_MSG_ATTRIBUTE("setDefaultHeaderValue:forKey:");
|
||||
|
||||
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key;
|
||||
-(NSString*) defaultHeaderForKey:(NSString*)key;
|
||||
|
||||
-(NSDictionary *)defaultHeaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import <ISO8601/NSDate+ISO8601.h>
|
||||
|
||||
#import "SWGLogger.h"
|
||||
#import "SWGApiClient.h"
|
||||
#import "SWGJSONRequestSerializer.h"
|
||||
#import "SWGJSONResponseSerializer.h"
|
||||
@@ -62,24 +63,18 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
|
||||
#pragma mark - Initialize Methods
|
||||
|
||||
- (instancetype)init {
|
||||
|
||||
return [self initWithConfiguration:[SWGDefaultConfiguration sharedConfig]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url {
|
||||
|
||||
return [self initWithBaseURL:url
|
||||
configuration:[SWGDefaultConfiguration sharedConfig]];
|
||||
|
||||
return [self initWithBaseURL:url configuration:[SWGDefaultConfiguration sharedConfig]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithConfiguration:(id<SWGConfiguration>)configuration {
|
||||
|
||||
return [self initWithBaseURL:[NSURL URLWithString:configuration.host] configuration:configuration];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url
|
||||
configuration:(id<SWGConfiguration>)configuration {
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url configuration:(id<SWGConfiguration>)configuration {
|
||||
|
||||
self = [super initWithBaseURL:url];
|
||||
if (self) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SWGLogger.h"
|
||||
|
||||
@class SWGLogger;
|
||||
|
||||
/**
|
||||
* Swagger Petstore
|
||||
@@ -25,6 +26,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
static NSString * const kSWGAPIVersion = @"1.0.0";
|
||||
|
||||
@protocol SWGConfiguration <NSObject>
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@class SWGApiClient;
|
||||
|
||||
@interface SWGDefaultConfiguration : NSObject <SWGConfiguration>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import "SWGDefaultConfiguration.h"
|
||||
#import "SWGBasicAuthTokenProvider.h"
|
||||
#import "SWGLogger.h"
|
||||
|
||||
@interface SWGDefaultConfiguration ()
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction>
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForTesting = "YES">
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
@@ -17,9 +23,13 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug">
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
@@ -29,8 +39,43 @@
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
useCustomWorkingDirectory = "NO">
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
BuildableName = "SwaggerClient_Tests.xctest"
|
||||
BlueprintName = "SwaggerClient_Tests"
|
||||
ReferencedContainer = "container:SwaggerClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0600"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,10 +23,10 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -48,15 +48,18 @@
|
||||
ReferencedContainer = "container:SwaggerClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
@@ -72,10 +75,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
||||
Reference in New Issue
Block a user