Merge remote-tracking branch 'origin/master' into 4.1.x

This commit is contained in:
wing328
2019-07-02 22:48:09 +08:00
207 changed files with 2213 additions and 910 deletions

View File

@@ -31,6 +31,8 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
### Templates
All the templates ([mustache](https://mustache.github.io/)) can be found in [modules/openapi-generator/src/main/resources](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources).

View File

@@ -100,7 +100,7 @@ OpenAPI Generator Version | Release Date | Notes
5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback)
4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 15.07.2019 | Minor release (breaking changes with fallbacks)
4.0.3 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.3-SNAPSHOT/)| 04.07.2019 | Patch release (minor bug fixes, etc)
<!-- RELEASE_VERSION -->[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc)<!-- /RELEASE_VERSION -->
[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc)
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
@@ -681,7 +681,8 @@ Here is a list of template creators:
* TypeScript (Inversify): @gualtierim
* Server Stubs
* Ada: @stcarrez
* C# ASP.NET5: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* C# ASP.NET 5: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* C# ASP.NET Core 3.0: @A-Joshi
* C# NancyFX: @mstefaniuk
* C++ (Qt5 QHttpEngine): @etherealjoy
* C++ Pistache: @sebymiano

View File

@@ -35,6 +35,8 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
### Templates
All the templates ([mustache](https://mustache.github.io/)) can be found in [modules/openapi-generator/src/main/resources](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources).

View File

@@ -43,4 +43,5 @@ sidebar_label: java-vertx
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd><dl>|null|
|rxInterface|When specified, API interfaces are generated with RX and methods return Single&lt;&gt; and Comparable.| |false|
|rxVersion2|When specified in combination with rxInterface, API interfaces are generated with RxJava2.| |false|
|vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null|

View File

@@ -27,4 +27,5 @@ sidebar_label: kotlin-spring
|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false|
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
|reactive|use coroutines for reactive behavior| |false|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dl>|spring-boot|

View File

@@ -33,6 +33,14 @@
<build>
<finalName>openapi-generator-online</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
@@ -69,11 +77,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>

View File

@@ -27,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
public class HomeController {
@RequestMapping(value = "/")
public String index() {
return "redirect:swagger-ui.html";
return "redirect:index.html";
}
}

View File

@@ -29,7 +29,11 @@ import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Properties;
@Configuration
@@ -37,20 +41,39 @@ import java.io.InputStream;
public class OpenAPIDocumentationConfig {
ApiInfo apiInfo() {
final Properties properties = new Properties();
try (InputStream stream = this.getClass().getResourceAsStream("/version.properties")) {
if (stream != null) {
properties.load(stream);
}
} catch (IOException ex) {
// ignore
}
String version = properties.getProperty("version", "unknown");
return new ApiInfoBuilder()
.title("OpenAPI Generator Online")
.description("This is an online openapi generator server. You can find out more at https://github.com/OpenAPITools/openapi-generator.")
.license("Apache 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
.termsOfServiceUrl("")
.version("3.0.0")
.version(version)
.contact(new Contact("","", ""))
.build();
}
@Bean
public Docket customImplementation(){
String host;
try {
host = new URI(System.getProperty("GENERATOR_HOST", "http://localhost")).getHost();
} catch (URISyntaxException e) {
host = "";
}
return new Docket(DocumentationType.SWAGGER_2)
.host(host)
.select()
.apis(RequestHandlerSelectors.basePackage("org.openapitools.codegen.online.api"))
.build()

View File

@@ -2,3 +2,4 @@ springfox.documentation.swagger.v2.path=/api-docs
server.port=8080
spring.jackson.date-format=org.openapitools.codegen.online.RFC3339DateFormat
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/

View File

@@ -0,0 +1,17 @@
<!doctype html> <!-- Important: must specify -->
<html>
<head>
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 charecters -->
<script src="rapidoc-min.js"></script>
</head>
<body>
<rapi-doc spec-url="api-docs"
theme="dark">
<img
slot="logo"
src="logo.png"
style="margin:0 -0.3em 0 0.8em;"
/>
</rapi-doc>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
version = ${project.version}

View File

@@ -810,7 +810,7 @@ public class DefaultCodegen implements CodegenConfig {
* @return the snake-cased variable name
*/
public String toApiVarName(String name) {
return snakeCase(name);
return lowerCamelCase(name);
}
/**
@@ -1533,13 +1533,13 @@ public class DefaultCodegen implements CodegenConfig {
}
/**
* Return the snake-case of the string
* Return the lowerCamelCase of the string
*
* @param name string to be snake-cased
* @return snake-cased string
* @param name string to be lowerCamelCased
* @return lowerCamelCase string
*/
@SuppressWarnings("static-method")
public String snakeCase(String name) {
public String lowerCamelCase(String name) {
return (name.length() > 0) ? (Character.toLowerCase(name.charAt(0)) + name.substring(1)) : "";
}

View File

@@ -784,6 +784,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
return p.getDefault().toString();
}
return null;
} else if (ModelUtils.isURISchema(p)) {
if (p.getDefault() != null) {
return "URI.create(\"" + escapeText((String) p.getDefault()) + "\")";
}
return null;
} else if (ModelUtils.isStringSchema(p)) {
if (p.getDefault() != null) {
String _default = (String) p.getDefault();

View File

@@ -834,6 +834,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
if (p.getDefault() != null) {
return p.getDefault().toString();
}
} else if (ModelUtils.isURISchema(p)) {
if (p.getDefault() != null) {
return "URI.create('" + p.getDefault() + "')";
}
} else if (ModelUtils.isStringSchema(p)) {
if (p.getDefault() != null) {
return "'" + p.getDefault() + "'";

View File

@@ -128,7 +128,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
if (languageSpecificPrimitives.contains(type))
return (type);
} else
type = getTypeDeclaration(toModelName(snakeCase(schemaType)));
type = getTypeDeclaration(toModelName(lowerCamelCase(schemaType)));
return type;
}

View File

@@ -137,7 +137,7 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig
} else if (typeMapping.containsKey(typeDeclaration)) {
return typeMapping.get(typeDeclaration);
} else {
return getTypeDeclaration(toModelName(snakeCase(typeDeclaration)));
return getTypeDeclaration(toModelName(lowerCamelCase(typeDeclaration)));
}
}
@@ -179,7 +179,7 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig
} else if (typeMapping.containsKey(schemaType)) {
return typeMapping.get(schemaType);
} else {
return getTypeDeclaration(toModelName(snakeCase(schemaType)));
return getTypeDeclaration(toModelName(lowerCamelCase(schemaType)));
}
}

View File

@@ -695,4 +695,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
return mime != null && JSON_VENDOR_MIME_PATTERN.matcher(mime).matches();
}
@Override
public String toApiVarName(String name) {
String apiVarName = super.toApiVarName(name);
if (reservedWords.contains(apiVarName)) {
apiVarName = escapeReservedWord(apiVarName);
}
return apiVarName;
}
}

View File

@@ -44,6 +44,7 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen {
public static final String ROOT_PACKAGE = "rootPackage";
public static final String RX_INTERFACE_OPTION = "rxInterface";
public static final String RX_VERSION_2_OPTION = "rxVersion2";
public static final String VERTX_SWAGGER_ROUTER_VERSION_OPTION = "vertxSwaggerRouterVersion";
/**
@@ -88,6 +89,9 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen {
cliOptions.add(CliOption.newBoolean(RX_INTERFACE_OPTION,
"When specified, API interfaces are generated with RX "
+ "and methods return Single<> and Comparable."));
cliOptions.add(CliOption.newBoolean(RX_VERSION_2_OPTION,
"When specified in combination with rxInterface, "
+ "API interfaces are generated with RxJava2."));
cliOptions.add(CliOption.newString(VERTX_SWAGGER_ROUTER_VERSION_OPTION,
"Specify the version of the swagger router library"));

View File

@@ -61,7 +61,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
public static final String SERVICE_INTERFACE = "serviceInterface";
public static final String SERVICE_IMPLEMENTATION = "serviceImplementation";
public static final String REACTIVE = "reactive";
public static final String INTERFACE_ONLY = "interfaceOnly";
private String basePackage;
private String invokerPackage;
@@ -75,12 +75,11 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
private boolean serviceInterface = false;
private boolean serviceImplementation = false;
private boolean reactive = false;
private boolean interfaceOnly = false;
public KotlinSpringServerCodegen() {
super();
apiTestTemplateFiles.put("api_test.mustache", ".kt");
reservedWords.addAll(VARIABLE_RESERVED_WORDS);
outputFolder = "generated-code/kotlin-spring";
@@ -124,6 +123,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
"interfaces. If this is set to true service interfaces will also be generated", serviceImplementation);
addSwitch(USE_BEANVALIDATION, "Use BeanValidation API annotations to validate data types", useBeanValidation);
addSwitch(REACTIVE, "use coroutines for reactive behavior", reactive);
addSwitch(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.", interfaceOnly);
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
setLibrary(SPRING_BOOT);
@@ -209,6 +209,10 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
return this.useBeanValidation;
}
public void setInterfaceOnly(boolean interfaceOnly) {
this.interfaceOnly = interfaceOnly;
}
@Override
public void setUseBeanValidation(boolean useBeanValidation) {
this.useBeanValidation = useBeanValidation;
@@ -322,9 +326,18 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
writePropertyBack(REACTIVE, reactive);
writePropertyBack(EXCEPTION_HANDLER, exceptionHandler);
if (additionalProperties.containsKey(INTERFACE_ONLY)) {
this.setInterfaceOnly(Boolean.valueOf(additionalProperties.get(INTERFACE_ONLY).toString()));
}
modelTemplateFiles.put("model.mustache", ".kt");
apiTemplateFiles.put("api.mustache", ".kt");
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
if (interfaceOnly) {
apiTemplateFiles.put("apiInterface.mustache", ".kt");
} else {
apiTemplateFiles.put("api.mustache", ".kt");
apiTestTemplateFiles.put("api_test.mustache", ".kt");
}
if (this.serviceInterface) {
apiTemplateFiles.put("service.mustache", "Service.kt");
@@ -335,6 +348,9 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
apiTemplateFiles.put("serviceImpl.mustache", "ServiceImpl.kt");
}
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
if (this.exceptionHandler) {
supportingFiles.add(new SupportingFile("exceptions.mustache",
sanitizeDirectory(sourceFolder + File.separator + apiPackage), "Exceptions.kt"));

View File

@@ -200,7 +200,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
if (alias != null && !alias.isEmpty()) {
this.bundleAlias = alias.toLowerCase(Locale.ROOT);
} else {
this.bundleAlias = snakeCase(bundleName).replaceAll("([A-Z]+)", "\\_$1").toLowerCase(Locale.ROOT);
this.bundleAlias = lowerCamelCase(bundleName).replaceAll("([A-Z]+)", "\\_$1").toLowerCase(Locale.ROOT);
}
}

View File

@@ -88,8 +88,9 @@ public class ApiClient {
public ApiClient() {
init();
// Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasic}}{{#isApiKey}}
// Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}}
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}}
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
// Prevent the authentications from being modified.

View File

@@ -4,8 +4,8 @@ package {{package}};
{{/imports}}
{{#rxInterface}}
import rx.Completable;
import rx.Single;
import {{#rxVersion2}}io.reactivex{{/rxVersion2}}{{^rxVersion2}}rx{{/rxVersion2}}.Completable;
import {{#rxVersion2}}io.reactivex{{/rxVersion2}}{{^rxVersion2}}rx{{/rxVersion2}}.Single;
{{/rxInterface}}
{{^rxInterface}}
import io.vertx.core.AsyncResult;

View File

@@ -30,7 +30,7 @@ Then install it via:
npm install {{{projectName}}} --save
```
Finaly, you need to build the module:
Finally, you need to build the module:
```shell
npm run build
@@ -56,7 +56,7 @@ To use the link you just defined in your project, switch to the directory you wa
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finaly, you need to build the module:
Finally, you need to build the module:
```shell
npm run build

View File

@@ -14,7 +14,7 @@ using namespace {{modelNamespace}};{{/hasModelImport}}
{{classname}}::{{classname}}(std::shared_ptr<Pistache::Rest::Router> rtr) {
router = rtr;
};
}
void {{classname}}::init() {
setupRoutes();
@@ -32,7 +32,7 @@ void {{classname}}::setupRoutes() {
}
{{#operation}}
void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Request &{{#hasParams}}request{{/hasParams}}, Pistache::Http::ResponseWriter response) {
{{#vendorExtensions.x-codegen-pistache-isParsingSupported}}
{{#hasPathParams}}
// Getting the path params
@@ -83,7 +83,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque
//send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what());
return;
} catch (std::runtime_error &e) {
} catch (std::exception &e) {
//send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return;
@@ -92,7 +92,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque
}
{{/operation}}
void {{classname}}::{{classnameSnakeLowerCase}}_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
void {{classname}}::{{classnameSnakeLowerCase}}_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist");
}

View File

@@ -39,7 +39,7 @@ bool fromStringValue(const std::string &inStr, int32_t &value){
try {
value = std::stoi( inStr );
}
catch (const std::invalid_argument) {
catch (const std::invalid_argument&) {
return false;
}
return true;
@@ -49,7 +49,7 @@ bool fromStringValue(const std::string &inStr, int64_t &value){
try {
value = std::stol( inStr );
}
catch (const std::invalid_argument) {
catch (const std::invalid_argument&) {
return false;
}
return true;
@@ -65,7 +65,7 @@ bool fromStringValue(const std::string &inStr, float &value){
try {
value = std::stof( inStr );
}
catch (const std::invalid_argument) {
catch (const std::invalid_argument&) {
return false;
}
return true;
@@ -75,7 +75,7 @@ bool fromStringValue(const std::string &inStr, double &value){
try {
value = std::stod( inStr );
}
catch (const std::invalid_argument) {
catch (const std::invalid_argument&) {
return false;
}
return true;

View File

@@ -203,9 +203,20 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
{{/required}}
{{^required}}
{{#isModel}}
if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() {
paramJson, err := parameterToJson(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value())
if err != nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err
}
localVarFormParams.Add("{{baseName}}", paramJson)
}
{{/isModel}}
{{^isModel}}
if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() {
localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
{{/isModel}}
{{/required}}
{{/isFile}}
{{/formParams}}

View File

@@ -149,6 +149,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}
// helper for converting interface{} parameters to json strings
func parameterToJson(obj interface{}) (string, error) {
jsonBuf, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
return c.cfg.HTTPClient.Do(request)

View File

@@ -62,21 +62,21 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v
{{#swaggerAnnotations}}
@ApiOperation(
value = "{{{summary}}}",
nickname = "{{{operationId}}}",
notes = "{{{notes}}}"{{#returnBaseType}},
response = {{{returnBaseType}}}::class{{/returnBaseType}}{{#returnContainer}},
responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}},
authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{/hasMore}}{{/scopes}}]{{/isOAuth}}){{#hasMore}}, {{/hasMore}}{{/authMethods}}]{{/hasAuthMethods}})
value = "{{{summary}}}",
nickname = "{{{operationId}}}",
notes = "{{{notes}}}"{{#returnBaseType}},
response = {{{returnBaseType}}}::class{{/returnBaseType}}{{#returnContainer}},
responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}},
authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{/hasMore}}{{/scopes}}]{{/isOAuth}}){{#hasMore}}, {{/hasMore}}{{/authMethods}}]{{/hasAuthMethods}})
@ApiResponses(
value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}}]){{/swaggerAnnotations}}
value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}}]){{/swaggerAnnotations}}
@RequestMapping(
value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}}
produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}}
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}}
consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}}
method = [RequestMethod.{{httpMethod}}])
value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}}
produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}}
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
produces = [{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}}
consumes = [{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}}
method = [RequestMethod.{{httpMethod}}])
{{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> {
return {{>returnValue}}
}

View File

@@ -0,0 +1,83 @@
package {{package}}
{{#imports}}import {{import}}
{{/imports}}
{{#swaggerAnnotations}}
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import io.swagger.annotations.ApiResponse
import io.swagger.annotations.ApiResponses
import io.swagger.annotations.Authorization
import io.swagger.annotations.AuthorizationScope
{{/swaggerAnnotations}}
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springframework.http.ResponseEntity
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestPart
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestHeader
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RequestMapping
{{#useBeanValidation}}
import org.springframework.validation.annotation.Validated
{{/useBeanValidation}}
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired
{{#useBeanValidation}}
import javax.validation.Valid
import javax.validation.constraints.DecimalMax
import javax.validation.constraints.DecimalMin
import javax.validation.constraints.Max
import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
{{/useBeanValidation}}
{{#reactive}}
import kotlinx.coroutines.flow.Flow;
{{/reactive}}
import kotlin.collections.List
import kotlin.collections.Map
{{#useBeanValidation}}
@Validated
{{/useBeanValidation}}
{{#swaggerAnnotations}}
@Api(value = "{{{baseName}}}", description = "The {{{baseName}}} API")
{{/swaggerAnnotations}}
{{=<% %>=}}
@RequestMapping("\${api.base-path:<%contextPath%>}")
<%={{ }}=%>
{{#operations}}
interface {{classname}} {
{{#operation}}
{{#swaggerAnnotations}}
@ApiOperation(
value = "{{{summary}}}",
nickname = "{{{operationId}}}",
notes = "{{{notes}}}"{{#returnBaseType}},
response = {{{returnBaseType}}}::class{{/returnBaseType}}{{#returnContainer}},
responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}},
authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{/hasMore}}{{/scopes}}]{{/isOAuth}}){{#hasMore}}, {{/hasMore}}{{/authMethods}}]{{/hasAuthMethods}})
@ApiResponses(
value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}}]){{/swaggerAnnotations}}
@RequestMapping(
value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}}
produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}}
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}}
consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}}
method = [RequestMethod.{{httpMethod}}])
{{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> {
return {{>returnValue}}
}
{{/operation}}
}
{{/operations}}

View File

@@ -6,13 +6,15 @@ from {{{packageName}}}.rest import ApiException
from pprint import pprint
{{> python_doc_auth_partial}}
{{#hasAuthMethods}}
# create an instance of the API class
# Defining host is optional and default to {{{basePath}}}
configuration.host = "{{{basePath}}}"
# Create an instance of the API class
api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration))
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/allParams}}
{{/hasAuthMethods}}
{{^hasAuthMethods}}
# create an instance of the API class
# Create an instance of the API class
api_instance = {{{packageName}}}.{{{classname}}}()
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/allParams}}

View File

@@ -6,7 +6,9 @@ from {{{packageName}}}.rest import ApiException
from pprint import pprint
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
{{> python_doc_auth_partial}}
# create an instance of the API class
# Defining host is optional and default to {{{basePath}}}
configuration.host = "{{{basePath}}}"
# Create an instance of the API class
api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration))
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/allParams}}

View File

@@ -69,7 +69,7 @@ export class {{classname}} extends runtime.BaseAPI {
{{/isDateTime}}
{{^isDateTime}}
{{#isDate}}
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString();
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString().substr(0,10);
{{/isDate}}
{{^isDate}}
queryParameters['{{baseName}}'] = requestParameters.{{paramName}};
@@ -271,4 +271,4 @@ export enum {{operationIdCamelCase}}{{enumName}} {
{{/allParams}}
{{/operation}}
{{/operations}}
{{/hasEnums}}
{{/hasEnums}}

View File

@@ -43,6 +43,7 @@ import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenResponse;
import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.MockDefaultGenerator;
import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile;
@@ -66,7 +67,7 @@ import java.util.stream.Collectors;
public class JavaClientCodegenTest {
@Test
public void arraysInRequestBody() throws Exception {
public void arraysInRequestBody() {
OpenAPI openAPI = TestUtils.createOpenAPI();
final JavaClientCodegen codegen = new JavaClientCodegen();
codegen.setOpenAPI(openAPI);
@@ -101,8 +102,7 @@ public class JavaClientCodegenTest {
}
@Test
public void nullValuesInComposedSchema() throws Exception {
OpenAPI openAPI = TestUtils.createOpenAPI();
public void nullValuesInComposedSchema() {
final JavaClientCodegen codegen = new JavaClientCodegen();
ComposedSchema schema = new ComposedSchema();
CodegenModel result = codegen.fromModel("CompSche",
@@ -190,7 +190,7 @@ public class JavaClientCodegenTest {
}
@Test
public void testPackageNamesSetInvokerDerivedFromApi() throws Exception {
public void testPackageNamesSetInvokerDerivedFromApi() {
final JavaClientCodegen codegen = new JavaClientCodegen();
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model");
codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api");
@@ -205,7 +205,7 @@ public class JavaClientCodegenTest {
}
@Test
public void testPackageNamesSetInvokerDerivedFromModel() throws Exception {
public void testPackageNamesSetInvokerDerivedFromModel() {
final JavaClientCodegen codegen = new JavaClientCodegen();
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model");
codegen.processOpts();
@@ -404,6 +404,18 @@ public class JavaClientCodegenTest {
Assert.assertEquals(cm.getClassname(), "OtherObj");
}
@Test
public void testBearerAuth() {
final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/pingBearerAuth.yaml");
JavaClientCodegen codegen = new JavaClientCodegen();
List<CodegenSecurity> security = codegen.fromSecurity(openAPI.getComponents().getSecuritySchemes());
Assert.assertEquals(security.size(), 1);
Assert.assertEquals(security.get(0).isBasic, Boolean.TRUE);
Assert.assertEquals(security.get(0).isBasicBasic, Boolean.FALSE);
Assert.assertEquals(security.get(0).isBasicBearer, Boolean.TRUE);
}
private CodegenProperty codegenPropertyWithArrayOfIntegerValues() {
CodegenProperty array = new CodegenProperty();
final CodegenProperty items = new CodegenProperty();
@@ -437,4 +449,12 @@ public class JavaClientCodegenTest {
codegenParameter.dataType = "String";
return codegenParameter;
}
@Test
public void escapeName() {
final JavaClientCodegen codegen = new JavaClientCodegen();
assertEquals("_default", codegen.toApiVarName("Default"));
assertEquals("_int", codegen.toApiVarName("int"));
assertEquals("pony", codegen.toApiVarName("pony"));
}
}

View File

@@ -0,0 +1,21 @@
openapi: 3.0.1
info:
title: ping test
version: '1.0'
servers:
- url: 'http://localhost:8080/'
paths:
/ping:
get:
operationId: pingGet
responses:
'201':
description: OK
components:
securitySchemes:
bearerAuth:
scheme: bearer
bearerFormat: token
type: http
security:
- bearerAuth: []

View File

@@ -1368,7 +1368,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<swagger-parser-groupid>org.openapitools.swagger.parser</swagger-parser-groupid>
<swagger-parser-version>2.0.13-OpenAPITools.org-1</swagger-parser-version>
<swagger-parser-version>2.0.13-OpenAPITools.org-2</swagger-parser-version>
<swagger-core-version>2.0.7</swagger-core-version>
<scala-version>2.11.1</scala-version>
<felix-version>3.3.1</felix-version>

View File

@@ -833,7 +833,11 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() {
localVarFormParams.Add("dateTime", parameterToString(localVarOptionals.DateTime.Value(), ""))
paramJson, err := parameterToJson(localVarOptionals.DateTime.Value())
if err != nil {
return nil, err
}
localVarFormParams.Add("dateTime", paramJson)
}
if localVarOptionals != nil && localVarOptionals.Password.IsSet() {
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))

View File

@@ -161,6 +161,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}
// helper for converting interface{} parameters to json strings
func parameterToJson(obj interface{}) (string, error) {
jsonBuf, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
return c.cfg.HTTPClient.Do(request)

View File

@@ -832,7 +832,11 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() {
localVarFormParams.Add("dateTime", parameterToString(localVarOptionals.DateTime.Value(), ""))
paramJson, err := parameterToJson(localVarOptionals.DateTime.Value())
if err != nil {
return nil, err
}
localVarFormParams.Add("dateTime", paramJson)
}
if localVarOptionals != nil && localVarOptionals.Password.IsSet() {
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))

View File

@@ -160,6 +160,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}
// helper for converting interface{} parameters to json strings
func parameterToJson(obj interface{}) (string, error) {
jsonBuf, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
return c.cfg.HTTPClient.Do(request)

View File

@@ -22,7 +22,7 @@ Then install it via:
npm install open_api_petstore --save
```
Finaly, you need to build the module:
Finally, you need to build the module:
```shell
npm run build
@@ -48,7 +48,7 @@ To use the link you just defined in your project, switch to the directory you wa
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finaly, you need to build the module:
Finally, you need to build the module:
```shell
npm run build

View File

@@ -22,7 +22,7 @@ Then install it via:
npm install open_api_petstore --save
```
Finaly, you need to build the module:
Finally, you need to build the module:
```shell
npm run build
@@ -48,7 +48,7 @@ To use the link you just defined in your project, switch to the directory you wa
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finaly, you need to build the module:
Finally, you need to build the module:
```shell
npm run build

View File

@@ -1,60 +0,0 @@
# WWW::OpenAPIClient::AnotherFakeApi
## Load the API package
```perl
use WWW::OpenAPIClient::Object::AnotherFakeApi;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
# **call_123_test_special_tags**
> Client call_123_test_special_tags(client => $client)
To test special tags
To test special tags and operation ID starting with number
### Example
```perl
use Data::Dumper;
use WWW::OpenAPIClient::AnotherFakeApi;
my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new(
);
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->call_123_test_special_tags(client => $client);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AnotherFakeApi->call_123_test_special_tags: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
### Return type
[**Client**](Client.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -1,41 +0,0 @@
=begin comment
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
=end comment
=cut
#
# NOTE: This class is auto generated by Swagger Codegen
# Please update the test cases below to test the API endpoints.
# Ref: https://github.com/swagger-api/swagger-codegen
#
use Test::More tests => 1; #TODO update number of test cases
use Test::Exception;
use lib 'lib';
use strict;
use warnings;
use_ok('WWW::OpenAPIClient::AnotherfakeApi');
my $api = WWW::OpenAPIClient::AnotherfakeApi->new();
isa_ok($api, 'WWW::OpenAPIClient::AnotherfakeApi');
#
# test_special_tags test
#
{
my $body = undef; # replace NULL with a proper value
my $result = $api->test_special_tags(body => $body);
}
1;

View File

@@ -52,7 +52,9 @@ from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
body = petstore_api.Client() # Client | client model

View File

@@ -23,7 +23,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
body = petstore_api.Client() # Client | client model

View File

@@ -35,7 +35,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
@@ -88,7 +88,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = True # bool | Input boolean as post body (optional)
@@ -141,7 +141,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
@@ -194,7 +194,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = 3.4 # float | Input number as post body (optional)
@@ -247,7 +247,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = 'body_example' # str | Input string as post body (optional)
@@ -300,7 +300,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
@@ -350,7 +350,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
query = 'query_example' # str |
body = petstore_api.User() # User |
@@ -404,7 +404,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.Client() # Client | client model
@@ -463,7 +463,9 @@ configuration = petstore_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
number = 3.4 # float | None
double = 3.4 # float | None
@@ -543,7 +545,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg')
@@ -611,7 +613,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
required_string_group = 56 # int | Required String in group parameters
required_boolean_group = True # bool | Required Boolean in group parameters
@@ -672,7 +674,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
param = {'key': 'param_example'} # dict(str, str) | request body
@@ -723,7 +725,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
param = 'param_example' # str | field1
param2 = 'param2_example' # str | field2

View File

@@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
body = petstore_api.Client() # Client | client model

View File

@@ -33,7 +33,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
@@ -89,7 +91,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
@@ -149,7 +153,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
status = ['status_example'] # list[str] | Status values that need to be considered for filter
@@ -208,7 +214,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
tags = ['tags_example'] # list[str] | Tags to filter by
@@ -269,7 +277,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to return
@@ -327,7 +337,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
@@ -385,7 +397,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
@@ -444,7 +458,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
@@ -504,7 +520,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to update
required_file = '/path/to/file' # file | file to upload

View File

@@ -26,7 +26,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
@@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
try:
@@ -136,7 +138,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
order_id = 56 # int | ID of pet that needs to be fetched
@@ -190,7 +192,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
body = petstore_api.Order() # Order | order placed for purchasing the pet

View File

@@ -30,7 +30,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = petstore_api.User() # User | Created user object
@@ -81,7 +81,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -132,7 +132,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -185,7 +185,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be deleted
@@ -237,7 +237,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
@@ -291,7 +291,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
@@ -346,7 +346,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
try:
@@ -395,7 +395,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
body = petstore_api.User() # User | Updated user object

View File

@@ -52,7 +52,9 @@ from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
body = petstore_api.Client() # Client | client model

View File

@@ -23,7 +23,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
body = petstore_api.Client() # Client | client model

View File

@@ -35,7 +35,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
@@ -88,7 +88,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = True # bool | Input boolean as post body (optional)
@@ -141,7 +141,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
@@ -194,7 +194,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = 3.4 # float | Input number as post body (optional)
@@ -247,7 +247,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = 'body_example' # str | Input string as post body (optional)
@@ -300,7 +300,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
@@ -350,7 +350,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
query = 'query_example' # str |
body = petstore_api.User() # User |
@@ -404,7 +404,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.Client() # Client | client model
@@ -463,7 +463,9 @@ configuration = petstore_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
number = 3.4 # float | None
double = 3.4 # float | None
@@ -543,7 +545,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg')
@@ -611,7 +613,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
required_string_group = 56 # int | Required String in group parameters
required_boolean_group = True # bool | Required Boolean in group parameters
@@ -672,7 +674,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
param = {'key': 'param_example'} # dict(str, str) | request body
@@ -723,7 +725,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
param = 'param_example' # str | field1
param2 = 'param2_example' # str | field2

View File

@@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
body = petstore_api.Client() # Client | client model

View File

@@ -33,7 +33,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
@@ -89,7 +91,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
@@ -149,7 +153,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
status = ['status_example'] # list[str] | Status values that need to be considered for filter
@@ -208,7 +214,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
tags = ['tags_example'] # list[str] | Tags to filter by
@@ -269,7 +277,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to return
@@ -327,7 +337,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
@@ -385,7 +397,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
@@ -444,7 +458,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
@@ -504,7 +520,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to update
required_file = '/path/to/file' # file | file to upload

View File

@@ -26,7 +26,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
@@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
try:
@@ -136,7 +138,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
order_id = 56 # int | ID of pet that needs to be fetched
@@ -190,7 +192,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
body = petstore_api.Order() # Order | order placed for purchasing the pet

View File

@@ -30,7 +30,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = petstore_api.User() # User | Created user object
@@ -81,7 +81,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -132,7 +132,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -185,7 +185,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be deleted
@@ -237,7 +237,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
@@ -291,7 +291,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
@@ -346,7 +346,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
try:
@@ -395,7 +395,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
body = petstore_api.User() # User | Updated user object

View File

@@ -52,7 +52,9 @@ from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
body = petstore_api.Client() # Client | client model

View File

@@ -23,7 +23,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
body = petstore_api.Client() # Client | client model

View File

@@ -35,7 +35,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
@@ -88,7 +88,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = True # bool | Input boolean as post body (optional)
@@ -141,7 +141,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
@@ -194,7 +194,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = 3.4 # float | Input number as post body (optional)
@@ -247,7 +247,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = 'body_example' # str | Input string as post body (optional)
@@ -300,7 +300,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
@@ -350,7 +350,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
query = 'query_example' # str |
body = petstore_api.User() # User |
@@ -404,7 +404,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
body = petstore_api.Client() # Client | client model
@@ -463,7 +463,9 @@ configuration = petstore_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
number = 3.4 # float | None
double = 3.4 # float | None
@@ -543,7 +545,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg')
@@ -611,7 +613,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
required_string_group = 56 # int | Required String in group parameters
required_boolean_group = True # bool | Required Boolean in group parameters
@@ -672,7 +674,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
param = {'key': 'param_example'} # dict(str, str) | request body
@@ -723,7 +725,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.FakeApi()
param = 'param_example' # str | field1
param2 = 'param2_example' # str | field2

View File

@@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
body = petstore_api.Client() # Client | client model

View File

@@ -33,7 +33,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
@@ -89,7 +91,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
@@ -149,7 +153,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
status = ['status_example'] # list[str] | Status values that need to be considered for filter
@@ -208,7 +214,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
tags = ['tags_example'] # list[str] | Tags to filter by
@@ -269,7 +277,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to return
@@ -327,7 +337,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
@@ -385,7 +397,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
@@ -444,7 +458,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
@@ -504,7 +520,9 @@ configuration = petstore_api.Configuration()
# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
pet_id = 56 # int | ID of pet to update
required_file = '/path/to/file' # file | file to upload

View File

@@ -26,7 +26,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
@@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
# Defining host is optional and default to http://petstore.swagger.io:80/v2
configuration.host = "http://petstore.swagger.io:80/v2"
# Create an instance of the API class
api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
try:
@@ -136,7 +138,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
order_id = 56 # int | ID of pet that needs to be fetched
@@ -190,7 +192,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.StoreApi()
body = petstore_api.Order() # Order | order placed for purchasing the pet

View File

@@ -30,7 +30,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = petstore_api.User() # User | Created user object
@@ -81,7 +81,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -132,7 +132,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -185,7 +185,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be deleted
@@ -237,7 +237,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
@@ -291,7 +291,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
@@ -346,7 +346,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
try:
@@ -395,7 +395,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
body = petstore_api.User() # User | Updated user object

View File

@@ -1 +1 @@
4.0.2-SNAPSHOT
4.0.3-SNAPSHOT

View File

@@ -849,7 +849,11 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() {
localVarFormParams.Add("dateTime", parameterToString(localVarOptionals.DateTime.Value(), ""))
paramJson, err := parameterToJson(localVarOptionals.DateTime.Value())
if err != nil {
return nil, err
}
localVarFormParams.Add("dateTime", paramJson)
}
if localVarOptionals != nil && localVarOptionals.Password.IsSet() {
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))

View File

@@ -163,6 +163,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}
// helper for converting interface{} parameters to json strings
func parameterToJson(obj interface{}) (string, error) {
jsonBuf, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
return c.cfg.HTTPClient.Do(request)

View File

@@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.3-SNAPSHOT

View File

@@ -1,7 +1,5 @@
language: node_js
cache: npm
node_js:
- "6"
- "6.1"
- "5"
- "5.11"

View File

@@ -14,8 +14,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
#### npm
To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
Then install it via:
@@ -23,10 +22,41 @@ Then install it via:
npm install open_api_petstore --save
```
Finally, you need to build the module:
```shell
npm run build
```
##### Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
```shell
npm install
```
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
```shell
npm link
```
To use the link you just defined in your project, switch to the directory you want to use your open_api_petstore from, and run:
```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finally, you need to build the module:
```shell
npm run build
```
#### git
#
If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:
```shell
@@ -139,10 +169,12 @@ Class | Method | HTTP request | Description
- [OpenApiPetstore.ArrayTest](docs/ArrayTest.md)
- [OpenApiPetstore.Capitalization](docs/Capitalization.md)
- [OpenApiPetstore.Cat](docs/Cat.md)
- [OpenApiPetstore.CatAllOf](docs/CatAllOf.md)
- [OpenApiPetstore.Category](docs/Category.md)
- [OpenApiPetstore.ClassModel](docs/ClassModel.md)
- [OpenApiPetstore.Client](docs/Client.md)
- [OpenApiPetstore.Dog](docs/Dog.md)
- [OpenApiPetstore.DogAllOf](docs/DogAllOf.md)
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
@@ -165,6 +197,7 @@ Class | Method | HTTP request | Description
- [OpenApiPetstore.Model200Response](docs/Model200Response.md)
- [OpenApiPetstore.ModelReturn](docs/ModelReturn.md)
- [OpenApiPetstore.Name](docs/Name.md)
- [OpenApiPetstore.NullableClass](docs/NullableClass.md)
- [OpenApiPetstore.NumberOnly](docs/NumberOnly.md)
- [OpenApiPetstore.Order](docs/Order.md)
- [OpenApiPetstore.OuterComposite](docs/OuterComposite.md)
@@ -182,32 +215,40 @@ Class | Method | HTTP request | Description
## Documentation for Authorization
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
### api_key_query
- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string
### bearer_test
- **Type**: Bearer authentication (JWT)
### http_basic_test
- **Type**: HTTP basic authentication
### petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.AdditionalPropertiesClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapProperty** | **{String: String}** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Animal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |

View File

@@ -7,8 +7,9 @@ Method | HTTP request | Description
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**
## call123testSpecialTags
> Client call123testSpecialTags(client)
To test special tags
@@ -16,6 +17,7 @@ To test special tags
To test special tags and operation ID starting with number
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -32,6 +34,7 @@ apiInstance.call123testSpecialTags(client, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
@@ -46,6 +49,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
- **Content-Type**: application/json
- **Accept**: application/json

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Number** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.ArrayOfArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayArrayNumber** | **[[Number]]** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.ArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayNumber** | **[Number]** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.ArrayTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayOfString** | **[String]** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Capitalization
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**smallCamel** | **String** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Cat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **Boolean** | | [optional]

View File

@@ -0,0 +1,9 @@
# OpenApiPetstore.CatAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **Boolean** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Category
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Number** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.ClassModel
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **String** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Client
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **String** | | [optional]

View File

@@ -7,13 +7,15 @@ Method | HTTP request | Description
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
<a name="fooGet"></a>
# **fooGet**
## fooGet
> InlineResponseDefault fooGet()
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -28,6 +30,7 @@ apiInstance.fooGet((error, data, response) => {
```
### Parameters
This endpoint does not need any parameter.
### Return type
@@ -40,6 +43,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
- **Content-Type**: Not defined
- **Accept**: application/json

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Dog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]

View File

@@ -0,0 +1,9 @@
# OpenApiPetstore.DogAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]

View File

@@ -1,13 +1,14 @@
# OpenApiPetstore.EnumArrays
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**justSymbol** | **String** | | [optional]
**arrayEnum** | **[String]** | | [optional]
<a name="JustSymbolEnum"></a>
## Enum: JustSymbolEnum
@@ -18,7 +19,7 @@ Name | Type | Description | Notes
<a name="[ArrayEnumEnum]"></a>
## Enum: [ArrayEnumEnum]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.EnumTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumString** | **String** | | [optional]
@@ -13,7 +14,7 @@ Name | Type | Description | Notes
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
<a name="EnumStringEnum"></a>
## Enum: EnumStringEnum
@@ -26,7 +27,7 @@ Name | Type | Description | Notes
<a name="EnumStringRequiredEnum"></a>
## Enum: EnumStringRequiredEnum
@@ -39,7 +40,7 @@ Name | Type | Description | Notes
<a name="EnumIntegerEnum"></a>
## Enum: EnumIntegerEnum
@@ -50,7 +51,7 @@ Name | Type | Description | Notes
<a name="EnumNumberEnum"></a>
## Enum: EnumNumberEnum

View File

@@ -19,13 +19,15 @@ Method | HTTP request | Description
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
<a name="fakeHealthGet"></a>
# **fakeHealthGet**
## fakeHealthGet
> HealthCheckResult fakeHealthGet()
Health check endpoint
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -40,6 +42,7 @@ apiInstance.fakeHealthGet((error, data, response) => {
```
### Parameters
This endpoint does not need any parameter.
### Return type
@@ -52,11 +55,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
- **Content-Type**: Not defined
- **Accept**: application/json
## fakeOuterBooleanSerialize
<a name="fakeOuterBooleanSerialize"></a>
# **fakeOuterBooleanSerialize**
> Boolean fakeOuterBooleanSerialize(opts)
@@ -64,6 +68,7 @@ No authorization required
Test serialization of outer boolean types
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -82,6 +87,7 @@ apiInstance.fakeOuterBooleanSerialize(opts, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **Boolean**| Input boolean as post body | [optional]
@@ -96,11 +102,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
- **Content-Type**: application/json
- **Accept**: */*
## fakeOuterCompositeSerialize
<a name="fakeOuterCompositeSerialize"></a>
# **fakeOuterCompositeSerialize**
> OuterComposite fakeOuterCompositeSerialize(opts)
@@ -108,6 +115,7 @@ No authorization required
Test serialization of object with outer number type
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -126,6 +134,7 @@ apiInstance.fakeOuterCompositeSerialize(opts, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
@@ -140,11 +149,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
- **Content-Type**: application/json
- **Accept**: */*
## fakeOuterNumberSerialize
<a name="fakeOuterNumberSerialize"></a>
# **fakeOuterNumberSerialize**
> Number fakeOuterNumberSerialize(opts)
@@ -152,6 +162,7 @@ No authorization required
Test serialization of outer number types
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -170,6 +181,7 @@ apiInstance.fakeOuterNumberSerialize(opts, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **Number**| Input number as post body | [optional]
@@ -184,11 +196,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
- **Content-Type**: application/json
- **Accept**: */*
## fakeOuterStringSerialize
<a name="fakeOuterStringSerialize"></a>
# **fakeOuterStringSerialize**
> String fakeOuterStringSerialize(opts)
@@ -196,6 +209,7 @@ No authorization required
Test serialization of outer string types
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -214,6 +228,7 @@ apiInstance.fakeOuterStringSerialize(opts, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **String**| Input string as post body | [optional]
@@ -228,11 +243,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
- **Content-Type**: application/json
- **Accept**: */*
## testBodyWithFileSchema
<a name="testBodyWithFileSchema"></a>
# **testBodyWithFileSchema**
> testBodyWithFileSchema(fileSchemaTestClass)
@@ -240,6 +256,7 @@ No authorization required
For this test, the body for this request much reference a schema named &#x60;File&#x60;.
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -256,6 +273,7 @@ apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response)
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
@@ -270,16 +288,18 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
## testBodyWithQueryParams
<a name="testBodyWithQueryParams"></a>
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, user)
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -297,6 +317,7 @@ apiInstance.testBodyWithQueryParams(query, user, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
@@ -312,11 +333,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
## testClientModel
<a name="testClientModel"></a>
# **testClientModel**
> Client testClientModel(client)
To test \&quot;client\&quot; model
@@ -324,6 +346,7 @@ To test \&quot;client\&quot; model
To test \&quot;client\&quot; model
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -340,6 +363,7 @@ apiInstance.testClientModel(client, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
@@ -354,11 +378,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
- **Content-Type**: application/json
- **Accept**: application/json
## testEndpointParameters
<a name="testEndpointParameters"></a>
# **testEndpointParameters**
> testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -366,6 +391,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
let defaultClient = OpenApiPetstore.ApiClient.instance;
@@ -402,6 +428,7 @@ apiInstance.testEndpointParameters(_number, _double, patternWithoutDelimiter, _b
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**_number** | **Number**| None |
@@ -429,11 +456,12 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
## testEnumParameters
<a name="testEnumParameters"></a>
# **testEnumParameters**
> testEnumParameters(opts)
To test enum parameters
@@ -441,6 +469,7 @@ To test enum parameters
To test enum parameters
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -466,6 +495,7 @@ apiInstance.testEnumParameters(opts, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumHeaderStringArray** | [**[String]**](String.md)| Header parameter enum test (string array) | [optional]
@@ -487,11 +517,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
## testGroupParameters
<a name="testGroupParameters"></a>
# **testGroupParameters**
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts)
Fake endpoint to test group parameters (optional)
@@ -499,6 +530,7 @@ Fake endpoint to test group parameters (optional)
Fake endpoint to test group parameters (optional)
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
let defaultClient = OpenApiPetstore.ApiClient.instance;
@@ -526,6 +558,7 @@ apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requi
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requiredStringGroup** | **Number**| Required String in group parameters |
@@ -545,16 +578,18 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
## testInlineAdditionalProperties
<a name="testInlineAdditionalProperties"></a>
# **testInlineAdditionalProperties**
> testInlineAdditionalProperties(requestBody)
test inline additionalProperties
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -571,6 +606,7 @@ apiInstance.testInlineAdditionalProperties(requestBody, (error, data, response)
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**{String: String}**](String.md)| request body |
@@ -585,16 +621,18 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
## testJsonFormData
<a name="testJsonFormData"></a>
# **testJsonFormData**
> testJsonFormData(param, param2)
test json serialization of form data
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
@@ -612,6 +650,7 @@ apiInstance.testJsonFormData(param, param2, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | **String**| field1 |
@@ -627,6 +666,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined

View File

@@ -7,8 +7,9 @@ Method | HTTP request | Description
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
<a name="testClassname"></a>
# **testClassname**
## testClassname
> Client testClassname(client)
To test class name in snake case
@@ -16,6 +17,7 @@ To test class name in snake case
To test class name in snake case
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
let defaultClient = OpenApiPetstore.ApiClient.instance;
@@ -38,6 +40,7 @@ apiInstance.testClassname(client, (error, data, response) => {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
@@ -52,6 +55,6 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
- **Content-Type**: application/json
- **Accept**: application/json

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.File
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sourceURI** | **String** | Test capitalization | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.FileSchemaTestClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file** | **File** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.Foo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional] [default to &#39;bar&#39;]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Number** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.HasOnlyReadOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.HealthCheckResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nullableMessage** | **String** | | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Updated name of the pet | [optional]

View File

@@ -1,6 +1,7 @@
# OpenApiPetstore.InlineObject1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]

Some files were not shown because too many files have changed in this diff Show More