forked from loafle/openapi-generator-original
- Remove optional license property
- License in all header files
This commit is contained in:
@@ -166,7 +166,6 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
cliOptions.add(new CliOption(AUTHOR_EMAIL, "Email to use in the podspec file.").defaultValue("apiteam@swagger.io"));
|
||||
cliOptions.add(new CliOption(GIT_REPO_URL, "URL for the git repo where this podspec should point to.")
|
||||
.defaultValue("https://github.com/swagger-api/swagger-codegen"));
|
||||
cliOptions.add(new CliOption(LICENSE, "License to use in the podspec file.").defaultValue("MIT"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -212,10 +211,6 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
setGitRepoURL((String) additionalProperties.get(GIT_REPO_URL));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(LICENSE)) {
|
||||
setLicense((String) additionalProperties.get(LICENSE));
|
||||
}
|
||||
|
||||
additionalProperties.put(POD_NAME, podName);
|
||||
additionalProperties.put(CodegenConstants.POD_VERSION, podVersion);
|
||||
additionalProperties.put(CLASS_PREFIX, classPrefix);
|
||||
@@ -256,9 +251,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
if (license == null || DEFAULT_LICENSE.equals(license)) {
|
||||
supportingFiles.add(new SupportingFile("LICENSE.mustache", "", "LICENSE"));
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("LICENSE.mustache", "", "LICENSE"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,11 +8,8 @@
|
||||
#import "{{classPrefix}}ResponseDeserializer.h"
|
||||
#import "{{classPrefix}}Sanitizer.h"
|
||||
#import "{{classPrefix}}Logger.h"
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
{{#models}}{{#model}}#import "{{classname}}.h"
|
||||
{{/model}}{{/models}}
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
#import "{{classPrefix}}ApiClient.h"
|
||||
#import "{{classPrefix}}Logger.h"
|
||||
|
||||
/** The `{{classPrefix}}Configuration` class manages the configurations for the sdk.
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
{{>licenceInfo}}
|
||||
|
||||
@class {{classPrefix}}ApiClient;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AFNetworking/AFURLRequestSerialization.h>
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@interface {{classPrefix}}JSONRequestSerializer : AFJSONRequestSerializer
|
||||
@end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AFNetworking/AFURLResponseSerialization.h>
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@interface {{classPrefix}}JSONResponseSerializer : AFJSONResponseSerializer
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
#import <ISO8601/ISO8601.h>
|
||||
#import <JSONModel/JSONValueTransformer.h>
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@interface JSONValueTransformer (ISO8601)
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
{{>licenceInfo}}
|
||||
|
||||
#ifndef {{classPrefix}}DebugLogResponse
|
||||
#define {{classPrefix}}DebugLogResponse(response, responseObject,request, error) [[{{classPrefix}}Logger sharedLogger] logResponse:response responseObject:responseObject request:request error:error];
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <JSONModel/JSONModel.h>
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@interface {{classPrefix}}Object : JSONModel
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
{{>licenceInfo}}
|
||||
|
||||
@interface {{classPrefix}}QueryParamCollection : NSObject
|
||||
|
||||
@property(nonatomic, readonly) NSArray* values;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
{{>licenceInfo}}
|
||||
|
||||
/**
|
||||
* A key for deserialization ErrorDomain
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
{{>licenceInfo}}
|
||||
|
||||
extern NSString * {{classPrefix}}PercentEscapedStringFromString(NSString *string);
|
||||
|
||||
|
||||
@@ -2,14 +2,9 @@
|
||||
{{#imports}}#import "{{import}}.h"
|
||||
{{/imports}}
|
||||
#import "{{classPrefix}}Api.h"
|
||||
{{newline}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
{{#operations}}
|
||||
{{>licenceInfo}}
|
||||
|
||||
|
||||
@interface {{classname}}: NSObject <{{classPrefix}}Api>
|
||||
|
||||
@@ -18,6 +13,7 @@ extern NSInteger k{{classname}}MissingParamErrorCode;
|
||||
|
||||
+(instancetype) sharedAPI;
|
||||
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
/// {{{summary}}}
|
||||
/// {{#notes}}{{{notes}}}{{/notes}}
|
||||
@@ -33,6 +29,6 @@ extern NSInteger k{{classname}}MissingParamErrorCode;
|
||||
|
||||
{{newline}}
|
||||
{{/operation}}
|
||||
|
||||
{{/operations}}
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
#import "{{classPrefix}}Object.h"
|
||||
#import "{{classPrefix}}ApiClient.h"
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
{{>licenceInfo}}
|
||||
|
||||
@protocol {{classPrefix}}Api <NSObject>
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* {{{appName}}}
|
||||
* {{{appDescription}}}
|
||||
*
|
||||
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@@ -1,11 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "{{classPrefix}}Object.h"
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
{{>licenceInfo}}
|
||||
|
||||
{{#imports}}#import "{{import}}.h"
|
||||
{{/imports}}
|
||||
|
||||
Reference in New Issue
Block a user