forked from loafle/openapi-generator-original
better handling of multiline comments for all lang
This commit is contained in:
@@ -665,7 +665,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,4 +311,15 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
|||||||
public Boolean getSupportsES6() {
|
public Boolean getSupportsES6() {
|
||||||
return supportsES6;
|
return supportsES6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove ', " to avoid code injection
|
||||||
|
return input.replace("\"", "").replace("'", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -414,4 +414,14 @@ public class AkkaScalaClientCodegen extends DefaultCodegen implements CodegenCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -504,4 +504,15 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
this.sourceFolder = sourceFolder;
|
this.sourceFolder = sourceFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,4 +212,16 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
protected String namespaceToFolder(String ns) {
|
protected String namespaceToFolder(String ns) {
|
||||||
return ns.replace(".", File.separator).replace("-", "_");
|
return ns.replace(".", File.separator).replace("-", "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
// ref: https://clojurebridge.github.io/community-docs/docs/clojure/comment/
|
||||||
|
return input.replace("(comment", "(_comment");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,4 +377,16 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
public String toApiName(String type) {
|
public String toApiName(String type) {
|
||||||
return Character.toUpperCase(type.charAt(0)) + type.substring(1) + "Api";
|
return Character.toUpperCase(type.charAt(0)) + type.substring(1) + "Api";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -274,4 +274,15 @@ public class CsharpDotNet2ClientCodegen extends DefaultCodegen implements Codege
|
|||||||
return camelize(operationId);
|
return camelize(operationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,4 +289,16 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
public void setSourceFolder(String sourceFolder) {
|
public void setSourceFolder(String sourceFolder) {
|
||||||
this.sourceFolder = sourceFolder;
|
this.sourceFolder = sourceFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,4 +373,15 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
public void setSourceFolder(String sourceFolder) {
|
public void setSourceFolder(String sourceFolder) {
|
||||||
this.sourceFolder = sourceFolder;
|
this.sourceFolder = sourceFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -452,4 +452,15 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
public void setPackageVersion(String packageVersion) {
|
public void setPackageVersion(String packageVersion) {
|
||||||
this.packageVersion = packageVersion;
|
this.packageVersion = packageVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,4 +263,16 @@ public class GoServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// e.g. PetApi.go => pet_api.go
|
// e.g. PetApi.go => pet_api.go
|
||||||
return underscore(name);
|
return underscore(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,4 +83,14 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
|
|||||||
this.configPackage = configPackage;
|
this.configPackage = configPackage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove ' to avoid code injection
|
||||||
|
return input.replace("'", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -491,4 +491,16 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
p.dataType = fixModelChars(p.dataType);
|
p.dataType = fixModelChars(p.dataType);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("{-", "{_-").replace("-}", "-_}");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,4 +183,16 @@ public class JMeterCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
type = swaggerType;
|
type = swaggerType;
|
||||||
return toModelName(type);
|
return toModelName(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove ' to avoid code injection
|
||||||
|
return input.replace("'", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1041,7 +1041,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ public class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ public class LumenServerCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -723,5 +723,15 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
p.example = example;
|
p.example = example;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -413,6 +413,6 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
// remove =end, =cut to avoid code injection
|
// remove =end, =cut to avoid code injection
|
||||||
return input.replace("=end", "").replace("=cut", "");
|
return input.replace("=begin", "=_begin").replace("=end", "=_end").replace("=cut", "=_cut").replace("=pod", "=_pod");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -658,6 +658,8 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
|
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
|
||||||
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
|
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
|
||||||
for (CodegenOperation op : operationList) {
|
for (CodegenOperation op : operationList) {
|
||||||
|
// for API test method name
|
||||||
|
// e.g. public function test{{vendorExtensions.x-testOperationId}}()
|
||||||
op.vendorExtensions.put("x-testOperationId", camelize(op.operationId));
|
op.vendorExtensions.put("x-testOperationId", camelize(op.operationId));
|
||||||
}
|
}
|
||||||
return objs;
|
return objs;
|
||||||
@@ -671,7 +673,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -599,7 +599,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
// remove multiline comment
|
// remove multiline comment
|
||||||
return input.replace("'''", "");
|
return input.replace("'''", "'_'_'");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,4 +333,15 @@ public class Qt5CPPGenerator extends DefaultCodegen implements CodegenConfig {
|
|||||||
public String toApiName(String type) {
|
public String toApiName(String type) {
|
||||||
return PREFIX + Character.toUpperCase(type.charAt(0)) + type.substring(1) + "Api";
|
return PREFIX + Character.toUpperCase(type.charAt(0)) + type.substring(1) + "Api";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,4 +317,14 @@ public class Rails5ServerCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
return super.postProcessSupportingFileData(objs);
|
return super.postProcessSupportingFileData(objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove ' to avoid code injection
|
||||||
|
return input.replace("'", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("=end", "=_end").replace("=begin", "=_begin");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -721,6 +721,6 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("=end", "");
|
return input.replace("=end", "=_end").replace("=begin", "=_begin");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,4 +336,15 @@ public class ScalaClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
return toModelName(name);
|
return toModelName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,4 +196,16 @@ public class ScalatraServerCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
}
|
}
|
||||||
return toModelName(type);
|
return toModelName(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,6 @@ public class SilexServerCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeUnsafeCharacters(String input) {
|
public String escapeUnsafeCharacters(String input) {
|
||||||
return input.replace("*/", "");
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,4 +243,14 @@ public class SinatraServerCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
return super.postProcessSupportingFileData(objs);
|
return super.postProcessSupportingFileData(objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove ' to avoid code injection
|
||||||
|
return input.replace("'", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("=end", "=_end").replace("=begin", "=_begin");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -550,4 +550,15 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
return postProcessModelsEnum(objs);
|
return postProcessModelsEnum(objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,4 +281,14 @@ public class TizenClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
return camelize(operationId, true);
|
return camelize(operationId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// remove " to avoid code injection
|
||||||
|
return input.replace("\"", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "*_/").replace("/*", "/_*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# SwaggerClient-php
|
# SwaggerClient-php
|
||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
|
|
||||||
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||||
|
|
||||||
- API version: 1.0.0 ' \" =end
|
- API version: 1.0.0 *_/ ' \" =end
|
||||||
- Build date: 2016-06-30T07:09:53.488+02:00
|
- Build date: 2016-07-02T16:22:07.280+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@@ -58,7 +58,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
|
|||||||
require_once(__DIR__ . '/vendor/autoload.php');
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
|
|
||||||
$api_instance = new Swagger\Client\Api\FakeApi();
|
$api_instance = new Swagger\Client\Api\FakeApi();
|
||||||
$test_code_inject____end = "test_code_inject____end_example"; // string | To test code injection ' \" =end
|
$test_code_inject____end = "test_code_inject____end_example"; // string | To test code injection *_/ ' \" =end
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$api_instance->testCodeInjectEnd($test_code_inject____end);
|
$api_instance->testCodeInjectEnd($test_code_inject____end);
|
||||||
@@ -71,11 +71,11 @@ try {
|
|||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
|
All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end/v2 *_/ ' \" =end*
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*FakeApi* | [**testCodeInjectEnd**](docs/Api/FakeApi.md#testcodeinjectend) | **PUT** /fake | To test code injection ' \" =end
|
*FakeApi* | [**testCodeInjectEnd**](docs/Api/FakeApi.md#testcodeinjectend) | **PUT** /fake | To test code injection *_/ ' \" =end
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
@@ -86,6 +86,12 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation For Authorization
|
## Documentation For Authorization
|
||||||
|
|
||||||
|
|
||||||
|
## api_key
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key */ ' " =end
|
||||||
|
- **Location**: HTTP header
|
||||||
|
|
||||||
## petstore_auth
|
## petstore_auth
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
@@ -95,15 +101,9 @@ Class | Method | HTTP request | Description
|
|||||||
- **write:pets**: modify pets in your account */ ' " =end
|
- **write:pets**: modify pets in your account */ ' " =end
|
||||||
- **read:pets**: read your pets */ ' " =end
|
- **read:pets**: read your pets */ ' " =end
|
||||||
|
|
||||||
## api_key
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: api_key */ ' " =end
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
apiteam@swagger.io ' \" =end
|
apiteam@swagger.io *_/ ' \" =end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
# Swagger\Client\FakeApi
|
# Swagger\Client\FakeApi
|
||||||
|
|
||||||
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
|
All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end/v2 *_/ ' \" =end*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**testCodeInjectEnd**](FakeApi.md#testCodeInjectEnd) | **PUT** /fake | To test code injection ' \" =end
|
[**testCodeInjectEnd**](FakeApi.md#testCodeInjectEnd) | **PUT** /fake | To test code injection *_/ ' \" =end
|
||||||
|
|
||||||
|
|
||||||
# **testCodeInjectEnd**
|
# **testCodeInjectEnd**
|
||||||
> testCodeInjectEnd($test_code_inject____end)
|
> testCodeInjectEnd($test_code_inject____end)
|
||||||
|
|
||||||
To test code injection ' \" =end
|
To test code injection *_/ ' \" =end
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```php
|
```php
|
||||||
@@ -18,7 +18,7 @@ To test code injection ' \" =end
|
|||||||
require_once(__DIR__ . '/vendor/autoload.php');
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
|
|
||||||
$api_instance = new Swagger\Client\Api\FakeApi();
|
$api_instance = new Swagger\Client\Api\FakeApi();
|
||||||
$test_code_inject____end = "test_code_inject____end_example"; // string | To test code injection ' \" =end
|
$test_code_inject____end = "test_code_inject____end_example"; // string | To test code injection *_/ ' \" =end
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$api_instance->testCodeInjectEnd($test_code_inject____end);
|
$api_instance->testCodeInjectEnd($test_code_inject____end);
|
||||||
@@ -32,7 +32,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**test_code_inject____end** | **string**| To test code injection ' \" =end | [optional]
|
**test_code_inject____end** | **string**| To test code injection *_/ ' \" =end | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**return** | **int** | property description ' \" =end | [optional]
|
**return** | **int** | property description *_/ ' \" =end | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -73,7 +73,7 @@ class FakeApi
|
|||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io ' \" =end/v2 ' \" =end');
|
$apiClient->getConfig()->setHost('https://petstore.swagger.io *_/ ' \" =end/v2 *_/ ' \" =end');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
@@ -105,9 +105,9 @@ class FakeApi
|
|||||||
/**
|
/**
|
||||||
* Operation testCodeInjectEnd
|
* Operation testCodeInjectEnd
|
||||||
*
|
*
|
||||||
* To test code injection ' \" =end
|
* To test code injection *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* @param string $test_code_inject____end To test code injection ' \" =end (optional)
|
* @param string $test_code_inject____end To test code injection *_/ ' \" =end (optional)
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@@ -120,9 +120,9 @@ class FakeApi
|
|||||||
/**
|
/**
|
||||||
* Operation testCodeInjectEndWithHttpInfo
|
* Operation testCodeInjectEndWithHttpInfo
|
||||||
*
|
*
|
||||||
* To test code injection ' \" =end
|
* To test code injection *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* @param string $test_code_inject____end To test code injection ' \" =end (optional)
|
* @param string $test_code_inject____end To test code injection *_/ ' \" =end (optional)
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -102,7 +102,7 @@ class Configuration
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $host = 'https://petstore.swagger.io ' \" =end/v2 ' \" =end';
|
protected $host = 'https://petstore.swagger.io *_/ ' \" =end/v2 *_/ ' \" =end';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timeout (second) of the HTTP request, by default set to 0, no timeout
|
* Timeout (second) of the HTTP request, by default set to 0, no timeout
|
||||||
@@ -522,7 +522,7 @@ class Configuration
|
|||||||
$report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL;
|
$report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL;
|
||||||
$report .= ' OS: ' . php_uname() . PHP_EOL;
|
$report .= ' OS: ' . php_uname() . PHP_EOL;
|
||||||
$report .= ' PHP Version: ' . phpversion() . PHP_EOL;
|
$report .= ' PHP Version: ' . phpversion() . PHP_EOL;
|
||||||
$report .= ' OpenAPI Spec Version: 1.0.0 ' \" =end' . PHP_EOL;
|
$report .= ' OpenAPI Spec Version: 1.0.0 *_/ ' \" =end' . PHP_EOL;
|
||||||
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
|
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
|
||||||
|
|
||||||
return $report;
|
return $report;
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -47,7 +47,7 @@ use \ArrayAccess;
|
|||||||
* ModelReturn Class Doc Comment
|
* ModelReturn Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class */
|
* @category Class */
|
||||||
// @description Model for testing reserved words ' \" =end
|
// @description Model for testing reserved words *_/ ' \" =end
|
||||||
/**
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
@@ -167,7 +167,7 @@ class ModelReturn implements ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets return
|
* Sets return
|
||||||
* @param int $return property description ' \" =end
|
* @param int $return property description *_/ ' \" =end
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReturn($return)
|
public function setReturn($return)
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore ' \" =end
|
* Swagger Petstore *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
* OpenAPI spec version: 1.0.0 *_/ ' \" =end
|
||||||
* Contact: apiteam@swagger.io ' \" =end
|
* Contact: apiteam@swagger.io *_/ ' \" =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -264,7 +264,7 @@ class ObjectSerializer
|
|||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
|
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
|
||||||
settype($data, $class);
|
settype($data, $class);
|
||||||
return $data;
|
return $data;
|
||||||
} elseif ($class === '\SplFileObject') {
|
} elseif ($class === '\SplFileObject') {
|
||||||
|
|||||||
Reference in New Issue
Block a user