forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 4.1.x
This commit is contained in:
@@ -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)
|
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
|
### 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).
|
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).
|
||||||
|
|||||||
@@ -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)
|
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.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)
|
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
|
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
|
* TypeScript (Inversify): @gualtierim
|
||||||
* Server Stubs
|
* Server Stubs
|
||||||
* Ada: @stcarrez
|
* 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# NancyFX: @mstefaniuk
|
||||||
* C++ (Qt5 QHttpEngine): @etherealjoy
|
* C++ (Qt5 QHttpEngine): @etherealjoy
|
||||||
* C++ Pistache: @sebymiano
|
* C++ Pistache: @sebymiano
|
||||||
|
|||||||
@@ -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)
|
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
|
### 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).
|
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).
|
||||||
|
|||||||
@@ -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|
|
|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|
|
|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<> and Comparable.| |false|
|
|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> 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|
|
|vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null|
|
||||||
|
|||||||
@@ -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|
|
|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|
|
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
|
||||||
|reactive|use coroutines for reactive behavior| |false|
|
|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|
|
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dl>|spring-boot|
|
||||||
|
|||||||
@@ -33,6 +33,14 @@
|
|||||||
<build>
|
<build>
|
||||||
<finalName>openapi-generator-online</finalName>
|
<finalName>openapi-generator-online</finalName>
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<excludes>
|
||||||
|
</excludes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -69,11 +77,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
|
||||||
<version>${springfox-version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
public class HomeController {
|
public class HomeController {
|
||||||
@RequestMapping(value = "/")
|
@RequestMapping(value = "/")
|
||||||
public String index() {
|
public String index() {
|
||||||
return "redirect:swagger-ui.html";
|
return "redirect:index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ import springfox.documentation.spi.DocumentationType;
|
|||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@@ -37,20 +41,39 @@ import java.io.InputStream;
|
|||||||
public class OpenAPIDocumentationConfig {
|
public class OpenAPIDocumentationConfig {
|
||||||
|
|
||||||
ApiInfo apiInfo() {
|
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()
|
return new ApiInfoBuilder()
|
||||||
.title("OpenAPI Generator Online")
|
.title("OpenAPI Generator Online")
|
||||||
.description("This is an online openapi generator server. You can find out more at https://github.com/OpenAPITools/openapi-generator.")
|
.description("This is an online openapi generator server. You can find out more at https://github.com/OpenAPITools/openapi-generator.")
|
||||||
.license("Apache 2.0")
|
.license("Apache 2.0")
|
||||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
||||||
.termsOfServiceUrl("")
|
.termsOfServiceUrl("")
|
||||||
.version("3.0.0")
|
.version(version)
|
||||||
.contact(new Contact("","", ""))
|
.contact(new Contact("","", ""))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Docket customImplementation(){
|
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)
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.host(host)
|
||||||
.select()
|
.select()
|
||||||
.apis(RequestHandlerSelectors.basePackage("org.openapitools.codegen.online.api"))
|
.apis(RequestHandlerSelectors.basePackage("org.openapitools.codegen.online.api"))
|
||||||
.build()
|
.build()
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ springfox.documentation.swagger.v2.path=/api-docs
|
|||||||
server.port=8080
|
server.port=8080
|
||||||
spring.jackson.date-format=org.openapitools.codegen.online.RFC3339DateFormat
|
spring.jackson.date-format=org.openapitools.codegen.online.RFC3339DateFormat
|
||||||
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
||||||
|
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
|
||||||
|
|||||||
17
modules/openapi-generator-online/src/main/resources/static/index.html
Executable file
17
modules/openapi-generator-online/src/main/resources/static/index.html
Executable 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 |
182
modules/openapi-generator-online/src/main/resources/static/rapidoc-min.js
vendored
Normal file
182
modules/openapi-generator-online/src/main/resources/static/rapidoc-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
version = ${project.version}
|
||||||
@@ -810,7 +810,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
* @return the snake-cased variable name
|
* @return the snake-cased variable name
|
||||||
*/
|
*/
|
||||||
public String toApiVarName(String 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
|
* @param name string to be lowerCamelCased
|
||||||
* @return snake-cased string
|
* @return lowerCamelCase string
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-method")
|
@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)) : "";
|
return (name.length() > 0) ? (Character.toLowerCase(name.charAt(0)) + name.substring(1)) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -784,6 +784,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
return p.getDefault().toString();
|
return p.getDefault().toString();
|
||||||
}
|
}
|
||||||
return null;
|
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)) {
|
} else if (ModelUtils.isStringSchema(p)) {
|
||||||
if (p.getDefault() != null) {
|
if (p.getDefault() != null) {
|
||||||
String _default = (String) p.getDefault();
|
String _default = (String) p.getDefault();
|
||||||
|
|||||||
@@ -834,6 +834,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
|||||||
if (p.getDefault() != null) {
|
if (p.getDefault() != null) {
|
||||||
return p.getDefault().toString();
|
return p.getDefault().toString();
|
||||||
}
|
}
|
||||||
|
} else if (ModelUtils.isURISchema(p)) {
|
||||||
|
if (p.getDefault() != null) {
|
||||||
|
return "URI.create('" + p.getDefault() + "')";
|
||||||
|
}
|
||||||
} else if (ModelUtils.isStringSchema(p)) {
|
} else if (ModelUtils.isStringSchema(p)) {
|
||||||
if (p.getDefault() != null) {
|
if (p.getDefault() != null) {
|
||||||
return "'" + p.getDefault() + "'";
|
return "'" + p.getDefault() + "'";
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
if (languageSpecificPrimitives.contains(type))
|
if (languageSpecificPrimitives.contains(type))
|
||||||
return (type);
|
return (type);
|
||||||
} else
|
} else
|
||||||
type = getTypeDeclaration(toModelName(snakeCase(schemaType)));
|
type = getTypeDeclaration(toModelName(lowerCamelCase(schemaType)));
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
} else if (typeMapping.containsKey(typeDeclaration)) {
|
} else if (typeMapping.containsKey(typeDeclaration)) {
|
||||||
return typeMapping.get(typeDeclaration);
|
return typeMapping.get(typeDeclaration);
|
||||||
} else {
|
} 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)) {
|
} else if (typeMapping.containsKey(schemaType)) {
|
||||||
return typeMapping.get(schemaType);
|
return typeMapping.get(schemaType);
|
||||||
} else {
|
} else {
|
||||||
return getTypeDeclaration(toModelName(snakeCase(schemaType)));
|
return getTypeDeclaration(toModelName(lowerCamelCase(schemaType)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -695,4 +695,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
return mime != null && JSON_VENDOR_MIME_PATTERN.matcher(mime).matches();
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen {
|
|||||||
public static final String ROOT_PACKAGE = "rootPackage";
|
public static final String ROOT_PACKAGE = "rootPackage";
|
||||||
|
|
||||||
public static final String RX_INTERFACE_OPTION = "rxInterface";
|
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";
|
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,
|
cliOptions.add(CliOption.newBoolean(RX_INTERFACE_OPTION,
|
||||||
"When specified, API interfaces are generated with RX "
|
"When specified, API interfaces are generated with RX "
|
||||||
+ "and methods return Single<> and Comparable."));
|
+ "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,
|
cliOptions.add(CliOption.newString(VERTX_SWAGGER_ROUTER_VERSION_OPTION,
|
||||||
"Specify the version of the swagger router library"));
|
"Specify the version of the swagger router library"));
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
public static final String SERVICE_INTERFACE = "serviceInterface";
|
public static final String SERVICE_INTERFACE = "serviceInterface";
|
||||||
public static final String SERVICE_IMPLEMENTATION = "serviceImplementation";
|
public static final String SERVICE_IMPLEMENTATION = "serviceImplementation";
|
||||||
public static final String REACTIVE = "reactive";
|
public static final String REACTIVE = "reactive";
|
||||||
|
public static final String INTERFACE_ONLY = "interfaceOnly";
|
||||||
|
|
||||||
private String basePackage;
|
private String basePackage;
|
||||||
private String invokerPackage;
|
private String invokerPackage;
|
||||||
@@ -75,12 +75,11 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
private boolean serviceInterface = false;
|
private boolean serviceInterface = false;
|
||||||
private boolean serviceImplementation = false;
|
private boolean serviceImplementation = false;
|
||||||
private boolean reactive = false;
|
private boolean reactive = false;
|
||||||
|
private boolean interfaceOnly = false;
|
||||||
|
|
||||||
public KotlinSpringServerCodegen() {
|
public KotlinSpringServerCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
apiTestTemplateFiles.put("api_test.mustache", ".kt");
|
|
||||||
|
|
||||||
reservedWords.addAll(VARIABLE_RESERVED_WORDS);
|
reservedWords.addAll(VARIABLE_RESERVED_WORDS);
|
||||||
|
|
||||||
outputFolder = "generated-code/kotlin-spring";
|
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);
|
"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(USE_BEANVALIDATION, "Use BeanValidation API annotations to validate data types", useBeanValidation);
|
||||||
addSwitch(REACTIVE, "use coroutines for reactive behavior", reactive);
|
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.");
|
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
|
||||||
setLibrary(SPRING_BOOT);
|
setLibrary(SPRING_BOOT);
|
||||||
|
|
||||||
@@ -209,6 +209,10 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
return this.useBeanValidation;
|
return this.useBeanValidation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setInterfaceOnly(boolean interfaceOnly) {
|
||||||
|
this.interfaceOnly = interfaceOnly;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUseBeanValidation(boolean useBeanValidation) {
|
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||||
this.useBeanValidation = useBeanValidation;
|
this.useBeanValidation = useBeanValidation;
|
||||||
@@ -322,9 +326,18 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
writePropertyBack(REACTIVE, reactive);
|
writePropertyBack(REACTIVE, reactive);
|
||||||
writePropertyBack(EXCEPTION_HANDLER, exceptionHandler);
|
writePropertyBack(EXCEPTION_HANDLER, exceptionHandler);
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(INTERFACE_ONLY)) {
|
||||||
|
this.setInterfaceOnly(Boolean.valueOf(additionalProperties.get(INTERFACE_ONLY).toString()));
|
||||||
|
}
|
||||||
|
|
||||||
modelTemplateFiles.put("model.mustache", ".kt");
|
modelTemplateFiles.put("model.mustache", ".kt");
|
||||||
|
|
||||||
|
if (interfaceOnly) {
|
||||||
|
apiTemplateFiles.put("apiInterface.mustache", ".kt");
|
||||||
|
} else {
|
||||||
apiTemplateFiles.put("api.mustache", ".kt");
|
apiTemplateFiles.put("api.mustache", ".kt");
|
||||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
apiTestTemplateFiles.put("api_test.mustache", ".kt");
|
||||||
|
}
|
||||||
|
|
||||||
if (this.serviceInterface) {
|
if (this.serviceInterface) {
|
||||||
apiTemplateFiles.put("service.mustache", "Service.kt");
|
apiTemplateFiles.put("service.mustache", "Service.kt");
|
||||||
@@ -335,6 +348,9 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
apiTemplateFiles.put("serviceImpl.mustache", "ServiceImpl.kt");
|
apiTemplateFiles.put("serviceImpl.mustache", "ServiceImpl.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
|
|
||||||
|
|
||||||
if (this.exceptionHandler) {
|
if (this.exceptionHandler) {
|
||||||
supportingFiles.add(new SupportingFile("exceptions.mustache",
|
supportingFiles.add(new SupportingFile("exceptions.mustache",
|
||||||
sanitizeDirectory(sourceFolder + File.separator + apiPackage), "Exceptions.kt"));
|
sanitizeDirectory(sourceFolder + File.separator + apiPackage), "Exceptions.kt"));
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
|
|||||||
if (alias != null && !alias.isEmpty()) {
|
if (alias != null && !alias.isEmpty()) {
|
||||||
this.bundleAlias = alias.toLowerCase(Locale.ROOT);
|
this.bundleAlias = alias.toLowerCase(Locale.ROOT);
|
||||||
} else {
|
} else {
|
||||||
this.bundleAlias = snakeCase(bundleName).replaceAll("([A-Z]+)", "\\_$1").toLowerCase(Locale.ROOT);
|
this.bundleAlias = lowerCamelCase(bundleName).replaceAll("([A-Z]+)", "\\_$1").toLowerCase(Locale.ROOT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,8 +88,9 @@ public class ApiClient {
|
|||||||
public ApiClient() {
|
public ApiClient() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}
|
// Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
|
||||||
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasic}}{{#isApiKey}}
|
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 ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}}
|
||||||
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
|
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
|
||||||
// Prevent the authentications from being modified.
|
// Prevent the authentications from being modified.
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ package {{package}};
|
|||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
|
||||||
{{#rxInterface}}
|
{{#rxInterface}}
|
||||||
import rx.Completable;
|
import {{#rxVersion2}}io.reactivex{{/rxVersion2}}{{^rxVersion2}}rx{{/rxVersion2}}.Completable;
|
||||||
import rx.Single;
|
import {{#rxVersion2}}io.reactivex{{/rxVersion2}}{{^rxVersion2}}rx{{/rxVersion2}}.Single;
|
||||||
{{/rxInterface}}
|
{{/rxInterface}}
|
||||||
{{^rxInterface}}
|
{{^rxInterface}}
|
||||||
import io.vertx.core.AsyncResult;
|
import io.vertx.core.AsyncResult;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Then install it via:
|
|||||||
npm install {{{projectName}}} --save
|
npm install {{{projectName}}} --save
|
||||||
```
|
```
|
||||||
|
|
||||||
Finaly, you need to build the module:
|
Finally, you need to build the module:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run build
|
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>
|
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
||||||
```
|
```
|
||||||
|
|
||||||
Finaly, you need to build the module:
|
Finally, you need to build the module:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using namespace {{modelNamespace}};{{/hasModelImport}}
|
|||||||
|
|
||||||
{{classname}}::{{classname}}(std::shared_ptr<Pistache::Rest::Router> rtr) {
|
{{classname}}::{{classname}}(std::shared_ptr<Pistache::Rest::Router> rtr) {
|
||||||
router = rtr;
|
router = rtr;
|
||||||
};
|
}
|
||||||
|
|
||||||
void {{classname}}::init() {
|
void {{classname}}::init() {
|
||||||
setupRoutes();
|
setupRoutes();
|
||||||
@@ -32,7 +32,7 @@ void {{classname}}::setupRoutes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#operation}}
|
{{#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}}
|
{{#vendorExtensions.x-codegen-pistache-isParsingSupported}}
|
||||||
{{#hasPathParams}}
|
{{#hasPathParams}}
|
||||||
// Getting the path params
|
// Getting the path params
|
||||||
@@ -83,7 +83,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque
|
|||||||
//send a 400 error
|
//send a 400 error
|
||||||
response.send(Pistache::Http::Code::Bad_Request, e.what());
|
response.send(Pistache::Http::Code::Bad_Request, e.what());
|
||||||
return;
|
return;
|
||||||
} catch (std::runtime_error &e) {
|
} catch (std::exception &e) {
|
||||||
//send a 500 error
|
//send a 500 error
|
||||||
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
|
||||||
return;
|
return;
|
||||||
@@ -92,7 +92,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque
|
|||||||
}
|
}
|
||||||
{{/operation}}
|
{{/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");
|
response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ bool fromStringValue(const std::string &inStr, int32_t &value){
|
|||||||
try {
|
try {
|
||||||
value = std::stoi( inStr );
|
value = std::stoi( inStr );
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument) {
|
catch (const std::invalid_argument&) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -49,7 +49,7 @@ bool fromStringValue(const std::string &inStr, int64_t &value){
|
|||||||
try {
|
try {
|
||||||
value = std::stol( inStr );
|
value = std::stol( inStr );
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument) {
|
catch (const std::invalid_argument&) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -65,7 +65,7 @@ bool fromStringValue(const std::string &inStr, float &value){
|
|||||||
try {
|
try {
|
||||||
value = std::stof( inStr );
|
value = std::stof( inStr );
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument) {
|
catch (const std::invalid_argument&) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -75,7 +75,7 @@ bool fromStringValue(const std::string &inStr, double &value){
|
|||||||
try {
|
try {
|
||||||
value = std::stod( inStr );
|
value = std::stod( inStr );
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument) {
|
catch (const std::invalid_argument&) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -203,9 +203,20 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
|
|||||||
localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
|
localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
|
||||||
{{/required}}
|
{{/required}}
|
||||||
{{^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() {
|
if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() {
|
||||||
localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
|
localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
|
||||||
}
|
}
|
||||||
|
{{/isModel}}
|
||||||
{{/required}}
|
{{/required}}
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
|
|||||||
@@ -149,6 +149,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
|||||||
return fmt.Sprintf("%v", obj)
|
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.
|
// callAPI do the request.
|
||||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
return c.cfg.HTTPClient.Do(request)
|
return c.cfg.HTTPClient.Do(request)
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v
|
|||||||
value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}}
|
value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"],{{#singleContentTypes}}{{#hasProduces}}
|
||||||
produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}}
|
produces = "{{{vendorExtensions.x-accepts}}}",{{/hasProduces}}{{#hasConsumes}}
|
||||||
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
|
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
|
||||||
produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}}
|
produces = [{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}], {{/hasProduces}}{{#hasConsumes}}
|
||||||
consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}}
|
consumes = [{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}],{{/hasConsumes}}{{/singleContentTypes}}
|
||||||
method = [RequestMethod.{{httpMethod}}])
|
method = [RequestMethod.{{httpMethod}}])
|
||||||
{{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> {
|
{{#reactive}}{{^isListContainer}}suspend {{/isListContainer}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> {
|
||||||
return {{>returnValue}}
|
return {{>returnValue}}
|
||||||
|
|||||||
83
modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache
vendored
Normal file
83
modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache
vendored
Normal 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}}
|
||||||
@@ -6,13 +6,15 @@ from {{{packageName}}}.rest import ApiException
|
|||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
{{> python_doc_auth_partial}}
|
{{> python_doc_auth_partial}}
|
||||||
{{#hasAuthMethods}}
|
{{#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))
|
api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration))
|
||||||
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
{{/hasAuthMethods}}
|
{{/hasAuthMethods}}
|
||||||
{{^hasAuthMethods}}
|
{{^hasAuthMethods}}
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = {{{packageName}}}.{{{classname}}}()
|
api_instance = {{{packageName}}}.{{{classname}}}()
|
||||||
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ from {{{packageName}}}.rest import ApiException
|
|||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
|
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
|
||||||
{{> python_doc_auth_partial}}
|
{{> 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))
|
api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration))
|
||||||
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class {{classname}} extends runtime.BaseAPI {
|
|||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
{{#isDate}}
|
{{#isDate}}
|
||||||
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString();
|
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString().substr(0,10);
|
||||||
{{/isDate}}
|
{{/isDate}}
|
||||||
{{^isDate}}
|
{{^isDate}}
|
||||||
queryParameters['{{baseName}}'] = requestParameters.{{paramName}};
|
queryParameters['{{baseName}}'] = requestParameters.{{paramName}};
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import org.openapitools.codegen.CodegenOperation;
|
|||||||
import org.openapitools.codegen.CodegenParameter;
|
import org.openapitools.codegen.CodegenParameter;
|
||||||
import org.openapitools.codegen.CodegenProperty;
|
import org.openapitools.codegen.CodegenProperty;
|
||||||
import org.openapitools.codegen.CodegenResponse;
|
import org.openapitools.codegen.CodegenResponse;
|
||||||
|
import org.openapitools.codegen.CodegenSecurity;
|
||||||
import org.openapitools.codegen.DefaultGenerator;
|
import org.openapitools.codegen.DefaultGenerator;
|
||||||
import org.openapitools.codegen.MockDefaultGenerator;
|
import org.openapitools.codegen.MockDefaultGenerator;
|
||||||
import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile;
|
import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile;
|
||||||
@@ -66,7 +67,7 @@ import java.util.stream.Collectors;
|
|||||||
public class JavaClientCodegenTest {
|
public class JavaClientCodegenTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void arraysInRequestBody() throws Exception {
|
public void arraysInRequestBody() {
|
||||||
OpenAPI openAPI = TestUtils.createOpenAPI();
|
OpenAPI openAPI = TestUtils.createOpenAPI();
|
||||||
final JavaClientCodegen codegen = new JavaClientCodegen();
|
final JavaClientCodegen codegen = new JavaClientCodegen();
|
||||||
codegen.setOpenAPI(openAPI);
|
codegen.setOpenAPI(openAPI);
|
||||||
@@ -101,8 +102,7 @@ public class JavaClientCodegenTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void nullValuesInComposedSchema() throws Exception {
|
public void nullValuesInComposedSchema() {
|
||||||
OpenAPI openAPI = TestUtils.createOpenAPI();
|
|
||||||
final JavaClientCodegen codegen = new JavaClientCodegen();
|
final JavaClientCodegen codegen = new JavaClientCodegen();
|
||||||
ComposedSchema schema = new ComposedSchema();
|
ComposedSchema schema = new ComposedSchema();
|
||||||
CodegenModel result = codegen.fromModel("CompSche",
|
CodegenModel result = codegen.fromModel("CompSche",
|
||||||
@@ -190,7 +190,7 @@ public class JavaClientCodegenTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPackageNamesSetInvokerDerivedFromApi() throws Exception {
|
public void testPackageNamesSetInvokerDerivedFromApi() {
|
||||||
final JavaClientCodegen codegen = new JavaClientCodegen();
|
final JavaClientCodegen codegen = new JavaClientCodegen();
|
||||||
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model");
|
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model");
|
||||||
codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api");
|
codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api");
|
||||||
@@ -205,7 +205,7 @@ public class JavaClientCodegenTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPackageNamesSetInvokerDerivedFromModel() throws Exception {
|
public void testPackageNamesSetInvokerDerivedFromModel() {
|
||||||
final JavaClientCodegen codegen = new JavaClientCodegen();
|
final JavaClientCodegen codegen = new JavaClientCodegen();
|
||||||
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model");
|
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model");
|
||||||
codegen.processOpts();
|
codegen.processOpts();
|
||||||
@@ -404,6 +404,18 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertEquals(cm.getClassname(), "OtherObj");
|
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() {
|
private CodegenProperty codegenPropertyWithArrayOfIntegerValues() {
|
||||||
CodegenProperty array = new CodegenProperty();
|
CodegenProperty array = new CodegenProperty();
|
||||||
final CodegenProperty items = new CodegenProperty();
|
final CodegenProperty items = new CodegenProperty();
|
||||||
@@ -437,4 +449,12 @@ public class JavaClientCodegenTest {
|
|||||||
codegenParameter.dataType = "String";
|
codegenParameter.dataType = "String";
|
||||||
return codegenParameter;
|
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"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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: []
|
||||||
2
pom.xml
2
pom.xml
@@ -1368,7 +1368,7 @@
|
|||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<swagger-parser-groupid>org.openapitools.swagger.parser</swagger-parser-groupid>
|
<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>
|
<swagger-core-version>2.0.7</swagger-core-version>
|
||||||
<scala-version>2.11.1</scala-version>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>3.3.1</felix-version>
|
<felix-version>3.3.1</felix-version>
|
||||||
|
|||||||
@@ -833,7 +833,11 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
|
|||||||
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
|
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
|
||||||
}
|
}
|
||||||
if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() {
|
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() {
|
if localVarOptionals != nil && localVarOptionals.Password.IsSet() {
|
||||||
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))
|
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))
|
||||||
|
|||||||
@@ -161,6 +161,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
|||||||
return fmt.Sprintf("%v", obj)
|
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.
|
// callAPI do the request.
|
||||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
return c.cfg.HTTPClient.Do(request)
|
return c.cfg.HTTPClient.Do(request)
|
||||||
|
|||||||
@@ -832,7 +832,11 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
|
|||||||
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
|
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
|
||||||
}
|
}
|
||||||
if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() {
|
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() {
|
if localVarOptionals != nil && localVarOptionals.Password.IsSet() {
|
||||||
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))
|
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))
|
||||||
|
|||||||
@@ -160,6 +160,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
|||||||
return fmt.Sprintf("%v", obj)
|
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.
|
// callAPI do the request.
|
||||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
return c.cfg.HTTPClient.Do(request)
|
return c.cfg.HTTPClient.Do(request)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Then install it via:
|
|||||||
npm install open_api_petstore --save
|
npm install open_api_petstore --save
|
||||||
```
|
```
|
||||||
|
|
||||||
Finaly, you need to build the module:
|
Finally, you need to build the module:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run build
|
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>
|
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
||||||
```
|
```
|
||||||
|
|
||||||
Finaly, you need to build the module:
|
Finally, you need to build the module:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Then install it via:
|
|||||||
npm install open_api_petstore --save
|
npm install open_api_petstore --save
|
||||||
```
|
```
|
||||||
|
|
||||||
Finaly, you need to build the module:
|
Finally, you need to build the module:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run build
|
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>
|
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
||||||
```
|
```
|
||||||
|
|
||||||
Finaly, you need to build the module:
|
Finally, you need to build the module:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
@@ -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)
|
|
||||||
|
|
||||||
@@ -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;
|
|
||||||
@@ -52,7 +52,9 @@ from petstore_api.rest import ApiException
|
|||||||
from pprint import pprint
|
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))
|
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.AnotherFakeApi()
|
api_instance = petstore_api.AnotherFakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = True # bool | Input boolean as post body (optional)
|
body = True # bool | Input boolean as post body (optional)
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = 3.4 # float | Input number as post body (optional)
|
body = 3.4 # float | Input number as post body (optional)
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = 'body_example' # str | Input string as post body (optional)
|
body = 'body_example' # str | Input string as post body (optional)
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
|
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
query = 'query_example' # str |
|
query = 'query_example' # str |
|
||||||
body = petstore_api.User() # User |
|
body = petstore_api.User() # User |
|
||||||
@@ -404,7 +404,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
@@ -463,7 +463,9 @@ configuration = petstore_api.Configuration()
|
|||||||
configuration.username = 'YOUR_USERNAME'
|
configuration.username = 'YOUR_USERNAME'
|
||||||
configuration.password = 'YOUR_PASSWORD'
|
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))
|
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
|
||||||
number = 3.4 # float | None
|
number = 3.4 # float | None
|
||||||
double = 3.4 # float | None
|
double = 3.4 # float | None
|
||||||
@@ -543,7 +545,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
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_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')
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
required_string_group = 56 # int | Required String in group parameters
|
required_string_group = 56 # int | Required String in group parameters
|
||||||
required_boolean_group = True # bool | Required Boolean 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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
param = {'key': 'param_example'} # dict(str, str) | request body
|
param = {'key': 'param_example'} # dict(str, str) | request body
|
||||||
|
|
||||||
@@ -723,7 +725,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
param = 'param_example' # str | field1
|
param = 'param_example' # str | field1
|
||||||
param2 = 'param2_example' # str | field2
|
param2 = 'param2_example' # str | field2
|
||||||
|
|||||||
@@ -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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ configuration = petstore_api.Configuration()
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | Pet id to delete
|
pet_id = 56 # int | Pet id to delete
|
||||||
api_key = 'api_key_example' # str | (optional)
|
api_key = 'api_key_example' # str | (optional)
|
||||||
@@ -149,7 +153,9 @@ configuration = petstore_api.Configuration()
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
status = ['status_example'] # list[str] | Status values that need to be considered for filter
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
tags = ['tags_example'] # list[str] | Tags to filter by
|
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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to return
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet that needs to be updated
|
pet_id = 56 # int | ID of pet that needs to be updated
|
||||||
name = 'name_example' # str | Updated name of the pet (optional)
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to update
|
pet_id = 56 # int | ID of pet to update
|
||||||
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to update
|
pet_id = 56 # int | ID of pet to update
|
||||||
required_file = '/path/to/file' # file | file to upload
|
required_file = '/path/to/file' # file | file to upload
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
|
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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -136,7 +138,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
order_id = 56 # int | ID of pet that needs to be fetched
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
body = petstore_api.Order() # Order | order placed for purchasing the pet
|
body = petstore_api.Order() # Order | order placed for purchasing the pet
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = petstore_api.User() # User | Created user object
|
body = petstore_api.User() # User | Created user object
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = [petstore_api.User()] # list[User] | List of user object
|
body = [petstore_api.User()] # list[User] | List of user object
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = [petstore_api.User()] # list[User] | List of user object
|
body = [petstore_api.User()] # list[User] | List of user object
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The name that needs to be deleted
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The user name for login
|
username = 'username_example' # str | The user name for login
|
||||||
password = 'password_example' # str | The password for login in clear text
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -395,7 +395,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | name that need to be deleted
|
username = 'username_example' # str | name that need to be deleted
|
||||||
body = petstore_api.User() # User | Updated user object
|
body = petstore_api.User() # User | Updated user object
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ from petstore_api.rest import ApiException
|
|||||||
from pprint import pprint
|
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))
|
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.AnotherFakeApi()
|
api_instance = petstore_api.AnotherFakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = True # bool | Input boolean as post body (optional)
|
body = True # bool | Input boolean as post body (optional)
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = 3.4 # float | Input number as post body (optional)
|
body = 3.4 # float | Input number as post body (optional)
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = 'body_example' # str | Input string as post body (optional)
|
body = 'body_example' # str | Input string as post body (optional)
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
|
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
query = 'query_example' # str |
|
query = 'query_example' # str |
|
||||||
body = petstore_api.User() # User |
|
body = petstore_api.User() # User |
|
||||||
@@ -404,7 +404,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
@@ -463,7 +463,9 @@ configuration = petstore_api.Configuration()
|
|||||||
configuration.username = 'YOUR_USERNAME'
|
configuration.username = 'YOUR_USERNAME'
|
||||||
configuration.password = 'YOUR_PASSWORD'
|
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))
|
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
|
||||||
number = 3.4 # float | None
|
number = 3.4 # float | None
|
||||||
double = 3.4 # float | None
|
double = 3.4 # float | None
|
||||||
@@ -543,7 +545,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
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_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')
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
required_string_group = 56 # int | Required String in group parameters
|
required_string_group = 56 # int | Required String in group parameters
|
||||||
required_boolean_group = True # bool | Required Boolean 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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
param = {'key': 'param_example'} # dict(str, str) | request body
|
param = {'key': 'param_example'} # dict(str, str) | request body
|
||||||
|
|
||||||
@@ -723,7 +725,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
param = 'param_example' # str | field1
|
param = 'param_example' # str | field1
|
||||||
param2 = 'param2_example' # str | field2
|
param2 = 'param2_example' # str | field2
|
||||||
|
|||||||
@@ -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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ configuration = petstore_api.Configuration()
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | Pet id to delete
|
pet_id = 56 # int | Pet id to delete
|
||||||
api_key = 'api_key_example' # str | (optional)
|
api_key = 'api_key_example' # str | (optional)
|
||||||
@@ -149,7 +153,9 @@ configuration = petstore_api.Configuration()
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
status = ['status_example'] # list[str] | Status values that need to be considered for filter
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
tags = ['tags_example'] # list[str] | Tags to filter by
|
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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to return
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet that needs to be updated
|
pet_id = 56 # int | ID of pet that needs to be updated
|
||||||
name = 'name_example' # str | Updated name of the pet (optional)
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to update
|
pet_id = 56 # int | ID of pet to update
|
||||||
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to update
|
pet_id = 56 # int | ID of pet to update
|
||||||
required_file = '/path/to/file' # file | file to upload
|
required_file = '/path/to/file' # file | file to upload
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
|
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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -136,7 +138,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
order_id = 56 # int | ID of pet that needs to be fetched
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
body = petstore_api.Order() # Order | order placed for purchasing the pet
|
body = petstore_api.Order() # Order | order placed for purchasing the pet
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = petstore_api.User() # User | Created user object
|
body = petstore_api.User() # User | Created user object
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = [petstore_api.User()] # list[User] | List of user object
|
body = [petstore_api.User()] # list[User] | List of user object
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = [petstore_api.User()] # list[User] | List of user object
|
body = [petstore_api.User()] # list[User] | List of user object
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The name that needs to be deleted
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The user name for login
|
username = 'username_example' # str | The user name for login
|
||||||
password = 'password_example' # str | The password for login in clear text
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -395,7 +395,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | name that need to be deleted
|
username = 'username_example' # str | name that need to be deleted
|
||||||
body = petstore_api.User() # User | Updated user object
|
body = petstore_api.User() # User | Updated user object
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ from petstore_api.rest import ApiException
|
|||||||
from pprint import pprint
|
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))
|
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.AnotherFakeApi()
|
api_instance = petstore_api.AnotherFakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = True # bool | Input boolean as post body (optional)
|
body = True # bool | Input boolean as post body (optional)
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = 3.4 # float | Input number as post body (optional)
|
body = 3.4 # float | Input number as post body (optional)
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = 'body_example' # str | Input string as post body (optional)
|
body = 'body_example' # str | Input string as post body (optional)
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
|
body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
query = 'query_example' # str |
|
query = 'query_example' # str |
|
||||||
body = petstore_api.User() # User |
|
body = petstore_api.User() # User |
|
||||||
@@ -404,7 +404,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
@@ -463,7 +463,9 @@ configuration = petstore_api.Configuration()
|
|||||||
configuration.username = 'YOUR_USERNAME'
|
configuration.username = 'YOUR_USERNAME'
|
||||||
configuration.password = 'YOUR_PASSWORD'
|
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))
|
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
|
||||||
number = 3.4 # float | None
|
number = 3.4 # float | None
|
||||||
double = 3.4 # float | None
|
double = 3.4 # float | None
|
||||||
@@ -543,7 +545,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
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_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')
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
required_string_group = 56 # int | Required String in group parameters
|
required_string_group = 56 # int | Required String in group parameters
|
||||||
required_boolean_group = True # bool | Required Boolean 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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
param = {'key': 'param_example'} # dict(str, str) | request body
|
param = {'key': 'param_example'} # dict(str, str) | request body
|
||||||
|
|
||||||
@@ -723,7 +725,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi()
|
api_instance = petstore_api.FakeApi()
|
||||||
param = 'param_example' # str | field1
|
param = 'param_example' # str | field1
|
||||||
param2 = 'param2_example' # str | field2
|
param2 = 'param2_example' # str | field2
|
||||||
|
|||||||
@@ -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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ configuration = petstore_api.Configuration()
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | Pet id to delete
|
pet_id = 56 # int | Pet id to delete
|
||||||
api_key = 'api_key_example' # str | (optional)
|
api_key = 'api_key_example' # str | (optional)
|
||||||
@@ -149,7 +153,9 @@ configuration = petstore_api.Configuration()
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
status = ['status_example'] # list[str] | Status values that need to be considered for filter
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
tags = ['tags_example'] # list[str] | Tags to filter by
|
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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to return
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet that needs to be updated
|
pet_id = 56 # int | ID of pet that needs to be updated
|
||||||
name = 'name_example' # str | Updated name of the pet (optional)
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to update
|
pet_id = 56 # int | ID of pet to update
|
||||||
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
|
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
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
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))
|
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
|
||||||
pet_id = 56 # int | ID of pet to update
|
pet_id = 56 # int | ID of pet to update
|
||||||
required_file = '/path/to/file' # file | file to upload
|
required_file = '/path/to/file' # file | file to upload
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
|
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
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
# 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))
|
api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -136,7 +138,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
order_id = 56 # int | ID of pet that needs to be fetched
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.StoreApi()
|
api_instance = petstore_api.StoreApi()
|
||||||
body = petstore_api.Order() # Order | order placed for purchasing the pet
|
body = petstore_api.Order() # Order | order placed for purchasing the pet
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = petstore_api.User() # User | Created user object
|
body = petstore_api.User() # User | Created user object
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = [petstore_api.User()] # list[User] | List of user object
|
body = [petstore_api.User()] # list[User] | List of user object
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
body = [petstore_api.User()] # list[User] | List of user object
|
body = [petstore_api.User()] # list[User] | List of user object
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The name that needs to be deleted
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | The user name for login
|
username = 'username_example' # str | The user name for login
|
||||||
password = 'password_example' # str | The password for login in clear text
|
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 petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -395,7 +395,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
# create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = petstore_api.UserApi()
|
api_instance = petstore_api.UserApi()
|
||||||
username = 'username_example' # str | name that need to be deleted
|
username = 'username_example' # str | name that need to be deleted
|
||||||
body = petstore_api.User() # User | Updated user object
|
body = petstore_api.User() # User | Updated user object
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
4.0.2-SNAPSHOT
|
4.0.3-SNAPSHOT
|
||||||
@@ -849,7 +849,11 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
|
|||||||
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
|
localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), ""))
|
||||||
}
|
}
|
||||||
if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() {
|
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() {
|
if localVarOptionals != nil && localVarOptionals.Password.IsSet() {
|
||||||
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))
|
localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), ""))
|
||||||
|
|||||||
@@ -163,6 +163,16 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
|||||||
return fmt.Sprintf("%v", obj)
|
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.
|
// callAPI do the request.
|
||||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
return c.cfg.HTTPClient.Do(request)
|
return c.cfg.HTTPClient.Do(request)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
4.0.0-SNAPSHOT
|
4.0.3-SNAPSHOT
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
|
cache: npm
|
||||||
node_js:
|
node_js:
|
||||||
- "6"
|
- "6"
|
||||||
- "6.1"
|
- "6.1"
|
||||||
- "5"
|
|
||||||
- "5.11"
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|||||||
|
|
||||||
#### npm
|
#### npm
|
||||||
|
|
||||||
To publish the library as a [npm](https://www.npmjs.com/),
|
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).
|
||||||
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
|
||||||
|
|
||||||
Then install it via:
|
Then install it via:
|
||||||
|
|
||||||
@@ -23,10 +22,41 @@ Then install it via:
|
|||||||
npm install open_api_petstore --save
|
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
|
#### git
|
||||||
#
|
|
||||||
If the library is hosted at a git repository, e.g.
|
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
|
||||||
https://github.com/GIT_USER_ID/GIT_REPO_ID
|
|
||||||
then install it via:
|
then install it via:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -139,10 +169,12 @@ Class | Method | HTTP request | Description
|
|||||||
- [OpenApiPetstore.ArrayTest](docs/ArrayTest.md)
|
- [OpenApiPetstore.ArrayTest](docs/ArrayTest.md)
|
||||||
- [OpenApiPetstore.Capitalization](docs/Capitalization.md)
|
- [OpenApiPetstore.Capitalization](docs/Capitalization.md)
|
||||||
- [OpenApiPetstore.Cat](docs/Cat.md)
|
- [OpenApiPetstore.Cat](docs/Cat.md)
|
||||||
|
- [OpenApiPetstore.CatAllOf](docs/CatAllOf.md)
|
||||||
- [OpenApiPetstore.Category](docs/Category.md)
|
- [OpenApiPetstore.Category](docs/Category.md)
|
||||||
- [OpenApiPetstore.ClassModel](docs/ClassModel.md)
|
- [OpenApiPetstore.ClassModel](docs/ClassModel.md)
|
||||||
- [OpenApiPetstore.Client](docs/Client.md)
|
- [OpenApiPetstore.Client](docs/Client.md)
|
||||||
- [OpenApiPetstore.Dog](docs/Dog.md)
|
- [OpenApiPetstore.Dog](docs/Dog.md)
|
||||||
|
- [OpenApiPetstore.DogAllOf](docs/DogAllOf.md)
|
||||||
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
||||||
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
||||||
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
||||||
@@ -165,6 +197,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [OpenApiPetstore.Model200Response](docs/Model200Response.md)
|
- [OpenApiPetstore.Model200Response](docs/Model200Response.md)
|
||||||
- [OpenApiPetstore.ModelReturn](docs/ModelReturn.md)
|
- [OpenApiPetstore.ModelReturn](docs/ModelReturn.md)
|
||||||
- [OpenApiPetstore.Name](docs/Name.md)
|
- [OpenApiPetstore.Name](docs/Name.md)
|
||||||
|
- [OpenApiPetstore.NullableClass](docs/NullableClass.md)
|
||||||
- [OpenApiPetstore.NumberOnly](docs/NumberOnly.md)
|
- [OpenApiPetstore.NumberOnly](docs/NumberOnly.md)
|
||||||
- [OpenApiPetstore.Order](docs/Order.md)
|
- [OpenApiPetstore.Order](docs/Order.md)
|
||||||
- [OpenApiPetstore.OuterComposite](docs/OuterComposite.md)
|
- [OpenApiPetstore.OuterComposite](docs/OuterComposite.md)
|
||||||
@@ -182,32 +215,40 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Authorization
|
## Documentation for Authorization
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api_key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### api_key_query
|
### api_key_query
|
||||||
|
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key_query
|
- **API key parameter name**: api_key_query
|
||||||
- **Location**: URL query string
|
- **Location**: URL query string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### bearer_test
|
### bearer_test
|
||||||
|
|
||||||
- **Type**: Bearer authentication (JWT)
|
- **Type**: Bearer authentication (JWT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### http_basic_test
|
### http_basic_test
|
||||||
|
|
||||||
- **Type**: HTTP basic authentication
|
- **Type**: HTTP basic authentication
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### petstore_auth
|
### petstore_auth
|
||||||
|
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
- **Flow**: implicit
|
- **Flow**: implicit
|
||||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.AdditionalPropertiesClass
|
# OpenApiPetstore.AdditionalPropertiesClass
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**mapProperty** | **{String: String}** | | [optional]
|
**mapProperty** | **{String: String}** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Animal
|
# OpenApiPetstore.Animal
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**className** | **String** | |
|
**className** | **String** | |
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ Method | HTTP request | Description
|
|||||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
|
|
||||||
|
|
||||||
<a name="call123testSpecialTags"></a>
|
|
||||||
# **call123testSpecialTags**
|
## call123testSpecialTags
|
||||||
|
|
||||||
> Client call123testSpecialTags(client)
|
> Client call123testSpecialTags(client)
|
||||||
|
|
||||||
To test special tags
|
To test special tags
|
||||||
@@ -16,6 +17,7 @@ To test special tags
|
|||||||
To test special tags and operation ID starting with number
|
To test special tags and operation ID starting with number
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -32,6 +34,7 @@ apiInstance.call123testSpecialTags(client, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**client** | [**Client**](Client.md)| client model |
|
**client** | [**Client**](Client.md)| client model |
|
||||||
@@ -46,6 +49,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.ApiResponse
|
# OpenApiPetstore.ApiResponse
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**code** | **Number** | | [optional]
|
**code** | **Number** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.ArrayOfArrayOfNumberOnly
|
# OpenApiPetstore.ArrayOfArrayOfNumberOnly
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**arrayArrayNumber** | **[[Number]]** | | [optional]
|
**arrayArrayNumber** | **[[Number]]** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.ArrayOfNumberOnly
|
# OpenApiPetstore.ArrayOfNumberOnly
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**arrayNumber** | **[Number]** | | [optional]
|
**arrayNumber** | **[Number]** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.ArrayTest
|
# OpenApiPetstore.ArrayTest
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**arrayOfString** | **[String]** | | [optional]
|
**arrayOfString** | **[String]** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Capitalization
|
# OpenApiPetstore.Capitalization
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**smallCamel** | **String** | | [optional]
|
**smallCamel** | **String** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Cat
|
# OpenApiPetstore.Cat
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**declawed** | **Boolean** | | [optional]
|
**declawed** | **Boolean** | | [optional]
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# OpenApiPetstore.CatAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**declawed** | **Boolean** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Category
|
# OpenApiPetstore.Category
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**id** | **Number** | | [optional]
|
**id** | **Number** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.ClassModel
|
# OpenApiPetstore.ClassModel
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**_class** | **String** | | [optional]
|
**_class** | **String** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Client
|
# OpenApiPetstore.Client
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**client** | **String** | | [optional]
|
**client** | **String** | | [optional]
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ Method | HTTP request | Description
|
|||||||
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
|
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
|
||||||
|
|
||||||
|
|
||||||
<a name="fooGet"></a>
|
|
||||||
# **fooGet**
|
## fooGet
|
||||||
|
|
||||||
> InlineResponseDefault fooGet()
|
> InlineResponseDefault fooGet()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ apiInstance.fooGet((error, data, response) => {
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
@@ -40,6 +43,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Dog
|
# OpenApiPetstore.Dog
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**breed** | **String** | | [optional]
|
**breed** | **String** | | [optional]
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# OpenApiPetstore.DogAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**breed** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
# OpenApiPetstore.EnumArrays
|
# OpenApiPetstore.EnumArrays
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**justSymbol** | **String** | | [optional]
|
**justSymbol** | **String** | | [optional]
|
||||||
**arrayEnum** | **[String]** | | [optional]
|
**arrayEnum** | **[String]** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="JustSymbolEnum"></a>
|
|
||||||
## Enum: JustSymbolEnum
|
## Enum: JustSymbolEnum
|
||||||
|
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="[ArrayEnumEnum]"></a>
|
|
||||||
## Enum: [ArrayEnumEnum]
|
## Enum: [ArrayEnumEnum]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.EnumTest
|
# OpenApiPetstore.EnumTest
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**enumString** | **String** | | [optional]
|
**enumString** | **String** | | [optional]
|
||||||
@@ -13,7 +14,7 @@ Name | Type | Description | Notes
|
|||||||
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
<a name="EnumStringEnum"></a>
|
|
||||||
## Enum: EnumStringEnum
|
## Enum: EnumStringEnum
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="EnumStringRequiredEnum"></a>
|
|
||||||
## Enum: EnumStringRequiredEnum
|
## Enum: EnumStringRequiredEnum
|
||||||
|
|
||||||
|
|
||||||
@@ -39,7 +40,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="EnumIntegerEnum"></a>
|
|
||||||
## Enum: EnumIntegerEnum
|
## Enum: EnumIntegerEnum
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +51,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="EnumNumberEnum"></a>
|
|
||||||
## Enum: EnumNumberEnum
|
## Enum: EnumNumberEnum
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,15 @@ Method | HTTP request | Description
|
|||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
<a name="fakeHealthGet"></a>
|
|
||||||
# **fakeHealthGet**
|
## fakeHealthGet
|
||||||
|
|
||||||
> HealthCheckResult fakeHealthGet()
|
> HealthCheckResult fakeHealthGet()
|
||||||
|
|
||||||
Health check endpoint
|
Health check endpoint
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -40,6 +42,7 @@ apiInstance.fakeHealthGet((error, data, response) => {
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
@@ -52,11 +55,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
|
||||||
|
## fakeOuterBooleanSerialize
|
||||||
|
|
||||||
<a name="fakeOuterBooleanSerialize"></a>
|
|
||||||
# **fakeOuterBooleanSerialize**
|
|
||||||
> Boolean fakeOuterBooleanSerialize(opts)
|
> Boolean fakeOuterBooleanSerialize(opts)
|
||||||
|
|
||||||
|
|
||||||
@@ -64,6 +68,7 @@ No authorization required
|
|||||||
Test serialization of outer boolean types
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -82,6 +87,7 @@ apiInstance.fakeOuterBooleanSerialize(opts, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **Boolean**| Input boolean as post body | [optional]
|
**body** | **Boolean**| Input boolean as post body | [optional]
|
||||||
@@ -96,11 +102,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
|
||||||
|
## fakeOuterCompositeSerialize
|
||||||
|
|
||||||
<a name="fakeOuterCompositeSerialize"></a>
|
|
||||||
# **fakeOuterCompositeSerialize**
|
|
||||||
> OuterComposite fakeOuterCompositeSerialize(opts)
|
> OuterComposite fakeOuterCompositeSerialize(opts)
|
||||||
|
|
||||||
|
|
||||||
@@ -108,6 +115,7 @@ No authorization required
|
|||||||
Test serialization of object with outer number type
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -126,6 +134,7 @@ apiInstance.fakeOuterCompositeSerialize(opts, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||||
@@ -140,11 +149,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
|
||||||
|
## fakeOuterNumberSerialize
|
||||||
|
|
||||||
<a name="fakeOuterNumberSerialize"></a>
|
|
||||||
# **fakeOuterNumberSerialize**
|
|
||||||
> Number fakeOuterNumberSerialize(opts)
|
> Number fakeOuterNumberSerialize(opts)
|
||||||
|
|
||||||
|
|
||||||
@@ -152,6 +162,7 @@ No authorization required
|
|||||||
Test serialization of outer number types
|
Test serialization of outer number types
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -170,6 +181,7 @@ apiInstance.fakeOuterNumberSerialize(opts, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **Number**| Input number as post body | [optional]
|
**body** | **Number**| Input number as post body | [optional]
|
||||||
@@ -184,11 +196,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
|
||||||
|
## fakeOuterStringSerialize
|
||||||
|
|
||||||
<a name="fakeOuterStringSerialize"></a>
|
|
||||||
# **fakeOuterStringSerialize**
|
|
||||||
> String fakeOuterStringSerialize(opts)
|
> String fakeOuterStringSerialize(opts)
|
||||||
|
|
||||||
|
|
||||||
@@ -196,6 +209,7 @@ No authorization required
|
|||||||
Test serialization of outer string types
|
Test serialization of outer string types
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -214,6 +228,7 @@ apiInstance.fakeOuterStringSerialize(opts, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **String**| Input string as post body | [optional]
|
**body** | **String**| Input string as post body | [optional]
|
||||||
@@ -228,11 +243,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
|
||||||
|
## testBodyWithFileSchema
|
||||||
|
|
||||||
<a name="testBodyWithFileSchema"></a>
|
|
||||||
# **testBodyWithFileSchema**
|
|
||||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||||
|
|
||||||
|
|
||||||
@@ -240,6 +256,7 @@ No authorization required
|
|||||||
For this test, the body for this request much reference a schema named `File`.
|
For this test, the body for this request much reference a schema named `File`.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -256,6 +273,7 @@ apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response)
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||||
@@ -270,16 +288,18 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
## testBodyWithQueryParams
|
||||||
|
|
||||||
<a name="testBodyWithQueryParams"></a>
|
|
||||||
# **testBodyWithQueryParams**
|
|
||||||
> testBodyWithQueryParams(query, user)
|
> testBodyWithQueryParams(query, user)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -297,6 +317,7 @@ apiInstance.testBodyWithQueryParams(query, user, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**query** | **String**| |
|
**query** | **String**| |
|
||||||
@@ -312,11 +333,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
## testClientModel
|
||||||
|
|
||||||
<a name="testClientModel"></a>
|
|
||||||
# **testClientModel**
|
|
||||||
> Client testClientModel(client)
|
> Client testClientModel(client)
|
||||||
|
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
@@ -324,6 +346,7 @@ To test \"client\" model
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -340,6 +363,7 @@ apiInstance.testClientModel(client, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**client** | [**Client**](Client.md)| client model |
|
**client** | [**Client**](Client.md)| client model |
|
||||||
@@ -354,11 +378,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
|
||||||
|
## testEndpointParameters
|
||||||
|
|
||||||
<a name="testEndpointParameters"></a>
|
|
||||||
# **testEndpointParameters**
|
|
||||||
> testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts)
|
> testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts)
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
@@ -366,6 +391,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
|
|||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||||
@@ -402,6 +428,7 @@ apiInstance.testEndpointParameters(_number, _double, patternWithoutDelimiter, _b
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**_number** | **Number**| None |
|
**_number** | **Number**| None |
|
||||||
@@ -429,11 +456,12 @@ null (empty response body)
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
## testEnumParameters
|
||||||
|
|
||||||
<a name="testEnumParameters"></a>
|
|
||||||
# **testEnumParameters**
|
|
||||||
> testEnumParameters(opts)
|
> testEnumParameters(opts)
|
||||||
|
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
@@ -441,6 +469,7 @@ To test enum parameters
|
|||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -466,6 +495,7 @@ apiInstance.testEnumParameters(opts, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | [**[String]**](String.md)| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**[String]**](String.md)| Header parameter enum test (string array) | [optional]
|
||||||
@@ -487,11 +517,12 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
## testGroupParameters
|
||||||
|
|
||||||
<a name="testGroupParameters"></a>
|
|
||||||
# **testGroupParameters**
|
|
||||||
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts)
|
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts)
|
||||||
|
|
||||||
Fake endpoint to test group parameters (optional)
|
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)
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||||
@@ -526,6 +558,7 @@ apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requi
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**requiredStringGroup** | **Number**| Required String in group parameters |
|
**requiredStringGroup** | **Number**| Required String in group parameters |
|
||||||
@@ -545,16 +578,18 @@ null (empty response body)
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
## testInlineAdditionalProperties
|
||||||
|
|
||||||
<a name="testInlineAdditionalProperties"></a>
|
|
||||||
# **testInlineAdditionalProperties**
|
|
||||||
> testInlineAdditionalProperties(requestBody)
|
> testInlineAdditionalProperties(requestBody)
|
||||||
|
|
||||||
test inline additionalProperties
|
test inline additionalProperties
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -571,6 +606,7 @@ apiInstance.testInlineAdditionalProperties(requestBody, (error, data, response)
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**requestBody** | [**{String: String}**](String.md)| request body |
|
**requestBody** | [**{String: String}**](String.md)| request body |
|
||||||
@@ -585,16 +621,18 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
## testJsonFormData
|
||||||
|
|
||||||
<a name="testJsonFormData"></a>
|
|
||||||
# **testJsonFormData**
|
|
||||||
> testJsonFormData(param, param2)
|
> testJsonFormData(param, param2)
|
||||||
|
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
|
|
||||||
@@ -612,6 +650,7 @@ apiInstance.testJsonFormData(param, param2, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**param** | **String**| field1 |
|
**param** | **String**| field1 |
|
||||||
@@ -627,6 +666,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ Method | HTTP request | Description
|
|||||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
|
|
||||||
|
|
||||||
<a name="testClassname"></a>
|
|
||||||
# **testClassname**
|
## testClassname
|
||||||
|
|
||||||
> Client testClassname(client)
|
> Client testClassname(client)
|
||||||
|
|
||||||
To test class name in snake case
|
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
|
To test class name in snake case
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import OpenApiPetstore from 'open_api_petstore';
|
import OpenApiPetstore from 'open_api_petstore';
|
||||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||||
@@ -38,6 +40,7 @@ apiInstance.testClassname(client, (error, data, response) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**client** | [**Client**](Client.md)| client model |
|
**client** | [**Client**](Client.md)| client model |
|
||||||
@@ -52,6 +55,6 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.File
|
# OpenApiPetstore.File
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**sourceURI** | **String** | Test capitalization | [optional]
|
**sourceURI** | **String** | Test capitalization | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.FileSchemaTestClass
|
# OpenApiPetstore.FileSchemaTestClass
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**file** | **File** | | [optional]
|
**file** | **File** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.Foo
|
# OpenApiPetstore.Foo
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**bar** | **String** | | [optional] [default to 'bar']
|
**bar** | **String** | | [optional] [default to 'bar']
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.FormatTest
|
# OpenApiPetstore.FormatTest
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**integer** | **Number** | | [optional]
|
**integer** | **Number** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.HasOnlyReadOnly
|
# OpenApiPetstore.HasOnlyReadOnly
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**bar** | **String** | | [optional]
|
**bar** | **String** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.HealthCheckResult
|
# OpenApiPetstore.HealthCheckResult
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**nullableMessage** | **String** | | [optional]
|
**nullableMessage** | **String** | | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.InlineObject
|
# OpenApiPetstore.InlineObject
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **String** | Updated name of the pet | [optional]
|
**name** | **String** | Updated name of the pet | [optional]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# OpenApiPetstore.InlineObject1
|
# OpenApiPetstore.InlineObject1
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
**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
Reference in New Issue
Block a user