forked from loafle/openapi-generator-original
commit
794e7e4a22
1
.gitignore
vendored
1
.gitignore
vendored
@ -89,6 +89,7 @@ samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddat
|
||||
|
||||
# C#
|
||||
*.csproj.user
|
||||
samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs
|
||||
samples/client/petstore/csharp/SwaggerClientTest/.vs
|
||||
samples/client/petstore/csharp/SwaggerClientTest/obj
|
||||
samples/client/petstore/csharp/SwaggerClientTest/bin
|
||||
|
43
README.md
43
README.md
@ -69,7 +69,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
|
||||
-------------------------- | ------------ | -------------------------- | -----
|
||||
2.1.7-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen)
|
||||
2.2.0-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen)
|
||||
2.1.6 (**current stable**) | 2016-04-06 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-codegen/tree/v2.1.6)
|
||||
2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/v2.0.17)
|
||||
1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1)
|
||||
@ -408,6 +408,44 @@ java -Dapis -DmodelTests=false {opts}
|
||||
|
||||
When using selective generation, _only_ the templates needed for the specific generation will be used.
|
||||
|
||||
### Ignore file format
|
||||
|
||||
Swagger codegen supports a `.swagger-codegen-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with.
|
||||
|
||||
The ignore file allows for better control over overwriting existing files than the `--skip-overwrite` flag. With the ignore file, you can specify individual files or directories can be ignored. This can be useful, for example if you only want a subset of the generated code.
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
# Swagger Codegen Ignore
|
||||
# Lines beginning with a # are comments
|
||||
|
||||
# This should match build.sh located anywhere.
|
||||
build.sh
|
||||
|
||||
# Matches build.sh in the root
|
||||
/build.sh
|
||||
|
||||
# Exclude all recursively
|
||||
docs/**
|
||||
|
||||
# Explicitly allow files excluded by other rules
|
||||
!docs/UserApi.md
|
||||
|
||||
# Recursively exclude directories named Api
|
||||
# You can't negate files below this directory.
|
||||
src/**/Api/
|
||||
|
||||
# When this file is nested under /Api (excluded above),
|
||||
# this rule is ignored because parent directory is excluded by previous rule.
|
||||
!src/**/PetApiTests.cs
|
||||
|
||||
# Exclude a single, nested file explicitly
|
||||
src/IO.Swagger.Test/Model/AnimalFarmTests.cs
|
||||
```
|
||||
|
||||
The `.swagger-codegen-ignore` file must exist in the root of the output directory.
|
||||
|
||||
### Customizing the generator
|
||||
|
||||
There are different aspects of customizing the code generator beyond just creating or modifying templates. Each language has a supporting configuration file to handle different type mappings, etc:
|
||||
@ -814,6 +852,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
||||
- [Cachet Financial](http://www.cachetfinancial.com/)
|
||||
- [CloudBoost](https://www.CloudBoost.io/)
|
||||
- [Cupix](http://www.cupix.com)
|
||||
- [DBBest Technologies](https://www.dbbest.com)
|
||||
- [DocuSign](https://www.docusign.com)
|
||||
- [Ergon](http://www.ergon.ch/)
|
||||
- [eureka](http://eure.jp/)
|
||||
@ -824,6 +863,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
||||
- [Interactive Intelligence](http://developer.mypurecloud.com/)
|
||||
- [LANDR Audio](https://www.landr.com/)
|
||||
- [LiveAgent](https://www.ladesk.com/)
|
||||
- [Kabuku](http://www.kabuku.co.jp/en)
|
||||
- [Kuary](https://kuary.com/)
|
||||
- [nViso](http://www.nviso.ch/)
|
||||
- [Okiok](https://www.okiok.com)
|
||||
@ -836,6 +876,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
||||
- [REstore](https://www.restore.eu)
|
||||
- [Revault Sàrl](http://revault.ch)
|
||||
- [Royal Bank of Canada (RBC)](http://www.rbc.com/canada.html)
|
||||
- [SCOOP Software GmbH](http://www.scoop-software.de)
|
||||
- [SmartRecruiters](https://www.smartrecruiters.com/)
|
||||
- [StyleRecipe](http://stylerecipe.co.jp)
|
||||
- [Svenska Spel AB](https://www.svenskaspel.se/)
|
||||
|
@ -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/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc --additional-properties coreData=true"
|
||||
|
||||
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -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/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift-promisekit"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -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/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -48,6 +48,44 @@ mvn clean compile
|
||||
- `configOptions` - a map of language-specific parameters (see below)
|
||||
- `configHelp` - dumps the configuration help for the specified library (generates no sources)
|
||||
|
||||
### Custom Generator
|
||||
|
||||
Specifying a custom generator is a bit different. It doesn't support the classpath:/ syntax, but it does support the fully qualified name of the package. You can also specify your custom templates, which also get pulled in. Notice the dependency on a project, in the plugin scope. That would be your generator/template jar.
|
||||
|
||||
```xml
|
||||
<plugin>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
||||
<version>${swagger-codegen-maven-plugin-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
||||
<!-- language file, like e.g. JavaJaxRSCodegen shipped with swagger -->
|
||||
<language>com.my.package.for.GeneratorLanguage</language>
|
||||
<templateDirectory>myTemplateDir</templateDirectory>
|
||||
|
||||
<output>${project.build.directory}/generated-sources</output>
|
||||
<apiPackage>${default.package}.handler</apiPackage>
|
||||
<modelPackage>${default.package}.model</modelPackage>
|
||||
<invokerPackage>${default.package}.handler</invokerPackage>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.my.generator</groupId>
|
||||
<artifactId>customgenerator</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
```
|
||||
|
||||
### Sample configuration
|
||||
|
||||
- Please see [an example configuration](examples) for using the plugin
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -792,6 +792,8 @@ public class DefaultCodegen {
|
||||
importMapping.put("LocalDate", "org.joda.time.*");
|
||||
importMapping.put("LocalTime", "org.joda.time.*");
|
||||
|
||||
supportingFiles.add(new GlobalSupportingFile("LICENSE", "LICENSE"));
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
|
||||
CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC).defaultValue(Boolean.TRUE.toString()));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.ENSURE_UNIQUE_PARAMS, CodegenConstants
|
||||
|
@ -530,9 +530,12 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
LOGGER.info("Skipped overwriting " + outputFilename);
|
||||
continue;
|
||||
}
|
||||
|
||||
String templateFile = getFullTemplateFile(config, support.templateFile);
|
||||
|
||||
String templateFile;
|
||||
if( support instanceof GlobalSupportingFile) {
|
||||
templateFile = config.getCommonTemplateDir() + File.separator + support.templateFile;
|
||||
} else {
|
||||
templateFile = getFullTemplateFile(config, support.templateFile);
|
||||
}
|
||||
boolean shouldGenerate = true;
|
||||
if(supportingFilesToGenerate != null && supportingFilesToGenerate.size() > 0) {
|
||||
if(supportingFilesToGenerate.contains(support.destinationFilename)) {
|
||||
@ -605,6 +608,19 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
}
|
||||
files.add(ignoreFile);
|
||||
}
|
||||
|
||||
// Add default LICENSE (Apache-2.0) for all generators
|
||||
final String apache2License = "LICENSE";
|
||||
String licenseFileNameTarget = config.outputFolder() + File.separator + apache2License;
|
||||
File licenseFile = new File(licenseFileNameTarget);
|
||||
String licenseFileNameSource = File.separator + config.getCommonTemplateDir() + File.separator + apache2License;
|
||||
String licenseFileContents = readResourceContents(licenseFileNameSource);
|
||||
try {
|
||||
writeToFile(licenseFileNameTarget, licenseFileContents);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Could not generate LICENSE file '" + apache2License + "'", e);
|
||||
}
|
||||
files.add(licenseFile);
|
||||
}
|
||||
config.processSwagger(swagger);
|
||||
return files;
|
||||
|
@ -0,0 +1,12 @@
|
||||
package io.swagger.codegen;
|
||||
|
||||
public class GlobalSupportingFile extends SupportingFile {
|
||||
|
||||
GlobalSupportingFile(String templateFile, String folder, String destinationFilename) {
|
||||
super(templateFile, folder, destinationFilename);
|
||||
}
|
||||
|
||||
GlobalSupportingFile(String templateFile, String destinationFilename) {
|
||||
super(templateFile, destinationFilename);
|
||||
}
|
||||
}
|
@ -5,6 +5,10 @@ public class SupportingFile {
|
||||
public String folder;
|
||||
public String destinationFilename;
|
||||
|
||||
public SupportingFile(String templateFile, String destinationFilename) {
|
||||
this(templateFile, "", destinationFilename);
|
||||
}
|
||||
|
||||
public SupportingFile(String templateFile, String folder, String destinationFilename) {
|
||||
this.templateFile = templateFile;
|
||||
this.folder = folder;
|
||||
@ -45,3 +49,5 @@ public class SupportingFile {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,20 +1,27 @@
|
||||
package io.swagger.codegen.ignore.rules;
|
||||
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.PathMatcher;
|
||||
import java.nio.file.*;
|
||||
import java.util.List;
|
||||
|
||||
public class DirectoryRule extends FileRule {
|
||||
|
||||
private PathMatcher matcher = null;
|
||||
private PathMatcher directoryMatcher = null;
|
||||
private PathMatcher contentsMatcher = null;
|
||||
|
||||
DirectoryRule(List<Part> syntax, String definition) {
|
||||
super(syntax, definition);
|
||||
matcher = FileSystems.getDefault().getPathMatcher("glob:**/"+this.getPattern());
|
||||
String pattern = this.getPattern();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("glob:");
|
||||
sb.append(pattern);
|
||||
if(!pattern.endsWith("/")) sb.append("/");
|
||||
directoryMatcher = FileSystems.getDefault().getPathMatcher(sb.toString());
|
||||
sb.append("**");
|
||||
contentsMatcher = FileSystems.getDefault().getPathMatcher(sb.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean matches(String relativePath) {
|
||||
return matcher.matches(FileSystems.getDefault().getPath(relativePath));
|
||||
return contentsMatcher.matches(FileSystems.getDefault().getPath(relativePath)) || directoryMatcher.matches(FileSystems.getDefault().getPath(relativePath));
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,13 @@ public class IgnoreLineParser {
|
||||
i++;
|
||||
continue;
|
||||
} else {
|
||||
|
||||
if (sb.length() > 0) {
|
||||
// A MATCH_ANY may commonly follow a filename or some other character. Dump that to results before the MATCH_ANY.
|
||||
parts.add(new Part(Token.TEXT, sb.toString()));
|
||||
sb.delete(0, sb.length());
|
||||
}
|
||||
|
||||
parts.add(new Part(Token.MATCH_ANY));
|
||||
continue;
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
"string",
|
||||
"bool?",
|
||||
"double?",
|
||||
"decimal?",
|
||||
"int?",
|
||||
"long?",
|
||||
"float?",
|
||||
@ -112,7 +113,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
typeMapping.put("float", "float?");
|
||||
typeMapping.put("long", "long?");
|
||||
typeMapping.put("double", "double?");
|
||||
typeMapping.put("number", "double?");
|
||||
typeMapping.put("number", "decimal?");
|
||||
typeMapping.put("datetime", "DateTime?");
|
||||
typeMapping.put("date", "DateTime?");
|
||||
typeMapping.put("file", "System.IO.Stream");
|
||||
|
@ -247,6 +247,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
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"));
|
||||
// apache v2 license
|
||||
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
|
||||
|
||||
if (optionalAssemblyInfoFlag) {
|
||||
supportingFiles.add(new SupportingFile("AssemblyInfo.mustache", packageFolder + File.separator + "Properties", "AssemblyInfo.cs"));
|
||||
|
@ -148,6 +148,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("api_response.mustache", "", "api_response.go"));
|
||||
supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
|
||||
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
|
||||
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -332,6 +332,13 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.properties") );
|
||||
supportingFiles.add( new SupportingFile( "gradle-wrapper.jar",
|
||||
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.jar") );
|
||||
|
||||
//generate markdown docs for retrofit2
|
||||
if ( usesRetrofit2Library() ){
|
||||
modelDocTemplateFiles.put("model_doc.mustache", ".md");
|
||||
apiDocTemplateFiles.put("api_doc.mustache", ".md");
|
||||
}
|
||||
|
||||
} else if("jersey2".equals(getLibrary())) {
|
||||
// generate markdown docs
|
||||
modelDocTemplateFiles.put("model_doc.mustache", ".md");
|
||||
|
@ -1,14 +1,7 @@
|
||||
package io.swagger.codegen.languages;
|
||||
|
||||
import io.swagger.codegen.CliOption;
|
||||
import io.swagger.codegen.CodegenConfig;
|
||||
import io.swagger.codegen.CodegenConstants;
|
||||
import io.swagger.codegen.CodegenOperation;
|
||||
import io.swagger.codegen.CodegenParameter;
|
||||
import io.swagger.codegen.CodegenProperty;
|
||||
import io.swagger.codegen.CodegenType;
|
||||
import io.swagger.codegen.DefaultCodegen;
|
||||
import io.swagger.codegen.SupportingFile;
|
||||
import io.swagger.codegen.*;
|
||||
import io.swagger.models.Model;
|
||||
import io.swagger.models.properties.*;
|
||||
|
||||
import java.io.File;
|
||||
@ -26,9 +19,10 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
public static final String POD_NAME = "podName";
|
||||
public static final String AUTHOR_NAME = "authorName";
|
||||
public static final String AUTHOR_EMAIL = "authorEmail";
|
||||
public static final String GIT_REPO_URL = "gitRepoURL";
|
||||
public static final String LICENSE = "license";
|
||||
|
||||
public static final String GIT_REPO_URL = "gitRepoURL";
|
||||
public static final String DEFAULT_LICENSE = "Apache License, Version 2.0";
|
||||
public static final String CORE_DATA = "coreData";
|
||||
public static final String BinaryDataType = "ObjcClientCodegenBinaryData";
|
||||
|
||||
protected Set<String> foundationClasses = new HashSet<String>();
|
||||
@ -37,7 +31,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String classPrefix = "SWG";
|
||||
protected String authorName = "Swagger";
|
||||
protected String authorEmail = "apiteam@swagger.io";
|
||||
protected String license = "MIT";
|
||||
protected String license = DEFAULT_LICENSE;
|
||||
protected String gitRepoURL = "https://github.com/swagger-api/swagger-codegen";
|
||||
protected String[] specialWords = {"new", "copy"};
|
||||
protected String apiDocPath = "docs/";
|
||||
@ -46,6 +40,8 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String coreFilesPath = "Core/";
|
||||
protected String apiFilesPath = "Api/";
|
||||
|
||||
protected boolean generateCoreData = false;
|
||||
|
||||
protected Set<String> advancedMapingTypes = new HashSet<String>();
|
||||
|
||||
public ObjcClientCodegen() {
|
||||
@ -73,6 +69,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
defaultIncludes.add("NSDictionary");
|
||||
defaultIncludes.add("NSMutableArray");
|
||||
defaultIncludes.add("NSMutableDictionary");
|
||||
defaultIncludes.add("NSManagedObject");
|
||||
|
||||
defaultIncludes.add(BinaryDataType);
|
||||
|
||||
@ -154,6 +151,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
instantiationTypes.put("map", "NSMutableDictionary");
|
||||
|
||||
cliOptions.clear();
|
||||
cliOptions.add(new CliOption(CORE_DATA, "Should generate core data models").defaultValue("false"));
|
||||
cliOptions.add(new CliOption(CLASS_PREFIX, "prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`")
|
||||
.defaultValue("SWG"));
|
||||
cliOptions.add(new CliOption(POD_NAME, "cocoapods package name (convention: CameCase).")
|
||||
@ -164,7 +162,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
|
||||
@ -194,6 +191,12 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
setPodVersion((String) additionalProperties.get(CodegenConstants.POD_VERSION));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CORE_DATA)) {
|
||||
Object coreData = additionalProperties.get(CORE_DATA);
|
||||
if(((String)coreData).equalsIgnoreCase("true")) {
|
||||
generateCoreData = true;
|
||||
}
|
||||
}
|
||||
if (additionalProperties.containsKey(CLASS_PREFIX)) {
|
||||
setClassPrefix((String) additionalProperties.get(CLASS_PREFIX));
|
||||
}
|
||||
@ -210,8 +213,11 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
setGitRepoURL((String) additionalProperties.get(GIT_REPO_URL));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(LICENSE)) {
|
||||
setLicense((String) additionalProperties.get(LICENSE));
|
||||
if(generateCoreData) {
|
||||
modelTemplateFiles.put("NSManagedObject-header.mustache", "ManagedObject.h");
|
||||
modelTemplateFiles.put("NSManagedObject-body.mustache", "ManagedObject.m");
|
||||
modelTemplateFiles.put("NSManagedObjectBuilder-header.mustache", "ManagedObjectBuilder.h");
|
||||
modelTemplateFiles.put("NSManagedObjectBuilder-body.mustache", "ManagedObjectBuilder.m");
|
||||
}
|
||||
|
||||
additionalProperties.put(POD_NAME, podName);
|
||||
@ -225,6 +231,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
// make api and model doc path available in mustache template
|
||||
additionalProperties.put("apiDocPath", apiDocPath);
|
||||
additionalProperties.put("modelDocPath", modelDocPath);
|
||||
additionalProperties.put("useCoreData", generateCoreData);
|
||||
|
||||
modelPackage = podName;
|
||||
apiPackage = podName;
|
||||
@ -245,8 +252,8 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("Sanitizer-header.mustache", coreFileFolder(), classPrefix + "Sanitizer.h"));
|
||||
supportingFiles.add(new SupportingFile("Logger-body.mustache", coreFileFolder(), classPrefix + "Logger.m"));
|
||||
supportingFiles.add(new SupportingFile("Logger-header.mustache", coreFileFolder(), classPrefix + "Logger.h"));
|
||||
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601.m", coreFileFolder(), "JSONValueTransformer+ISO8601.m"));
|
||||
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601.h", coreFileFolder(), "JSONValueTransformer+ISO8601.h"));
|
||||
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601-body.mustache", coreFileFolder(), "JSONValueTransformer+ISO8601.m"));
|
||||
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601-header.mustache", coreFileFolder(), "JSONValueTransformer+ISO8601.h"));
|
||||
supportingFiles.add(new SupportingFile("Configuration-body.mustache", coreFileFolder(), classPrefix + "Configuration.m"));
|
||||
supportingFiles.add(new SupportingFile("Configuration-header.mustache", coreFileFolder(), classPrefix + "Configuration.h"));
|
||||
supportingFiles.add(new SupportingFile("api-protocol.mustache", coreFileFolder(), classPrefix + "Api.h"));
|
||||
@ -255,6 +262,10 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
|
||||
if(generateCoreData) {
|
||||
supportingFiles.add(new SupportingFile("xccurrentversion.mustache", (modelPackage() + "/" + modelFilesPath + "/").replace("/", File.separator) + classPrefix + "Model.xcdatamodeld", ".xccurrentversion"));
|
||||
supportingFiles.add(new SupportingFile("Model.xcdatamodel.mustache",(modelPackage() + "/" + modelFilesPath + "/").replace("/", File.separator) + classPrefix + "Model.xcdatamodeld" + File.separator + classPrefix + "Model.xcdatamodel", "contents"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -292,6 +303,15 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
return toModelNameWithoutReservedWordCheck(type);
|
||||
}
|
||||
|
||||
public CodegenProperty coreDatafromProperty(String name, Property p) {
|
||||
CodegenProperty property = fromProperty(name, p);
|
||||
if(!generateCoreData) {
|
||||
return property;
|
||||
}
|
||||
property.baseType = getTypeCoreDataDeclaration(p);
|
||||
return property;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeDeclaration(Property p) {
|
||||
if (p instanceof ArrayProperty) {
|
||||
@ -363,6 +383,77 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getTypeCoreDataDeclaration(Property p) {
|
||||
if (p instanceof ArrayProperty) {
|
||||
ArrayProperty ap = (ArrayProperty) p;
|
||||
Property inner = ap.getItems();
|
||||
String innerType = getSwaggerType(inner);
|
||||
|
||||
String innerTypeDeclaration = getTypeDeclaration(inner);
|
||||
if (innerTypeDeclaration.endsWith("*")) {
|
||||
innerTypeDeclaration = innerTypeDeclaration.substring(0, innerTypeDeclaration.length() - 1);
|
||||
}
|
||||
|
||||
if(innerTypeDeclaration.equalsIgnoreCase(BinaryDataType)) {
|
||||
return "NSData*";
|
||||
}
|
||||
// In this codition, type of property p is array of primitive,
|
||||
// return container type with pointer, e.g. `NSArray*<NSString*>*'
|
||||
if (languageSpecificPrimitives.contains(innerTypeDeclaration)) {
|
||||
return getSwaggerType(p) + "<" + innerTypeDeclaration + "*>*";
|
||||
}
|
||||
// In this codition, type of property p is array of model,
|
||||
// return container type combine inner type with pointer, e.g. `NSArray<SWGTag>*'
|
||||
else {
|
||||
for (String sd : advancedMapingTypes) {
|
||||
if(innerTypeDeclaration.startsWith(sd)) {
|
||||
return getSwaggerType(p) + "<" + innerTypeDeclaration + "*>*";
|
||||
}
|
||||
}
|
||||
return getSwaggerType(p) + "<" + innerTypeDeclaration + ">*";
|
||||
}
|
||||
} else if (p instanceof MapProperty) {
|
||||
MapProperty mp = (MapProperty) p;
|
||||
Property inner = mp.getAdditionalProperties();
|
||||
|
||||
String innerTypeDeclaration = getTypeDeclaration(inner);
|
||||
|
||||
if (innerTypeDeclaration.endsWith("*")) {
|
||||
innerTypeDeclaration = innerTypeDeclaration.substring(0, innerTypeDeclaration.length() - 1);
|
||||
}
|
||||
if (languageSpecificPrimitives.contains(innerTypeDeclaration)) {
|
||||
return getSwaggerType(p) + "<NSString*, " + innerTypeDeclaration + "*>*";
|
||||
} else {
|
||||
for (String s : advancedMapingTypes) {
|
||||
if(innerTypeDeclaration.startsWith(s)) {
|
||||
return getSwaggerType(p) + "<NSString*, " + innerTypeDeclaration + "*>*";
|
||||
}
|
||||
}
|
||||
return getSwaggerType(p) + "<NSString*, " + innerTypeDeclaration + ">*";
|
||||
}
|
||||
} else {
|
||||
String swaggerType = getSwaggerType(p);
|
||||
|
||||
// In this codition, type of p is objective-c primitive type, e.g. `NSSNumber',
|
||||
// return type of p with pointer, e.g. `NSNumber*'
|
||||
if (languageSpecificPrimitives.contains(swaggerType) &&
|
||||
foundationClasses.contains(swaggerType)) {
|
||||
return swaggerType + "*";
|
||||
}
|
||||
// In this codition, type of p is c primitive type, e.g. `bool',
|
||||
// return type of p, e.g. `bool'
|
||||
else if (languageSpecificPrimitives.contains(swaggerType)) {
|
||||
return swaggerType;
|
||||
}
|
||||
// In this codition, type of p is objective-c object type, e.g. `SWGPet',
|
||||
// return type of p with pointer, e.g. `SWGPet*'
|
||||
else {
|
||||
return swaggerType + "*";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toModelName(String type) {
|
||||
// model name cannot use reserved keyword
|
||||
@ -583,6 +674,12 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
return objs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property){
|
||||
super.postProcessModelProperty(model,property);
|
||||
property.vendorExtensions.put("x-uppercaseName", camelize(property.name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the default value of the property
|
||||
*
|
||||
|
@ -167,6 +167,15 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
.replaceAll(regLastPathSeparator+ "$", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeText(String input) {
|
||||
if (input != null) {
|
||||
// Trim the string to avoid leading and trailing spaces.
|
||||
return super.escapeText(input).trim();
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodegenType getTag() {
|
||||
return CodegenType.CLIENT;
|
||||
@ -264,7 +273,8 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));
|
||||
supportingFiles.add(new SupportingFile(".travis.yml", getPackagePath(), ".travis.yml"));
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", getPackagePath(), "git_push.sh"));
|
||||
|
||||
// apache v2 license
|
||||
supportingFiles.add(new SupportingFile("LICENSE", getPackagePath(), "LICENSE"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -15,7 +15,6 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -149,6 +148,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
apiPackage = swaggerFolder + File.separatorChar + "apis";
|
||||
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
|
||||
|
||||
supportingFiles.add(new SupportingFile("setup.mustache", "", "setup.py"));
|
||||
supportingFiles.add(new SupportingFile("tox.mustache", "", "tox.ini"));
|
||||
supportingFiles.add(new SupportingFile("test-requirements.mustache", "", "test-requirements.txt"));
|
||||
|
@ -225,6 +225,9 @@ public class RubyClientCodegen 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"));
|
||||
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
|
||||
|
||||
// test files should not be overwritten
|
||||
writeOptional(outputFolder, new SupportingFile("rspec.mustache", "", ".rspec"));
|
||||
writeOptional(outputFolder, new SupportingFile("spec_helper.mustache", specFolder, "spec_helper.rb"));
|
||||
writeOptional(outputFolder, new SupportingFile("configuration_spec.mustache", specFolder, "configuration_spec.rb"));
|
||||
|
@ -42,7 +42,6 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen
|
||||
supportingFiles.add(new SupportingFile("api.mustache", null, "api.ts"));
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
|
||||
LOGGER.warn("check additionals: " + additionalProperties.get(NPM_NAME));
|
||||
if(additionalProperties.containsKey(NPM_NAME)) {
|
||||
addNpmPackageGeneration();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public interface {{classname}} extends ApiClient.Api {
|
||||
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
||||
@Headers({
|
||||
"Content-type: {{vendorExtensions.x-contentType}}",
|
||||
"Accepts: {{vendorExtensions.x-accepts}}",{{#headerParams}}
|
||||
"Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}}
|
||||
"{{paramName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}},
|
||||
{{/hasMore}}{{/headerParams}}
|
||||
})
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "{{{projectName}}}",
|
||||
"version": "{{{projectVersion}}}",
|
||||
"description": "{{{projectDescription}}}",{{#projectLicenseName}}
|
||||
"license": "{{{projectLicenseName}}}",{{/projectLicenseName}}
|
||||
"description": "{{{projectDescription}}}",
|
||||
"license": "Apache-2.0",
|
||||
"main": "{{sourceFolder}}{{#invokerPackage}}/{{invokerPackage}}{{/invokerPackage}}/index.js",
|
||||
"scripts": {
|
||||
"test": "./node_modules/mocha/bin/mocha --recursive"
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "{{#npmName}}{{{npmName}}}{{/npmName}}{{^npmName}}typescript-fetch-api{{/npmName}}",
|
||||
"version": "{{#npmVersion}}{{{npmVersion}}}{{/npmVersion}}{{^npmVersion}}0.0.0{{/npmVersion}}",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/api.js",
|
||||
"browser": "./dist/api.js",
|
||||
"typings": "./dist/api.d.ts",
|
||||
|
201
modules/swagger-codegen/src/main/resources/_common/LICENSE
Normal file
201
modules/swagger-codegen/src/main/resources/_common/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
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,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
|
||||
namespace {{packageName}}.Client
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,3 +1,5 @@
|
||||
{{>partial_header}}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
201
modules/swagger-codegen/src/main/resources/csharp/LICENSE
Normal file
201
modules/swagger-codegen/src/main/resources/csharp/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
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,4 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
{{#appName}}
|
||||
{{{appName}}}
|
||||
|
||||
{{/appName}}
|
||||
{{#appDescription}}
|
||||
{{{appDescription}}}
|
||||
|
||||
{{/appDescription}}
|
||||
{{#version}}OpenAPI spec version: {{version}}{{/version}}
|
||||
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
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.
|
||||
-->
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -1,4 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
{{#appName}}
|
||||
{{{appName}}}
|
||||
|
||||
{{/appName}}
|
||||
{{#appDescription}}
|
||||
{{{appDescription}}}
|
||||
|
||||
{{/appDescription}}
|
||||
{{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
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.
|
||||
-->
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
@ -1,3 +1,5 @@
|
||||
{{>partial_header}}
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
{{#appName}}
|
||||
* {{{appName}}}
|
||||
*
|
||||
{{/appName}}
|
||||
{{#appDescription}}
|
||||
* {{{appDescription}}}
|
||||
*
|
||||
{{/appDescription}}
|
||||
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* 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.
|
||||
*/
|
201
modules/swagger-codegen/src/main/resources/go/LICENSE
Normal file
201
modules/swagger-codegen/src/main/resources/go/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
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,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
package {{packageName}}
|
||||
|
||||
{{#operations}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
package {{packageName}}
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
package {{packageName}}
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
package {{packageName}}
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{>partial_header}}
|
||||
package {{packageName}}
|
||||
{{#models}}{{#imports}}
|
||||
import ({{/imports}}{{#imports}}
|
||||
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
{{#appName}}
|
||||
* {{{appName}}}
|
||||
*
|
||||
{{/appName}}
|
||||
{{#appDescription}}
|
||||
* {{{appDescription}}}
|
||||
*
|
||||
{{/appDescription}}
|
||||
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* 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.
|
||||
*/
|
@ -6,7 +6,7 @@
|
||||
"keywords": [
|
||||
"swagger"
|
||||
],
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"connect": "^3.2.0",
|
||||
|
@ -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,13 +1,5 @@
|
||||
#import "{{classPrefix}}JSONResponseSerializer.h"
|
||||
|
||||
static BOOL JSONParseError(NSError *error) {
|
||||
if ([error.domain isEqualToString:NSCocoaErrorDomain] && error.code == 3840) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@implementation {{classPrefix}}JSONResponseSerializer
|
||||
|
||||
///
|
||||
@ -17,7 +9,7 @@ static BOOL JSONParseError(NSError *error) {
|
||||
///
|
||||
/// @param response The response to be processed.
|
||||
/// @param data The response data to be decoded.
|
||||
/// @param error The error that occurred while attempting to decode the respnse data.
|
||||
/// @param error The error that occurred while attempting to decode the response data.
|
||||
///
|
||||
/// @return The object decoded from the specified response data.
|
||||
///
|
||||
@ -27,7 +19,7 @@ static BOOL JSONParseError(NSError *error) {
|
||||
NSDictionary *responseJson = [super responseObjectForResponse:response data:data error:error];
|
||||
|
||||
// if response data is not a valid json, return string of data.
|
||||
if (JSONParseError(*error)) {
|
||||
if ([self isParseError:*error]) {
|
||||
*error = nil;
|
||||
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
return responseString;
|
||||
@ -36,4 +28,12 @@ static BOOL JSONParseError(NSError *error) {
|
||||
return responseJson;
|
||||
}
|
||||
|
||||
-(BOOL)isParseError:(NSError *)error {
|
||||
return [error.domain isEqualToString:NSCocoaErrorDomain] && error.code == 3840;
|
||||
}
|
||||
|
||||
+ (instancetype)serializer {
|
||||
return [self serializerWithReadingOptions:NSJSONReadingAllowFragments];
|
||||
}
|
||||
|
||||
@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];
|
||||
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Xcode 7.0">
|
||||
|
||||
{{#models}}{{#model}}<entity name="{{{classname}}}ManagedObject" representedClassName="{{{classname}}}ManagedObject" syncable="YES">
|
||||
{{#vars}}{{#complexType}} <relationship name="{{name}}" {{^required}}optional="YES"{{/required}} {{#isListContainer}}toMany="YES"{{/isListContainer}}{{^isListContainer}}maxCount="1"{{/isListContainer}} deletionRule="Cascade" destinationEntity="{{{complexType}}}ManagedObject" syncable="YES"/>{{/complexType}}{{^complexType}} <attribute name="{{name}}" {{^required}}optional="YES"{{/required}} attributeType="{{#isString}}String{{/isString}}{{#isInteger}}Integer 16{{/isInteger}}{{#isLong}}Double{{/isLong}}{{#isDouble}}Double{{/isDouble}}{{#isFloat}}Float{{/isFloat}}{{#isByteArray}}Binary{{/isByteArray}}{{#isBinary}}Binary{{/isBinary}}{{#isListContainer}}Transformable{{/isListContainer}}{{#isMapContainer}}Transformable{{/isMapContainer}}{{#isBoolean}}Boolean{{/isBoolean}}{{#isDate}}Date{{/isDate}}{{#isDateTime}}Date{{/isDateTime}}" syncable="YES"/>{{/complexType}}
|
||||
{{/vars}}
|
||||
</entity>
|
||||
{{/model}}{{/models}}
|
||||
</model>
|
@ -0,0 +1,18 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
#import "{{classname}}ManagedObject.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.
|
||||
*/
|
||||
@implementation {{classname}}ManagedObject
|
||||
|
||||
{{#vars}}
|
||||
@dynamic {{name}};
|
||||
{{/vars}}
|
||||
|
||||
{{/model}}
|
||||
@end
|
||||
{{/models}}
|
@ -0,0 +1,39 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.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.
|
||||
*/
|
||||
|
||||
{{#imports}}#import "{{import}}ManagedObject.h"
|
||||
{{/imports}}
|
||||
{{newline}}
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface {{classname}}ManagedObject : {{#parent}}{{{parent}}}{{/parent}}{{^parent}}NSManagedObject{{/parent}}
|
||||
|
||||
{{#vars}}
|
||||
{{#description}}/* {{{description}}} {{^required}}[optional]{{/required}}
|
||||
*/{{/description}}
|
||||
@property (nullable, nonatomic, retain) {{^complexType}}{{{ datatype }}}{{/complexType}}{{#complexType}}{{#isListContainer}}NSSet<{{{complexType}}}ManagedObject*>*{{/isListContainer}}{{^isListContainer}}{{{complexType}}}ManagedObject*{{/isListContainer}}{{/complexType}} {{name}};
|
||||
{{/vars}}
|
||||
|
||||
@end
|
||||
|
||||
@interface {{classname}}ManagedObject (GeneratedAccessors)
|
||||
|
||||
{{#vars}}{{#isListContainer}}{{#complexType}}- (void)add{{vendorExtensions.x-uppercaseName}}Object:({{complexType}}ManagedObject *)value;
|
||||
- (void)remove{{vendorExtensions.x-uppercaseName}}Object:({{complexType}}ManagedObject *)value;
|
||||
- (void)add{{vendorExtensions.x-uppercaseName}}:(NSSet<{{{complexType}}}ManagedObject*> *)values;
|
||||
- (void)remove{{vendorExtensions.x-uppercaseName}}:(NSSet<{{{complexType}}}ManagedObject*> *)values;
|
||||
{{/complexType}}{{/isListContainer}}{{/vars}}
|
||||
@end
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,76 @@
|
||||
|
||||
{{#models}}{{#model}}
|
||||
#import "{{classname}}ManagedObjectBuilder.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.
|
||||
*/
|
||||
|
||||
@implementation {{classname}}ManagedObjectBuilder
|
||||
|
||||
-(instancetype)init {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
{{#vars}}{{#complexType}} _{{name}}Builder = [[{{complexType}}ManagedObjectBuilder alloc] init];
|
||||
{{/complexType}}{{/vars}} }
|
||||
return self;
|
||||
}
|
||||
|
||||
-({{classname}}ManagedObject*)createNew{{classname}}ManagedObjectInContext:(NSManagedObjectContext*)context {
|
||||
{{classname}}ManagedObject *managedObject = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([{{classname}}ManagedObject class]) inManagedObjectContext:context];
|
||||
return managedObject;
|
||||
}
|
||||
|
||||
-({{classname}}ManagedObject*){{classname}}ManagedObjectFrom{{classname}}:({{classname}}*){{name}} context:(NSManagedObjectContext*)context {
|
||||
{{classname}}ManagedObject* new{{classname}} = [self createNew{{{classname}}}ManagedObjectInContext:context];
|
||||
[self update{{classname}}ManagedObject:new{{classname}} with{{classname}}:{{name}}];
|
||||
return new{{classname}};
|
||||
}
|
||||
|
||||
-(void)update{{classname}}ManagedObject:({{classname}}ManagedObject*)managedObject with{{classname}}:({{classname}}*)object {
|
||||
if(!managedObject || !object) {
|
||||
return;
|
||||
}
|
||||
{{#vars}}{{^complexType}} managedObject.{{name}} = [object.{{name}} copy];{{/complexType}}{{#complexType}}{{#isListContainer}} if(object.{{name}}) {
|
||||
NSMutableSet * convertedObjs = [NSMutableSet set];
|
||||
for (id innerObject in object.{{name}}) {
|
||||
id convertedObj = [self.{{name}}Builder {{complexType}}ManagedObjectFrom{{complexType}}:innerObject context:managedObject.managedObjectContext];
|
||||
[convertedObjs addObject:convertedObj];
|
||||
}
|
||||
managedObject.{{name}} = convertedObjs;
|
||||
}{{/isListContainer}}{{^isListContainer}}
|
||||
if(!managedObject.{{name}}) {
|
||||
managedObject.{{name}} = [self.{{name}}Builder {{complexType}}ManagedObjectFrom{{complexType}}:object.{{name}} context:managedObject.managedObjectContext];
|
||||
} else {
|
||||
[self.{{name}}Builder update{{complexType}}ManagedObject:managedObject.{{name}} with{{complexType}}:object.{{name}}];
|
||||
}{{/isListContainer}}{{/complexType}}
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
-({{classname}}*){{classname}}From{{classname}}ManagedObject:({{classname}}ManagedObject*)obj {
|
||||
if(!obj) {
|
||||
return nil;
|
||||
}
|
||||
{{classname}}* new{{classname}} = [[{{classname}} alloc] init];
|
||||
[self update{{classname}}:new{{classname}} with{{classname}}ManagedObject:obj];
|
||||
return new{{classname}};
|
||||
}
|
||||
|
||||
-(void)update{{classname}}:({{classname}}*)new{{classname}} with{{classname}}ManagedObject:({{classname}}ManagedObject*)obj {
|
||||
{{#vars}}{{^complexType}} new{{classname}}.{{name}} = [obj.{{name}} copy];{{/complexType}}{{#complexType}}{{#isListContainer}} if(obj.{{name}} != nil) {
|
||||
NSMutableArray* convertedObjs = [NSMutableArray array];
|
||||
for (id innerObject in obj.{{name}}) {
|
||||
id convertedObj = [self.{{name}}Builder {{complexType}}From{{complexType}}ManagedObject:innerObject];
|
||||
[convertedObjs addObject:convertedObj];
|
||||
}
|
||||
new{{classname}}.{{name}} = ({{{ datatype }}})convertedObjs;
|
||||
}
|
||||
{{/isListContainer}}{{^isListContainer}} new{{classname}}.{{name}} = [self.{{name}}Builder {{complexType}}From{{complexType}}ManagedObject:obj.{{name}}];{{/isListContainer}}{{/complexType}}
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
@end
|
||||
{{/model}}
|
||||
{{/models}}
|
@ -0,0 +1,35 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
{{#imports}}#import "{{import}}ManagedObjectBuilder.h"
|
||||
{{/imports}}
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
|
||||
#import "{{classPrefix}}{{name}}ManagedObject.h"
|
||||
#import "{{classPrefix}}{{name}}.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.
|
||||
*/
|
||||
|
||||
@interface {{classname}}ManagedObjectBuilder : NSObject
|
||||
|
||||
{{#vars}}{{#complexType}}@property (nonatomic, strong) {{complexType}}ManagedObjectBuilder * {{name}}Builder;
|
||||
{{/complexType}}{{/vars}}
|
||||
|
||||
-({{classname}}ManagedObject*)createNew{{classname}}ManagedObjectInContext:(NSManagedObjectContext*)context;
|
||||
|
||||
-({{classname}}ManagedObject*){{classname}}ManagedObjectFrom{{classname}}:({{classname}}*){{name}} context:(NSManagedObjectContext*)context;
|
||||
|
||||
-(void)update{{classname}}ManagedObject:({{classname}}ManagedObject*){{name}} with{{classname}}:({{classname}}*){{name}}2;
|
||||
|
||||
-({{classname}}*){{classname}}From{{classname}}ManagedObject:({{classname}}ManagedObject*)obj;
|
||||
|
||||
-(void)update{{classname}}:({{classname}}*){{name}} with{{classname}}ManagedObject:({{classname}}ManagedObject*){{name}}2;
|
||||
|
||||
@end
|
||||
{{/model}}
|
||||
{{/models}}
|
@ -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);
|
||||
|
||||
|
@ -113,7 +113,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513;
|
||||
{{#queryParams}}
|
||||
if ({{paramName}} != nil) {
|
||||
{{#collectionFormat}}
|
||||
queryParams[@"{{baseName}}"] = [[{{classPrefix}}QueryParamCollection alloc] initWithValuesAndFormat: {{baseName}} format: @"{{collectionFormat}}"];
|
||||
queryParams[@"{{baseName}}"] = [[{{classPrefix}}QueryParamCollection alloc] initWithValuesAndFormat: {{paramName}} format: @"{{collectionFormat}}"];
|
||||
{{/collectionFormat}}
|
||||
{{^collectionFormat}}queryParams[@"{{baseName}}"] = {{paramName}};{{/collectionFormat}}
|
||||
}
|
||||
|
@ -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.
|
||||
*/
|
@ -16,25 +16,18 @@
|
||||
|
||||
{{#discriminator}}
|
||||
/**
|
||||
Maps "discriminator" value to the sub-class name, so that inheritance is supported.
|
||||
* Maps "discriminator" value to the sub-class name, so that inheritance is supported.
|
||||
*/
|
||||
- (id)initWithDictionary:(NSDictionary *)dict error:(NSError *__autoreleasing *)err {
|
||||
|
||||
NSString * discriminatedClassName = [dict valueForKey:@"{{discriminator}}"];
|
||||
|
||||
if(discriminatedClassName == nil ){
|
||||
return [super initWithDictionary:dict error:err];
|
||||
}
|
||||
|
||||
Class class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:discriminatedClassName]);
|
||||
|
||||
if([self class ] == class) {
|
||||
return [super initWithDictionary:dict error:err];
|
||||
}
|
||||
|
||||
|
||||
return [[class alloc] initWithDictionary:dict error: err];
|
||||
|
||||
}
|
||||
{{/discriminator}}
|
||||
|
||||
@ -55,7 +48,6 @@
|
||||
|
||||
NSArray *optionalProperties = @[{{#vars}}{{^required}}@"{{name}}"{{#hasMore}}, {{/hasMore}}{{/required}}{{/vars}}];
|
||||
return [optionalProperties containsObject:propertyName];
|
||||
|
||||
}
|
||||
|
||||
{{/model}}
|
||||
|
@ -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}}
|
||||
|
@ -19,15 +19,16 @@ Pod::Spec.new do |s|
|
||||
s.platform = :ios, '7.0'
|
||||
s.requires_arc = true
|
||||
|
||||
s.framework = 'SystemConfiguration'
|
||||
{{^useCoreData}}s.framework = 'SystemConfiguration'{{/useCoreData}}{{#useCoreData}}s.frameworks = 'SystemConfiguration', 'CoreData'{{/useCoreData}}
|
||||
|
||||
s.homepage = "{{gitRepoURL}}"
|
||||
s.license = "{{license}}"
|
||||
s.license = "{{#license}}{{license}}{{/license}}{{^license}}Apache License, Version 2.0{{/license}}"
|
||||
s.source = { :git => "{{gitRepoURL}}.git", :tag => "#{s.version}" }
|
||||
s.author = { "{{authorName}}" => "{{authorEmail}}" }
|
||||
|
||||
s.source_files = '{{podName}}/**/*'
|
||||
s.source_files = '{{podName}}/**/*.{m,h}'
|
||||
s.public_header_files = '{{podName}}/**/*.h'
|
||||
{{#useCoreData}} s.resources = '{{podName}}/**/*.{xcdatamodeld,xcdatamodel}'{{/useCoreData}}
|
||||
|
||||
s.dependency 'AFNetworking', '~> 3'
|
||||
s.dependency 'JSONModel', '~> 1.2'
|
||||
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>_XCCurrentVersionName</key>
|
||||
<string>{{classPrefix}}Model.xcdatamodel</string>
|
||||
</dict>
|
||||
</plist>
|
@ -10,21 +10,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
@ -211,7 +198,7 @@ class ApiClient
|
||||
|
||||
// debugging for curl
|
||||
if ($this->config->getDebug()) {
|
||||
error_log("[DEBUG] HTTP Request body ~BEGIN~\n".print_r($postData, true)."\n~END~\n", 3, $this->config->getDebugFile());
|
||||
error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($postData, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile());
|
||||
|
||||
curl_setopt($curl, CURLOPT_VERBOSE, 1);
|
||||
curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a'));
|
||||
@ -231,7 +218,7 @@ class ApiClient
|
||||
|
||||
// debug HTTP response body
|
||||
if ($this->config->getDebug()) {
|
||||
error_log("[DEBUG] HTTP Response body ~BEGIN~\n".print_r($http_body, true)."\n~END~\n", 3, $this->config->getDebugFile());
|
||||
error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile());
|
||||
}
|
||||
|
||||
// Handle the response
|
||||
|
@ -9,21 +9,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
|
201
modules/swagger-codegen/src/main/resources/php/LICENSE
Normal file
201
modules/swagger-codegen/src/main/resources/php/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
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.
|
@ -10,21 +10,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
@ -271,7 +258,7 @@ class ObjectSerializer
|
||||
$byte_written = $deserialized->fwrite($data);
|
||||
|
||||
if (Configuration::getDefaultConfiguration()->getDebug()) {
|
||||
error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
|
||||
error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, Configuration::getDefaultConfiguration()->getDebugFile());
|
||||
}
|
||||
|
||||
return $deserialized;
|
||||
|
@ -82,7 +82,7 @@ try {
|
||||
{{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
print_r($result);{{/returnType}}
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), "\n";
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||
?>
|
||||
|
@ -9,22 +9,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
{{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
print_r($result);{{/returnType}}
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), "\n";
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
@ -9,22 +9,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* An example of a project-specific implementation.
|
||||
*
|
||||
|
@ -10,22 +10,7 @@
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
@ -513,12 +498,12 @@ class Configuration
|
||||
*/
|
||||
public static function toDebugReport()
|
||||
{
|
||||
$report = "PHP SDK ({{invokerPackage}}) Debug Report:\n";
|
||||
$report .= " OS: ".php_uname()."\n";
|
||||
$report .= " PHP Version: ".phpversion()."\n";
|
||||
$report .= " OpenAPI Spec Version: {{version}}\n";
|
||||
$report .= " SDK Package Version: {{artifactVersion}}\n";
|
||||
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
|
||||
$report = "PHP SDK ({{invokerPackage}}) Debug Report:".PHP_EOL;
|
||||
$report .= " OS: ".php_uname().PHP_EOL;
|
||||
$report .= " PHP Version: ".phpversion().PHP_EOL;
|
||||
$report .= " OpenAPI Spec Version: {{version}}".PHP_EOL;
|
||||
$report .= " SDK Package Version: {{artifactVersion}}".PHP_EOL;
|
||||
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL;
|
||||
|
||||
return $report;
|
||||
}
|
||||
|
@ -12,21 +12,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
|
@ -12,21 +12,8 @@
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
{{>partial_header}}
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
|
@ -0,0 +1,25 @@
|
||||
/**
|
||||
{{#appName}}
|
||||
* {{{appName}}}
|
||||
*
|
||||
{{/appName}}
|
||||
{{#appDescription}}
|
||||
* {{{appDescription}}}
|
||||
*
|
||||
{{/appDescription}}
|
||||
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* 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.
|
||||
*/
|
201
modules/swagger-codegen/src/main/resources/python/LICENSE
Normal file
201
modules/swagger-codegen/src/main/resources/python/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
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,3 +1,7 @@
|
||||
# coding: utf-8
|
||||
|
||||
{{>partial_header}}
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import models into model package
|
||||
|
@ -1,3 +1,7 @@
|
||||
# coding: utf-8
|
||||
|
||||
{{>partial_header}}
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import models into sdk package
|
||||
|
@ -1,21 +1,6 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
{{classname}}.py
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
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.
|
||||
"""
|
||||
{{>partial_header}}
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
@ -1,22 +1,6 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
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.
|
||||
|
||||
ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
{{>partial_header}}
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
@ -1,22 +1,6 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
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.
|
||||
|
||||
ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
{{>partial_header}}
|
||||
|
||||
from __future__ import absolute_import
|
||||
import base64
|
||||
|
@ -1,22 +1,6 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
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.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
{{>partial_header}}
|
||||
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
|
@ -1,22 +1,6 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
|
||||
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.
|
||||
|
||||
ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
{{>partial_header}}
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
"""
|
||||
{{#appName}}
|
||||
{{{appName}}}
|
||||
{{/appName}}
|
||||
|
||||
{{#appDescription}}
|
||||
{{{appDescription}}}
|
||||
{{/appDescription}}
|
||||
|
||||
{{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
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,23 +1,7 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Copyright 2016 SmartBear Software
|
||||
{{>partial_header}}
|
||||
|
||||
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.
|
||||
|
||||
Credit: this file (rest.py) is modified based on rest.py in Dropbox Python SDK:
|
||||
https://www.dropbox.com/developers/core/sdks/python
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding: utf-8
|
||||
|
||||
{{>partial_header}}
|
||||
|
||||
import sys
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
=begin
|
||||
{{> info}}
|
||||
=end
|
||||
class {{classname}} < ApplicationController
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
|
@ -0,0 +1,23 @@
|
||||
{{#appName}}
|
||||
{{{appName}}}
|
||||
|
||||
{{/appName}}
|
||||
{{#appDescription}}
|
||||
{{{appDescription}}}
|
||||
|
||||
{{/appDescription}}
|
||||
{{#version}}OpenAPI spec version: {{version}}{{/version}}
|
||||
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
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.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user