forked from loafle/openapi-generator-original
Compare commits
11 Commits
fix-enum-s
...
ts_server
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ba38d6a5c | ||
|
|
b86a51ae17 | ||
|
|
5980c420e3 | ||
|
|
dad931a25a | ||
|
|
29183e0280 | ||
|
|
1044c30293 | ||
|
|
a7446983e8 | ||
|
|
53950f8aff | ||
|
|
6a49c4ec02 | ||
|
|
57bf9e85a1 | ||
|
|
47b4e16420 |
@@ -60,8 +60,8 @@ elif [ "$NODE_INDEX" = "2" ]; then
|
|||||||
# run integration tests
|
# run integration tests
|
||||||
mvn --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
mvn --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||||
else
|
else
|
||||||
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
|
echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..."
|
||||||
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
#sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
||||||
java -version
|
java -version
|
||||||
|
|
||||||
# install dart2
|
# install dart2
|
||||||
@@ -73,7 +73,7 @@ else
|
|||||||
sudo apt-get install dart
|
sudo apt-get install dart
|
||||||
export PATH="$PATH:/usr/lib/dart/bin"
|
export PATH="$PATH:/usr/lib/dart/bin"
|
||||||
|
|
||||||
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -757,6 +757,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
|||||||
- 2020-05-22 - [TypeScript REST API Client](https://dev.to/unhurried/typescript-rest-api-client-4in3) by ["unhurried"](https://dev.to/unhurried)
|
- 2020-05-22 - [TypeScript REST API Client](https://dev.to/unhurried/typescript-rest-api-client-4in3) by ["unhurried"](https://dev.to/unhurried)
|
||||||
- 2020-05-28 - [【使用 lotify + Swagger 建置可共用的 LINE Notify bot】 - #NiJia @ Chatbot Developer Taiwan 第 #19 小聚](https://www.youtube.com/watch?v=agYVz6dzh1I) by [Chatbot Developer Taiwan](https://www.youtube.com/channel/UCxeYUyZNnHmpX23YNF-ewvw)
|
- 2020-05-28 - [【使用 lotify + Swagger 建置可共用的 LINE Notify bot】 - #NiJia @ Chatbot Developer Taiwan 第 #19 小聚](https://www.youtube.com/watch?v=agYVz6dzh1I) by [Chatbot Developer Taiwan](https://www.youtube.com/channel/UCxeYUyZNnHmpX23YNF-ewvw)
|
||||||
- 2020-06-23 - [新規サーバーアプリケーションにTypeScriptを採用してみた](https://www.cam-inc.co.jp/news/20200623) at [CAM Tech Blog](https://www.cam-inc.co.jp/news/tech-blog/)
|
- 2020-06-23 - [新規サーバーアプリケーションにTypeScriptを採用してみた](https://www.cam-inc.co.jp/news/20200623) at [CAM Tech Blog](https://www.cam-inc.co.jp/news/tech-blog/)
|
||||||
|
- 2020-07-07 - [5 Best API Documentation Tools](https://blog.dreamfactory.com/5-best-api-documentation-tools/) by Susanna Bouse at [DreamFactory Blog](https://blog.dreamfactory.com/)
|
||||||
|
- 2020-07-12 - [Open API 3.0の定義からgolangのサーバコードのスケルトンを作成する](https://qiita.com/professor/items/4cbd04ec084d13057bc2) by [@professor (Qiita Blog)](https://qiita.com/professor)
|
||||||
|
|
||||||
|
|
||||||
## [6 - About Us](#table-of-contents)
|
## [6 - About Us](#table-of-contents)
|
||||||
|
|
||||||
|
|||||||
32
bin/typescript-server-petstore.sh
Executable file
32
bin/typescript-server-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn -B clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-server -o samples/server/petstore/typescript-server/ $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
14
bin/windows/typescript-server-petstore.bat
Normal file
14
bin/windows/typescript-server-petstore.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||||
|
|
||||||
|
echo
|
||||||
|
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-server -o samples\server\petstore\typescript-server
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
@@ -22,9 +22,9 @@ jobs:
|
|||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
# Default branch if not
|
# Default branch if not
|
||||||
- source-v1-{{ .Branch }}-{{ .Revision }}
|
- source-v2-{{ .Branch }}-{{ .Revision }}
|
||||||
- source-v1-{{ .Branch }}-
|
- source-v2-{{ .Branch }}-
|
||||||
- source-v1-
|
- source-v2-
|
||||||
# Machine Setup
|
# Machine Setup
|
||||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||||
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
|
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
- run: ./CI/circle_parallel.sh
|
- run: ./CI/circle_parallel.sh
|
||||||
# Save dependency cache
|
# Save dependency cache
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: source-v1-{{ .Branch }}-{{ .Revision }}
|
key: source-v2-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
# This is a broad list of cache paths to include many possible development environments
|
# This is a broad list of cache paths to include many possible development environments
|
||||||
# You can probably delete some of these entries
|
# You can probably delete some of these entries
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ sidebar_label: go-experimental
|
|||||||
|
|
||||||
| Option | Description | Values | Default |
|
| Option | Description | Values | Default |
|
||||||
| ------ | ----------- | ------ | ------- |
|
| ------ | ----------- | ------ | ------- |
|
||||||
|
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||||
|enumClassPrefix|Prefix enum with class name| |false|
|
|enumClassPrefix|Prefix enum with class name| |false|
|
||||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||||
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ sidebar_label: powershell
|
|||||||
| ------ | ----------- | ------ | ------- |
|
| ------ | ----------- | ------ | ------- |
|
||||||
|apiNamePrefix|Prefix that will be appended to all PS objects. Default: empty string. e.g. Pet => PSPet.| |null|
|
|apiNamePrefix|Prefix that will be appended to all PS objects. Default: empty string. e.g. Pet => PSPet.| |null|
|
||||||
|commonVerbs|PS common verb mappings. e.g. Delete=Remove:Patch=Update to map Delete with Remove and Patch with Update accordingly.| |null|
|
|commonVerbs|PS common verb mappings. e.g. Delete=Remove:Patch=Update to map Delete with Remove and Patch with Update accordingly.| |null|
|
||||||
|
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||||
|discardReadOnly|Set discardReadonly to true to generate the Initialize cmdlet without readonly parameters| |null|
|
|discardReadOnly|Set discardReadonly to true to generate the Initialize cmdlet without readonly parameters| |null|
|
||||||
|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null|
|
|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null|
|
||||||
|packageName|Client package name (e.g. PSTwitter).| |PSOpenAPITools|
|
|packageName|Client package name (e.g. PSTwitter).| |PSOpenAPITools|
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ Please refer to https://github.com/upstart-commerce/sbt-openapi-generator
|
|||||||
|
|
||||||
Please refer to https://github.com/OpenAPITools/openapi-generator-bazel
|
Please refer to https://github.com/OpenAPITools/openapi-generator-bazel
|
||||||
|
|
||||||
|
### Cake Addin
|
||||||
|
|
||||||
|
3rd-party Cake Addin provided by [Lukas Körfer](https://github.com/lukoerfer): https://github.com/lukoerfer/cake-openapi-generator
|
||||||
|
|
||||||
### GitHub Integration
|
### GitHub Integration
|
||||||
|
|
||||||
To push the auto-generated SDK to GitHub, we provide `git_push.sh` to streamline the process. For example:
|
To push the auto-generated SDK to GitHub, we provide `git_push.sh` to streamline the process. For example:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<!-- RELEASE_VERSION -->
|
<!-- RELEASE_VERSION -->
|
||||||
<version>4.3.1-SNAPSHOT</version>
|
<version>5.0.0-SNAPSHOT</version>
|
||||||
<!-- /RELEASE_VERSION -->
|
<!-- /RELEASE_VERSION -->
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
|||||||
@@ -2514,7 +2514,11 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
// process 'additionalProperties'
|
// process 'additionalProperties'
|
||||||
if (schema.getAdditionalProperties() == null) {
|
if (schema.getAdditionalProperties() == null) {
|
||||||
m.isAdditionalPropertiesTrue = false; // TODO fix the old (incorrect) behaviour (likely with an option)
|
if (disallowAdditionalPropertiesIfNotPresent) {
|
||||||
|
m.isAdditionalPropertiesTrue = false;
|
||||||
|
} else {
|
||||||
|
m.isAdditionalPropertiesTrue = true;
|
||||||
|
}
|
||||||
} else if (schema.getAdditionalProperties() instanceof Boolean) {
|
} else if (schema.getAdditionalProperties() instanceof Boolean) {
|
||||||
if (Boolean.TRUE.equals(schema.getAdditionalProperties())) {
|
if (Boolean.TRUE.equals(schema.getAdditionalProperties())) {
|
||||||
m.isAdditionalPropertiesTrue = true;
|
m.isAdditionalPropertiesTrue = true;
|
||||||
|
|||||||
@@ -47,6 +47,21 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
|
|||||||
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build();
|
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build();
|
||||||
|
|
||||||
cliOptions.add(new CliOption(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC).defaultValue("false"));
|
cliOptions.add(new CliOption(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC).defaultValue("false"));
|
||||||
|
// option to change how we process + set the data in the 'additionalProperties' keyword.
|
||||||
|
CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean(
|
||||||
|
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT,
|
||||||
|
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString());
|
||||||
|
Map<String, String> disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>();
|
||||||
|
disallowAdditionalPropertiesIfNotPresentOpts.put("false",
|
||||||
|
"The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");
|
||||||
|
disallowAdditionalPropertiesIfNotPresentOpts.put("true",
|
||||||
|
"when the 'additionalProperties' keyword is not present in a schema, " +
|
||||||
|
"the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. " +
|
||||||
|
"Note: this mode is not compliant with the JSON schema specification. " +
|
||||||
|
"This is the original openapi-generator behavior.");
|
||||||
|
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
|
||||||
|
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
|
||||||
|
this.setDisallowAdditionalPropertiesIfNotPresent(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -102,6 +117,11 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
|
|||||||
additionalProperties.put(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, useOneOfDiscriminatorLookup);
|
additionalProperties.put(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, useOneOfDiscriminatorLookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) {
|
||||||
|
this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.valueOf(additionalProperties
|
||||||
|
.get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUseOneOfDiscriminatorLookup(boolean useOneOfDiscriminatorLookup) {
|
public void setUseOneOfDiscriminatorLookup(boolean useOneOfDiscriminatorLookup) {
|
||||||
|
|||||||
@@ -501,6 +501,21 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
cliOptions.add(new CliOption("commonVerbs", "PS common verb mappings. e.g. Delete=Remove:Patch=Update to map Delete with Remove and Patch with Update accordingly."));
|
cliOptions.add(new CliOption("commonVerbs", "PS common verb mappings. e.g. Delete=Remove:Patch=Update to map Delete with Remove and Patch with Update accordingly."));
|
||||||
cliOptions.add(new CliOption(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC));
|
cliOptions.add(new CliOption(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC));
|
||||||
cliOptions.add(new CliOption("discardReadOnly", "Set discardReadonly to true to generate the Initialize cmdlet without readonly parameters"));
|
cliOptions.add(new CliOption("discardReadOnly", "Set discardReadonly to true to generate the Initialize cmdlet without readonly parameters"));
|
||||||
|
// option to change how we process + set the data in the 'additionalProperties' keyword.
|
||||||
|
CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean(
|
||||||
|
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT,
|
||||||
|
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString());
|
||||||
|
Map<String, String> disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>();
|
||||||
|
disallowAdditionalPropertiesIfNotPresentOpts.put("false",
|
||||||
|
"The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");
|
||||||
|
disallowAdditionalPropertiesIfNotPresentOpts.put("true",
|
||||||
|
"when the 'additionalProperties' keyword is not present in a schema, " +
|
||||||
|
"the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. " +
|
||||||
|
"Note: this mode is not compliant with the JSON schema specification. " +
|
||||||
|
"This is the original openapi-generator behavior.");
|
||||||
|
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
|
||||||
|
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
|
||||||
|
this.setDisallowAdditionalPropertiesIfNotPresent(true);
|
||||||
|
|
||||||
// default value in the template
|
// default value in the template
|
||||||
additionalProperties.put("powershellVersion", "6.2"); // minimal PS version
|
additionalProperties.put("powershellVersion", "6.2"); // minimal PS version
|
||||||
@@ -550,7 +565,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
public boolean getUseOneOfDiscriminatorLookup() {
|
public boolean getUseOneOfDiscriminatorLookup() {
|
||||||
return this.useOneOfDiscriminatorLookup;
|
return this.useOneOfDiscriminatorLookup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDiscardReadOnly(boolean discardReadOnly) {
|
public void setDiscardReadOnly(boolean discardReadOnly) {
|
||||||
this.discardReadOnly = discardReadOnly;
|
this.discardReadOnly = discardReadOnly;
|
||||||
}
|
}
|
||||||
@@ -632,6 +647,11 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
LOGGER.warn(CodegenConstants.API_PACKAGE + " with " + this.getName() + " generator is ignored. Setting this value independently of " + CodegenConstants.PACKAGE_NAME + " is not currently supported.");
|
LOGGER.warn(CodegenConstants.API_PACKAGE + " with " + this.getName() + " generator is ignored. Setting this value independently of " + CodegenConstants.PACKAGE_NAME + " is not currently supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) {
|
||||||
|
this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.valueOf(additionalProperties
|
||||||
|
.get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString()));
|
||||||
|
}
|
||||||
|
|
||||||
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage());
|
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage());
|
||||||
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage());
|
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage());
|
||||||
|
|
||||||
@@ -931,13 +951,13 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
|
|
||||||
for (CodegenProperty cp : model.allVars) {
|
for (CodegenProperty cp : model.allVars) {
|
||||||
cp.vendorExtensions.put("x-powershell-data-type", getPSDataType(cp));
|
cp.vendorExtensions.put("x-powershell-data-type", getPSDataType(cp));
|
||||||
if(this.discardReadOnly && !cp.isReadOnly) {
|
if (this.discardReadOnly && !cp.isReadOnly) {
|
||||||
lastWritableProperty = cp;
|
lastWritableProperty = cp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark the last readonly false property
|
// Mark the last readonly false property
|
||||||
if(this.discardReadOnly && lastWritableProperty != null) {
|
if (this.discardReadOnly && lastWritableProperty != null) {
|
||||||
lastWritableProperty.vendorExtensions.put("x-powershell-last-writable", true);
|
lastWritableProperty.vendorExtensions.put("x-powershell-last-writable", true);
|
||||||
model.allVars.set(model.allVars.indexOf(lastWritableProperty), lastWritableProperty);
|
model.allVars.set(model.allVars.indexOf(lastWritableProperty), lastWritableProperty);
|
||||||
}
|
}
|
||||||
@@ -1181,4 +1201,29 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
return escapeText(pattern);
|
return escapeText(pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toDefaultValue(Schema p) {
|
||||||
|
if (p.getDefault() != null) {
|
||||||
|
if (ModelUtils.isBooleanSchema(p)) {
|
||||||
|
if (Boolean.valueOf(p.getDefault().toString())) {
|
||||||
|
return "$true";
|
||||||
|
} else {
|
||||||
|
return "$false";
|
||||||
|
}
|
||||||
|
} else if (ModelUtils.isDateSchema(p)) {
|
||||||
|
LOGGER.warn("Default value for `date` not yet supported. Please open an issue with https://github.com/openapitools/openapi-generator");
|
||||||
|
} else if (ModelUtils.isDateTimeSchema(p)) {
|
||||||
|
LOGGER.warn("Default value for `datetime` not yet supported. Please open an issue with https://github.com/openapitools/openapi-generator");
|
||||||
|
} else if (ModelUtils.isNumberSchema(p)) {
|
||||||
|
return p.getDefault().toString();
|
||||||
|
} else if (ModelUtils.isIntegerSchema(p)) {
|
||||||
|
return p.getDefault().toString();
|
||||||
|
} else if (ModelUtils.isStringSchema(p)) {
|
||||||
|
return "\"" + p.getDefault() + "\"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,201 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.media.ArraySchema;
|
||||||
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
|
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
||||||
|
import org.openapitools.codegen.*;
|
||||||
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
// TODO rename AbstractTypeScriptClientCodegen to AbstractTypeScriptCodegen later
|
||||||
|
public class TypeScriptServerCodegen extends AbstractTypeScriptClientCodegen {
|
||||||
|
|
||||||
|
public static final String NPM_REPOSITORY = "npmRepository";
|
||||||
|
public static final String WITH_INTERFACES = "withInterfaces";
|
||||||
|
|
||||||
|
protected String npmRepository = null;
|
||||||
|
|
||||||
|
public TypeScriptServerCodegen() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
outputFolder = "generated-code/typescript-server";
|
||||||
|
embeddedTemplateDir = templateDir = "typescript-server";
|
||||||
|
|
||||||
|
this.apiPackage = "apis";
|
||||||
|
this.apiTemplateFiles.put("apis.mustache", ".ts");
|
||||||
|
this.modelPackage = "models";
|
||||||
|
this.modelTemplateFiles.put("models.mustache", ".ts");
|
||||||
|
|
||||||
|
this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
|
||||||
|
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "typescript-server";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getHelp() {
|
||||||
|
return "Generates a TypeScript server stub (beta).";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNpmRepository() {
|
||||||
|
return npmRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNpmRepository(String npmRepository) {
|
||||||
|
this.npmRepository = npmRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processOpts() {
|
||||||
|
super.processOpts();
|
||||||
|
additionalProperties.put("isOriginalModelPropertyNaming", getModelPropertyNaming().equals("original"));
|
||||||
|
additionalProperties.put("modelPropertyNaming", getModelPropertyNaming());
|
||||||
|
supportingFiles.add(new SupportingFile("index.mustache", "", "index.ts"));
|
||||||
|
supportingFiles.add(new SupportingFile("runtime.mustache", "", "runtime.ts"));
|
||||||
|
supportingFiles.add(new SupportingFile("apis.index.mustache", apiPackage().replace('.', File.separatorChar), "index.ts"));
|
||||||
|
supportingFiles.add(new SupportingFile("models.index.mustache", modelPackage().replace('.', File.separatorChar), "index.ts"));
|
||||||
|
supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json"));
|
||||||
|
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
|
||||||
|
if (additionalProperties.containsKey(NPM_NAME)) {
|
||||||
|
addNpmPackageGeneration();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDataTypeFile(final String dataType) {
|
||||||
|
return dataType != null && dataType.equals("Blob");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTypeDeclaration(Schema p) {
|
||||||
|
Schema inner;
|
||||||
|
if (ModelUtils.isArraySchema(p)) {
|
||||||
|
inner = ((ArraySchema) p).getItems();
|
||||||
|
return this.getSchemaType(p) + "<" + this.getTypeDeclaration(inner) + ">";
|
||||||
|
} else if (ModelUtils.isMapSchema(p)) {
|
||||||
|
inner = ModelUtils.getAdditionalProperties(p);
|
||||||
|
return "{ [key: string]: " + this.getTypeDeclaration(inner) + "; }";
|
||||||
|
} else if (ModelUtils.isFileSchema(p)) {
|
||||||
|
return "Blob";
|
||||||
|
} else if (ModelUtils.isBinarySchema(p)) {
|
||||||
|
return "Blob";
|
||||||
|
} else if (ModelUtils.isDateSchema(p)) {
|
||||||
|
return "Date";
|
||||||
|
} else if (ModelUtils.isDateTimeSchema(p)) {
|
||||||
|
return "Date";
|
||||||
|
}
|
||||||
|
return super.getTypeDeclaration(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
|
||||||
|
codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema));
|
||||||
|
addImport(codegenModel, codegenModel.additionalPropertiesType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
|
||||||
|
/* comment out the following as we're not sure if we need these in the TS Server generator
|
||||||
|
// process enum in models
|
||||||
|
List<Object> models = (List<Object>) postProcessModelsEnum(objs).get("models");
|
||||||
|
for (Object _mo : models) {
|
||||||
|
Map<String, Object> mo = (Map<String, Object>) _mo;
|
||||||
|
CodegenModel cm = (CodegenModel) mo.get("model");
|
||||||
|
cm.imports = new TreeSet(cm.imports);
|
||||||
|
// name enum with model name, e.g. StatusEnum => PetStatusEnum
|
||||||
|
for (CodegenProperty var : cm.vars) {
|
||||||
|
if (Boolean.TRUE.equals(var.isEnum)) {
|
||||||
|
// behaviour for enum names is specific for typescript to not use namespaces
|
||||||
|
var.datatypeWithEnum = var.datatypeWithEnum.replace(var.enumName, cm.classname + var.enumName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cm.parent != null) {
|
||||||
|
for (CodegenProperty var : cm.allVars) {
|
||||||
|
if (Boolean.TRUE.equals(var.isEnum)) {
|
||||||
|
var.datatypeWithEnum = var.datatypeWithEnum
|
||||||
|
.replace(var.enumName, cm.classname + var.enumName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
return objs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> postProcessAllModels(Map<String, Object> objs) {
|
||||||
|
Map<String, Object> result = super.postProcessAllModels(objs);
|
||||||
|
|
||||||
|
/* comment out the following as we're not sure if we need these in the TS Server generator
|
||||||
|
for (Map.Entry<String, Object> entry : result.entrySet()) {
|
||||||
|
Map<String, Object> inner = (Map<String, Object>) entry.getValue();
|
||||||
|
List<Map<String, Object>> models = (List<Map<String, Object>>) inner.get("models");
|
||||||
|
for (Map<String, Object> model : models) {
|
||||||
|
CodegenModel codegenModel = (CodegenModel) model.get("model");
|
||||||
|
model.put("hasImports", codegenModel.imports.size() > 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSchemaType(Schema p) {
|
||||||
|
String openAPIType = super.getSchemaType(p);
|
||||||
|
if (isLanguagePrimitive(openAPIType)) {
|
||||||
|
return openAPIType;
|
||||||
|
}
|
||||||
|
applyLocalTypeMapping(openAPIType);
|
||||||
|
return openAPIType;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String applyLocalTypeMapping(String type) {
|
||||||
|
if (typeMapping.containsKey(type)) {
|
||||||
|
type = typeMapping.get(type);
|
||||||
|
}
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isLanguagePrimitive(String type) {
|
||||||
|
return languageSpecificPrimitives.contains(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addNpmPackageGeneration() {
|
||||||
|
if (additionalProperties.containsKey(NPM_REPOSITORY)) {
|
||||||
|
this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Files for building our lib
|
||||||
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
|
supportingFiles.add(new SupportingFile("package.mustache", "", "package.json"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -888,7 +888,7 @@ public class ApiClient {
|
|||||||
* @param obj Object
|
* @param obj Object
|
||||||
* @param formParams Form parameters
|
* @param formParams Form parameters
|
||||||
* @param contentType Context type
|
* @param contentType Context type
|
||||||
* @param isBodyNulalble True if the body is nullable
|
* @param isBodyNullable True if the body is nullable
|
||||||
* @return String
|
* @return String
|
||||||
* @throws ApiException API exception
|
* @throws ApiException API exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import {{{invokerPackage}}}.ApiClient;
|
|||||||
import {{{invokerPackage}}}.ApiException;
|
import {{{invokerPackage}}}.ApiException;
|
||||||
import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}}
|
import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}}
|
||||||
import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}}
|
import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}}
|
||||||
import {{{invokerPackage}}}.models.*;
|
import {{{invokerPackage}}}.model.*;
|
||||||
import {{{package}}}.{{{classname}}};
|
import {{{package}}}.{{{classname}}};
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -127,3 +127,4 @@ org.openapitools.codegen.languages.TypeScriptJqueryClientCodegen
|
|||||||
org.openapitools.codegen.languages.TypeScriptNodeClientCodegen
|
org.openapitools.codegen.languages.TypeScriptNodeClientCodegen
|
||||||
org.openapitools.codegen.languages.TypeScriptReduxQueryClientCodegen
|
org.openapitools.codegen.languages.TypeScriptReduxQueryClientCodegen
|
||||||
org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen
|
org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen
|
||||||
|
org.openapitools.codegen.languages.TypeScriptServerCodegen
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
|
|||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
[{{vendorExtensions.x-powershell-data-type}}]
|
[{{vendorExtensions.x-powershell-data-type}}]
|
||||||
{{=<% %>=}}
|
{{=<% %>=}}
|
||||||
${<%name%>}<%^vendorExtensions.x-powershell-last-writable%>,<%/vendorExtensions.x-powershell-last-writable%>
|
${<%name%>}<%#defaultValue%> = <%&.%><%/defaultValue%><%^vendorExtensions.x-powershell-last-writable%>,<%/vendorExtensions.x-powershell-last-writable%>
|
||||||
<%={{ }}=%>
|
<%={{ }}=%>
|
||||||
{{/isReadOnly}}
|
{{/isReadOnly}}
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
@@ -59,7 +59,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
|
|||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
[{{vendorExtensions.x-powershell-data-type}}]
|
[{{vendorExtensions.x-powershell-data-type}}]
|
||||||
{{=<% %>=}}
|
{{=<% %>=}}
|
||||||
${<%name%>}<%^-last%>,<%/-last%>
|
${<%name%>}<%#defaultValue%> = <%&.%><%/defaultValue%><%^-last%>,<%/-last%>
|
||||||
<%={{ }}=%>
|
<%={{ }}=%>
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
{{/discardReadOnly}}
|
{{/discardReadOnly}}
|
||||||
|
|||||||
87
modules/openapi-generator/src/main/resources/typescript-server/README.mustache
vendored
Normal file
87
modules/openapi-generator/src/main/resources/typescript-server/README.mustache
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
## {{npmName}}@{{npmVersion}}
|
||||||
|
|
||||||
|
This generator creates TypeScript/JavaScript client that utilizes [RxJS](https://rxjs-dev.firebaseapp.com/). The generated Node module can be used in the following environments:
|
||||||
|
|
||||||
|
Environment
|
||||||
|
* Node.js
|
||||||
|
* Webpack
|
||||||
|
* Browserify
|
||||||
|
|
||||||
|
Language level
|
||||||
|
* ES5 - you must have a Promises/A+ library installed
|
||||||
|
* ES6
|
||||||
|
|
||||||
|
Module system
|
||||||
|
* CommonJS
|
||||||
|
* ES6 module system
|
||||||
|
|
||||||
|
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
|
||||||
|
|
||||||
|
### Building
|
||||||
|
|
||||||
|
To build and compile the typescript sources to javascript use:
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Publishing
|
||||||
|
|
||||||
|
First build the package then run `npm publish`
|
||||||
|
|
||||||
|
### Consuming
|
||||||
|
|
||||||
|
navigate to the folder of your consuming project and run one of the following commands.
|
||||||
|
|
||||||
|
_published:_
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install {{npmName}}@{{npmVersion}} --save
|
||||||
|
```
|
||||||
|
|
||||||
|
_unPublished (not recommended):_
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
||||||
|
```
|
||||||
|
|
||||||
|
### How to apply middleware
|
||||||
|
|
||||||
|
First, add a singleton class that extends the generated `Configuration` class.
|
||||||
|
|
||||||
|
```
|
||||||
|
export class AuthInterceptor extends Configuration {
|
||||||
|
private static config: AuthInterceptor;
|
||||||
|
|
||||||
|
private constructor() {
|
||||||
|
const middleware: Middleware[] = [
|
||||||
|
{
|
||||||
|
pre(request: RequestArgs): RequestArgs {
|
||||||
|
const token = getAuthToken();
|
||||||
|
|
||||||
|
return {
|
||||||
|
...request,
|
||||||
|
headers: {
|
||||||
|
...request.headers,
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
super({ middleware });
|
||||||
|
}
|
||||||
|
|
||||||
|
public static get Instance() {
|
||||||
|
return AuthInterceptor.config || (AuthInterceptor.config = new this());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, pass it to the generated api controller.
|
||||||
|
|
||||||
|
```
|
||||||
|
const api = new StoreApi(AuthInterceptor.Instance);
|
||||||
|
|
||||||
|
```
|
||||||
7
modules/openapi-generator/src/main/resources/typescript-server/apis.index.mustache
vendored
Normal file
7
modules/openapi-generator/src/main/resources/typescript-server/apis.index.mustache
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{{#apiInfo}}
|
||||||
|
{{#apis}}
|
||||||
|
{{#operations}}
|
||||||
|
export * from './{{ classFilename }}';
|
||||||
|
{{/operations}}
|
||||||
|
{{/apis}}
|
||||||
|
{{/apiInfo}}
|
||||||
204
modules/openapi-generator/src/main/resources/typescript-server/apis.mustache
vendored
Normal file
204
modules/openapi-generator/src/main/resources/typescript-server/apis.mustache
vendored
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
// tslint:disable
|
||||||
|
{{>licenseInfo}}
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { BaseAPI{{#hasHttpHeaders}}, HttpHeaders{{/hasHttpHeaders}}{{#hasQueryParams}}, HttpQuery{{/hasQueryParams}}{{#hasRequiredParameters}}, throwIfRequired{{/hasRequiredParameters}}{{#hasPathParams}}, encodeURI{{/hasPathParams}}{{#hasListContainers}}, COLLECTION_FORMATS{{/hasListContainers}} } from '../runtime';
|
||||||
|
{{#imports.0}}
|
||||||
|
import {
|
||||||
|
{{#imports}}
|
||||||
|
{{className}},
|
||||||
|
{{/imports}}
|
||||||
|
} from '../models';
|
||||||
|
{{/imports.0}}
|
||||||
|
|
||||||
|
{{#operations}}
|
||||||
|
{{#operation}}
|
||||||
|
{{#allParams.0}}
|
||||||
|
export interface {{operationIdCamelCase}}Request {
|
||||||
|
{{#allParams}}
|
||||||
|
{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}};
|
||||||
|
{{/allParams}}
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/allParams.0}}
|
||||||
|
{{/operation}}
|
||||||
|
{{/operations}}
|
||||||
|
{{#operations}}
|
||||||
|
/**
|
||||||
|
* {{#description}}{{{description}}}{{/description}}{{^description}}no description{{/description}}
|
||||||
|
*/
|
||||||
|
export class {{classname}} extends BaseAPI {
|
||||||
|
|
||||||
|
{{#operation}}
|
||||||
|
/**
|
||||||
|
{{#notes}}
|
||||||
|
* {{¬es}}
|
||||||
|
{{/notes}}
|
||||||
|
{{#summary}}
|
||||||
|
* {{&summary}}
|
||||||
|
{{/summary}}
|
||||||
|
*/
|
||||||
|
{{nickname}} = ({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request{{/allParams.0}}): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> => {
|
||||||
|
{{#hasParams}}
|
||||||
|
{{#allParams}}
|
||||||
|
{{#required}}
|
||||||
|
throwIfRequired(requestParameters, '{{paramName}}', '{{nickname}}');
|
||||||
|
{{/required}}
|
||||||
|
{{/allParams}}
|
||||||
|
|
||||||
|
{{/hasParams}}
|
||||||
|
{{#hasHttpHeaders}}
|
||||||
|
const headers: HttpHeaders = {
|
||||||
|
{{#bodyParam}}
|
||||||
|
{{^consumes}}
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
{{/consumes}}
|
||||||
|
{{#consumes.0}}
|
||||||
|
'Content-Type': '{{{mediaType}}}',
|
||||||
|
{{/consumes.0}}
|
||||||
|
{{/bodyParam}}
|
||||||
|
{{#headerParams}}
|
||||||
|
{{#isListContainer}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])) }),
|
||||||
|
{{/isListContainer}}
|
||||||
|
{{^isListContainer}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': String(requestParameters.{{paramName}}) }),
|
||||||
|
{{/isListContainer}}
|
||||||
|
{{/headerParams}}
|
||||||
|
{{#authMethods}}
|
||||||
|
{{#isBasic}}
|
||||||
|
...(this.configuration.username && this.configuration.password && { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` }),
|
||||||
|
{{/isBasic}}
|
||||||
|
{{#isApiKey}}
|
||||||
|
{{#isKeyInHeader}}
|
||||||
|
...(this.configuration.apiKey && { '{{keyParamName}}': this.configuration.apiKey('{{keyParamName}}') }), // {{name}} authentication
|
||||||
|
{{/isKeyInHeader}}
|
||||||
|
{{/isApiKey}}
|
||||||
|
{{#isOAuth}}
|
||||||
|
// oauth required
|
||||||
|
...(this.configuration.accessToken && {
|
||||||
|
Authorization: this.configuration.accessToken && (typeof this.configuration.accessToken === 'function'
|
||||||
|
? this.configuration.accessToken('{{name}}', [{{#scopes}}'{{{scope}}}'{{^-last}}, {{/-last}}{{/scopes}}])
|
||||||
|
: this.configuration.accessToken)
|
||||||
|
}),
|
||||||
|
{{/isOAuth}}
|
||||||
|
{{/authMethods}}
|
||||||
|
};
|
||||||
|
|
||||||
|
{{/hasHttpHeaders}}
|
||||||
|
{{#hasQueryParams}}
|
||||||
|
const query: HttpQuery = {
|
||||||
|
{{#queryParams}}
|
||||||
|
{{#isListContainer}}
|
||||||
|
{{#isCollectionFormatMulti}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}} }),
|
||||||
|
{{/isCollectionFormatMulti}}
|
||||||
|
{{^isCollectionFormatMulti}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']) }),
|
||||||
|
{{/isCollectionFormatMulti}}
|
||||||
|
{{/isListContainer}}
|
||||||
|
{{^isListContainer}}
|
||||||
|
{{#isDateTime}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': (requestParameters.{{paramName}} as any).toISOString() }),
|
||||||
|
{{/isDateTime}}
|
||||||
|
{{^isDateTime}}
|
||||||
|
{{#isDate}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': (requestParameters.{{paramName}} as any).toISOString() }),
|
||||||
|
{{/isDate}}
|
||||||
|
{{^isDate}}
|
||||||
|
...(requestParameters.{{paramName}} && { '{{baseName}}': requestParameters.{{paramName}} }),
|
||||||
|
{{/isDate}}
|
||||||
|
{{/isDateTime}}
|
||||||
|
{{/isListContainer}}
|
||||||
|
{{/queryParams}}
|
||||||
|
{{#authMethods}}
|
||||||
|
{{#isApiKey}}
|
||||||
|
{{#isKeyInQuery}}
|
||||||
|
...(this.configuration.apiKey && { '{{keyParamName}}': this.configuration.apiKey && this.configuration.apiKey('{{keyParamName}}') }), // {{name}} authentication
|
||||||
|
{{/isKeyInQuery}}
|
||||||
|
{{/isApiKey}}
|
||||||
|
{{/authMethods}}
|
||||||
|
};
|
||||||
|
|
||||||
|
{{/hasQueryParams}}
|
||||||
|
{{#hasFormParams}}
|
||||||
|
const formData = new FormData();
|
||||||
|
{{/hasFormParams}}
|
||||||
|
{{#formParams}}
|
||||||
|
{{#isListContainer}}
|
||||||
|
if (requestParameters.{{paramName}}) {
|
||||||
|
{{#isCollectionFormatMulti}}
|
||||||
|
requestParameters.{{paramName}}.forEach((element) => {
|
||||||
|
formData.append('{{baseName}}', element as any);
|
||||||
|
})
|
||||||
|
{{/isCollectionFormatMulti}}
|
||||||
|
{{^isCollectionFormatMulti}}
|
||||||
|
formData.append('{{baseName}}', requestParameters.{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']));
|
||||||
|
{{/isCollectionFormatMulti}}
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/isListContainer}}
|
||||||
|
{{^isListContainer}}
|
||||||
|
if (requestParameters.{{paramName}} !== undefined) {
|
||||||
|
formData.append('{{baseName}}', requestParameters.{{paramName}} as any);
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/isListContainer}}
|
||||||
|
{{/formParams}}
|
||||||
|
return this.request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>({
|
||||||
|
path: '{{{path}}}'{{#pathParams}}.replace({{=<% %>=}}'{<%baseName%>}'<%={{ }}=%>, encodeURI(requestParameters.{{paramName}})){{/pathParams}},
|
||||||
|
method: '{{httpMethod}}',
|
||||||
|
{{#hasHttpHeaders}}
|
||||||
|
headers,
|
||||||
|
{{/hasHttpHeaders}}
|
||||||
|
{{#hasQueryParams}}
|
||||||
|
query,
|
||||||
|
{{/hasQueryParams}}
|
||||||
|
{{#hasBodyParam}}
|
||||||
|
{{#bodyParam}}
|
||||||
|
{{#isContainer}}
|
||||||
|
body: requestParameters.{{paramName}},
|
||||||
|
{{/isContainer}}
|
||||||
|
{{^isContainer}}
|
||||||
|
{{^isPrimitiveType}}
|
||||||
|
body: requestParameters.{{paramName}},
|
||||||
|
{{/isPrimitiveType}}
|
||||||
|
{{#isPrimitiveType}}
|
||||||
|
body: requestParameters.{{paramName}} as any,
|
||||||
|
{{/isPrimitiveType}}
|
||||||
|
{{/isContainer}}
|
||||||
|
{{/bodyParam}}
|
||||||
|
{{/hasBodyParam}}
|
||||||
|
{{#hasFormParams}}
|
||||||
|
body: formData,
|
||||||
|
{{/hasFormParams}}
|
||||||
|
{{#isResponseFile}}
|
||||||
|
responseType: 'blob'
|
||||||
|
{{/isResponseFile}}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
{{/operation}}
|
||||||
|
}
|
||||||
|
{{/operations}}
|
||||||
|
{{#hasEnums}}
|
||||||
|
|
||||||
|
{{#operations}}
|
||||||
|
{{#operation}}
|
||||||
|
{{#allParams}}
|
||||||
|
{{#isEnum}}
|
||||||
|
/**
|
||||||
|
* @export
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
export enum {{operationIdCamelCase}}{{enumName}} {
|
||||||
|
{{#allowableValues}}
|
||||||
|
{{#enumVars}}
|
||||||
|
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
||||||
|
{{/enumVars}}
|
||||||
|
{{/allowableValues}}
|
||||||
|
}
|
||||||
|
{{/isEnum}}
|
||||||
|
{{/allParams}}
|
||||||
|
{{/operation}}
|
||||||
|
{{/operations}}
|
||||||
|
{{/hasEnums}}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
wwwroot/*.js
|
||||||
|
node_modules
|
||||||
|
typings
|
||||||
|
dist
|
||||||
3
modules/openapi-generator/src/main/resources/typescript-server/index.mustache
vendored
Normal file
3
modules/openapi-generator/src/main/resources/typescript-server/index.mustache
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export * from './runtime';
|
||||||
|
export * from './apis';
|
||||||
|
export * from './models';
|
||||||
11
modules/openapi-generator/src/main/resources/typescript-server/licenseInfo.mustache
vendored
Normal file
11
modules/openapi-generator/src/main/resources/typescript-server/licenseInfo.mustache
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* {{{appName}}}
|
||||||
|
* {{{appDescription}}}
|
||||||
|
*
|
||||||
|
* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
|
||||||
|
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
12
modules/openapi-generator/src/main/resources/typescript-server/modelEnum.mustache
vendored
Normal file
12
modules/openapi-generator/src/main/resources/typescript-server/modelEnum.mustache
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* {{{description}}}
|
||||||
|
* @export
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
export enum {{classname}} {
|
||||||
|
{{#allowableValues}}
|
||||||
|
{{#enumVars}}
|
||||||
|
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
||||||
|
{{/enumVars}}
|
||||||
|
{{/allowableValues}}
|
||||||
|
}
|
||||||
43
modules/openapi-generator/src/main/resources/typescript-server/modelGeneric.mustache
vendored
Normal file
43
modules/openapi-generator/src/main/resources/typescript-server/modelGeneric.mustache
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{{#hasImports}}
|
||||||
|
import {
|
||||||
|
{{#imports}}
|
||||||
|
{{{.}}},
|
||||||
|
{{/imports}}
|
||||||
|
} from './';
|
||||||
|
|
||||||
|
{{/hasImports}}
|
||||||
|
/**{{#description}}
|
||||||
|
* {{{description}}}{{/description}}
|
||||||
|
* @export
|
||||||
|
* @interface {{classname}}
|
||||||
|
*/
|
||||||
|
export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
|
||||||
|
{{#additionalPropertiesType}}
|
||||||
|
[key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}};
|
||||||
|
{{/additionalPropertiesType}}
|
||||||
|
{{#vars}}
|
||||||
|
/**{{#description}}
|
||||||
|
* {{{description}}}{{/description}}
|
||||||
|
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
|
||||||
|
* @memberof {{classname}}
|
||||||
|
*/
|
||||||
|
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
|
||||||
|
{{/vars}}
|
||||||
|
}{{#hasEnums}}
|
||||||
|
|
||||||
|
{{#vars}}
|
||||||
|
{{#isEnum}}
|
||||||
|
/**
|
||||||
|
* @export
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
export enum {{classname}}{{enumName}} {
|
||||||
|
{{#allowableValues}}
|
||||||
|
{{#enumVars}}
|
||||||
|
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
||||||
|
{{/enumVars}}
|
||||||
|
{{/allowableValues}}
|
||||||
|
}
|
||||||
|
{{/isEnum}}
|
||||||
|
{{/vars}}
|
||||||
|
{{/hasEnums}}
|
||||||
14
modules/openapi-generator/src/main/resources/typescript-server/modelOneOf.mustache
vendored
Normal file
14
modules/openapi-generator/src/main/resources/typescript-server/modelOneOf.mustache
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{{#hasImports}}
|
||||||
|
import {
|
||||||
|
{{#imports}}
|
||||||
|
{{{.}}},
|
||||||
|
{{/imports}}
|
||||||
|
} from './';
|
||||||
|
|
||||||
|
{{/hasImports}}
|
||||||
|
/**
|
||||||
|
* @type {{classname}}{{#description}}
|
||||||
|
* {{{description}}}{{/description}}
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}};
|
||||||
5
modules/openapi-generator/src/main/resources/typescript-server/models.index.mustache
vendored
Normal file
5
modules/openapi-generator/src/main/resources/typescript-server/models.index.mustache
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{{#models}}
|
||||||
|
{{#model}}
|
||||||
|
export * from './{{{ classFilename }}}';
|
||||||
|
{{/model}}
|
||||||
|
{{/models}}
|
||||||
7
modules/openapi-generator/src/main/resources/typescript-server/models.mustache
vendored
Normal file
7
modules/openapi-generator/src/main/resources/typescript-server/models.mustache
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// tslint:disable
|
||||||
|
{{>licenseInfo}}
|
||||||
|
{{#models}}
|
||||||
|
{{#model}}
|
||||||
|
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^isEnum}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/isEnum}}
|
||||||
|
{{/model}}
|
||||||
|
{{/models}}
|
||||||
23
modules/openapi-generator/src/main/resources/typescript-server/package.mustache
vendored
Normal file
23
modules/openapi-generator/src/main/resources/typescript-server/package.mustache
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "{{npmName}}",
|
||||||
|
"version": "{{npmVersion}}",
|
||||||
|
"description": "OpenAPI client for {{npmName}}",
|
||||||
|
"author": "OpenAPI-Generator",
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"typings": "./dist/index.d.ts",
|
||||||
|
"scripts" : {
|
||||||
|
"build": "tsc --outDir dist/",
|
||||||
|
"prepare": "npm run build"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"rxjs": "^6.3.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^3.0.1"
|
||||||
|
}{{#npmRepository}},{{/npmRepository}}
|
||||||
|
{{#npmRepository}}
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "{{npmRepository}}"
|
||||||
|
}
|
||||||
|
{{/npmRepository}}
|
||||||
|
}
|
||||||
183
modules/openapi-generator/src/main/resources/typescript-server/runtime.mustache
vendored
Normal file
183
modules/openapi-generator/src/main/resources/typescript-server/runtime.mustache
vendored
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
// tslint:disable
|
||||||
|
{{>licenseInfo}}
|
||||||
|
import { Observable, of } from 'rxjs';
|
||||||
|
import { ajax, AjaxRequest, AjaxResponse } from 'rxjs/ajax';
|
||||||
|
import { map, concatMap } from 'rxjs/operators';
|
||||||
|
|
||||||
|
export const BASE_PATH = '{{{basePath}}}'.replace(/\/+$/, '');
|
||||||
|
|
||||||
|
export interface ConfigurationParameters {
|
||||||
|
basePath?: string; // override base path
|
||||||
|
middleware?: Middleware[]; // middleware to apply before/after rxjs requests
|
||||||
|
username?: string; // parameter for basic security
|
||||||
|
password?: string; // parameter for basic security
|
||||||
|
apiKey?: string | ((name: string) => string); // parameter for apiKey security
|
||||||
|
accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Configuration {
|
||||||
|
constructor(private configuration: ConfigurationParameters = {}) {}
|
||||||
|
|
||||||
|
get basePath(): string {
|
||||||
|
return this.configuration.basePath || BASE_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
|
get middleware(): Middleware[] {
|
||||||
|
return this.configuration.middleware || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
get username(): string | undefined {
|
||||||
|
return this.configuration.username;
|
||||||
|
}
|
||||||
|
|
||||||
|
get password(): string | undefined {
|
||||||
|
return this.configuration.password;
|
||||||
|
}
|
||||||
|
|
||||||
|
get apiKey(): ((name: string) => string) | undefined {
|
||||||
|
const apiKey = this.configuration.apiKey;
|
||||||
|
if (apiKey) {
|
||||||
|
return typeof apiKey === 'function' ? apiKey : () => apiKey;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
get accessToken(): ((name: string, scopes?: string[]) => string) | undefined {
|
||||||
|
const accessToken = this.configuration.accessToken;
|
||||||
|
if (accessToken) {
|
||||||
|
return typeof accessToken === 'function' ? accessToken : () => accessToken;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the base class for all generated API classes.
|
||||||
|
*/
|
||||||
|
export class BaseAPI {
|
||||||
|
private middleware: Middleware[] = [];
|
||||||
|
|
||||||
|
constructor(protected configuration = new Configuration()) {
|
||||||
|
this.middleware = configuration.middleware;
|
||||||
|
}
|
||||||
|
|
||||||
|
withMiddleware = <T extends BaseAPI>(middlewares: Middleware[]) => {
|
||||||
|
const next = this.clone<T>();
|
||||||
|
next.middleware = next.middleware.concat(middlewares);
|
||||||
|
return next;
|
||||||
|
};
|
||||||
|
|
||||||
|
withPreMiddleware = <T extends BaseAPI>(preMiddlewares: Array<Middleware['pre']>) =>
|
||||||
|
this.withMiddleware<T>(preMiddlewares.map((pre) => ({ pre })));
|
||||||
|
|
||||||
|
withPostMiddleware = <T extends BaseAPI>(postMiddlewares: Array<Middleware['post']>) =>
|
||||||
|
this.withMiddleware<T>(postMiddlewares.map((post) => ({ post })));
|
||||||
|
|
||||||
|
protected request = <T>(requestOpts: RequestOpts): Observable<T> =>
|
||||||
|
this.rxjsRequest(this.createRequestArgs(requestOpts)).pipe(
|
||||||
|
map((res) => {
|
||||||
|
if (res.status >= 200 && res.status < 300) {
|
||||||
|
return res.response as T;
|
||||||
|
}
|
||||||
|
throw res;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
private createRequestArgs = (requestOpts: RequestOpts): RequestArgs => {
|
||||||
|
let url = this.configuration.basePath + requestOpts.path;
|
||||||
|
if (requestOpts.query !== undefined && Object.keys(requestOpts.query).length !== 0) {
|
||||||
|
// only add the queryString to the URL if there are query parameters.
|
||||||
|
// this is done to avoid urls ending with a '?' character which buggy webservers
|
||||||
|
// do not handle correctly sometimes.
|
||||||
|
url += '?' + queryString(requestOpts.query);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
url,
|
||||||
|
method: requestOpts.method,
|
||||||
|
headers: requestOpts.headers,
|
||||||
|
body: requestOpts.body instanceof FormData ? requestOpts.body : JSON.stringify(requestOpts.body),
|
||||||
|
responseType: requestOpts.responseType || 'json',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private rxjsRequest = (params: RequestArgs): Observable<AjaxResponse> =>
|
||||||
|
of(params).pipe(
|
||||||
|
map((request) => {
|
||||||
|
this.middleware.filter((item) => item.pre).forEach((mw) => (request = mw.pre!(request)));
|
||||||
|
return request;
|
||||||
|
}),
|
||||||
|
concatMap((args) =>
|
||||||
|
ajax(args).pipe(
|
||||||
|
map((response) => {
|
||||||
|
this.middleware.filter((item) => item.post).forEach((mw) => (response = mw.post!(response)));
|
||||||
|
return response;
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a shallow clone of `this` by constructing a new instance
|
||||||
|
* and then shallow cloning data members.
|
||||||
|
*/
|
||||||
|
private clone = <T extends BaseAPI>(): T =>
|
||||||
|
Object.assign(Object.create(Object.getPrototypeOf(this)), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
// export for not being a breaking change
|
||||||
|
export class RequiredError extends Error {
|
||||||
|
name: 'RequiredError' = 'RequiredError';
|
||||||
|
}
|
||||||
|
|
||||||
|
export const COLLECTION_FORMATS = {
|
||||||
|
csv: ',',
|
||||||
|
ssv: ' ',
|
||||||
|
tsv: '\t',
|
||||||
|
pipes: '|',
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Json = any;
|
||||||
|
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||||
|
export type HttpHeaders = { [key: string]: string };
|
||||||
|
export type HttpQuery = Partial<{ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> }>; // partial is needed for strict mode
|
||||||
|
export type HttpBody = Json | FormData;
|
||||||
|
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
||||||
|
|
||||||
|
export interface RequestOpts {
|
||||||
|
path: string;
|
||||||
|
method: HttpMethod;
|
||||||
|
headers?: HttpHeaders;
|
||||||
|
query?: HttpQuery;
|
||||||
|
body?: HttpBody;
|
||||||
|
responseType?: 'json' | 'blob' | 'arraybuffer' | 'text';
|
||||||
|
}
|
||||||
|
|
||||||
|
export const encodeURI = (value: any) => encodeURIComponent(String(value));
|
||||||
|
|
||||||
|
const queryString = (params: HttpQuery): string => Object.keys(params)
|
||||||
|
.map((key) => {
|
||||||
|
const value = params[key];
|
||||||
|
return (value instanceof Array)
|
||||||
|
? value.map((val) => `${encodeURI(key)}=${encodeURI(val)}`).join('&')
|
||||||
|
: `${encodeURI(key)}=${encodeURI(value)}`;
|
||||||
|
})
|
||||||
|
.join('&');
|
||||||
|
|
||||||
|
// alias fallback for not being a breaking change
|
||||||
|
export const querystring = queryString;
|
||||||
|
|
||||||
|
export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => {
|
||||||
|
if (!params || params[key] === null || params[key] === undefined) {
|
||||||
|
throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// alias for easier importing
|
||||||
|
export interface RequestArgs extends AjaxRequest {}
|
||||||
|
export interface ResponseArgs extends AjaxResponse {}
|
||||||
|
|
||||||
|
export interface Middleware {
|
||||||
|
pre?(request: RequestArgs): RequestArgs;
|
||||||
|
post?(response: ResponseArgs): ResponseArgs;
|
||||||
|
}
|
||||||
23
modules/openapi-generator/src/main/resources/typescript-server/tsconfig.mustache
vendored
Normal file
23
modules/openapi-generator/src/main/resources/typescript-server/tsconfig.mustache
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}",
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"outDir": "dist",
|
||||||
|
"rootDir": ".",
|
||||||
|
{{^supportsES6}}
|
||||||
|
"lib": [
|
||||||
|
"es6",
|
||||||
|
"dom"
|
||||||
|
],
|
||||||
|
{{/supportsES6}}
|
||||||
|
"typeRoots": [
|
||||||
|
"node_modules/@types"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"dist",
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -843,91 +843,108 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
'400':
|
'400':
|
||||||
description: Someting wrong
|
description: Someting wrong
|
||||||
/fake/outer/number:
|
/fake/refs/number:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer number types
|
description: Test serialization of outer number types
|
||||||
operationId: fakeOuterNumberSerialize
|
operationId: NumberWithValidations
|
||||||
parameters:
|
parameters:
|
||||||
- name: body
|
- name: body
|
||||||
in: body
|
in: body
|
||||||
description: Input number as post body
|
description: Input number as post body
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterNumber'
|
$ref: '#/definitions/NumberWithValidations'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output number
|
description: Output number
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterNumber'
|
$ref: '#/definitions/NumberWithValidations'
|
||||||
/fake/outer/string:
|
/fake/refs/string:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer string types
|
description: Test serialization of outer string types
|
||||||
operationId: fakeOuterStringSerialize
|
operationId: String
|
||||||
parameters:
|
parameters:
|
||||||
- name: body
|
- name: body
|
||||||
in: body
|
in: body
|
||||||
description: Input string as post body
|
description: Input string as post body
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterString'
|
$ref: '#/definitions/String'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output string
|
description: Output string
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterString'
|
$ref: '#/definitions/String'
|
||||||
/fake/outer/boolean:
|
/fake/refs/boolean:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer boolean types
|
description: Test serialization of outer boolean types
|
||||||
operationId: fakeOuterBooleanSerialize
|
operationId: Boolean
|
||||||
parameters:
|
parameters:
|
||||||
- name: body
|
- name: body
|
||||||
in: body
|
in: body
|
||||||
description: Input boolean as post body
|
description: Input boolean as post body
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterBoolean'
|
$ref: '#/definitions/Boolean'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output boolean
|
description: Output boolean
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterBoolean'
|
$ref: '#/definitions/Boolean'
|
||||||
/fake/outer/composite:
|
/fake/refs/arraymodel:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of object with outer number type
|
description: Test serialization of ArrayModel
|
||||||
operationId: fakeOuterCompositeSerialize
|
operationId: ArrayModel
|
||||||
parameters:
|
parameters:
|
||||||
- name: body
|
- name: body
|
||||||
in: body
|
in: body
|
||||||
description: Input composite as post body
|
description: Input model
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterComposite'
|
$ref: '#/definitions/AnimalFarm'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output composite
|
description: Output model
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterComposite'
|
$ref: '#/definitions/AnimalFarm'
|
||||||
/fake/outer/enum:
|
/fake/refs/object_model_with_ref_props:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of object with $refed properties
|
||||||
|
operationId: ObjectModelWithRefProps
|
||||||
|
parameters:
|
||||||
|
- name: body
|
||||||
|
in: body
|
||||||
|
description: Input model
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ObjectModelWithRefProps'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output model
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ObjectModelWithRefProps'
|
||||||
|
/fake/refs/enum:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer enum
|
description: Test serialization of outer enum
|
||||||
operationId: fakeOuterEnumSerialize
|
operationId: StringEnum
|
||||||
parameters:
|
parameters:
|
||||||
- name: body
|
- name: body
|
||||||
in: body
|
in: body
|
||||||
description: Input enum as post body
|
description: Input enum
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterEnum'
|
$ref: '#/definitions/StringEnum'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output enum
|
description: Output enum
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/OuterEnum'
|
$ref: '#/definitions/StringEnum'
|
||||||
/fake/jsonFormData:
|
/fake/jsonFormData:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -1475,8 +1492,8 @@ definitions:
|
|||||||
enum:
|
enum:
|
||||||
- 1.1
|
- 1.1
|
||||||
- -1.2
|
- -1.2
|
||||||
outerEnum:
|
stringEnum:
|
||||||
$ref: '#/definitions/OuterEnum'
|
$ref: '#/definitions/StringEnum'
|
||||||
AdditionalPropertiesClass:
|
AdditionalPropertiesClass:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -1743,28 +1760,29 @@ definitions:
|
|||||||
# enum:
|
# enum:
|
||||||
# - Cat
|
# - Cat
|
||||||
# - Dog
|
# - Dog
|
||||||
OuterEnum:
|
StringEnum:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- "placed"
|
- "placed"
|
||||||
- "approved"
|
- "approved"
|
||||||
- "delivered"
|
- "delivered"
|
||||||
OuterComposite:
|
ObjectModelWithRefProps:
|
||||||
|
description: a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
my_number:
|
my_number:
|
||||||
$ref: '#/definitions/OuterNumber'
|
$ref: '#/definitions/NumberWithValidations'
|
||||||
my_string:
|
my_string:
|
||||||
$ref: '#/definitions/OuterString'
|
$ref: '#/definitions/String'
|
||||||
my_boolean:
|
my_boolean:
|
||||||
$ref: '#/definitions/OuterBoolean'
|
$ref: '#/definitions/Boolean'
|
||||||
OuterNumber:
|
NumberWithValidations:
|
||||||
type: number
|
type: number
|
||||||
minimum: 10
|
minimum: 10
|
||||||
maximum: 20
|
maximum: 20
|
||||||
OuterString:
|
String:
|
||||||
type: string
|
type: string
|
||||||
OuterBoolean:
|
Boolean:
|
||||||
type: boolean
|
type: boolean
|
||||||
x-codegen-body-parameter-name: boolean_post_body
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
StringBooleanMap:
|
StringBooleanMap:
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ paths:
|
|||||||
$ref: '#/components/schemas/Foo'
|
$ref: '#/components/schemas/Foo'
|
||||||
/pet:
|
/pet:
|
||||||
servers:
|
servers:
|
||||||
- url: 'http://petstore.swagger.io/v2'
|
- url: 'http://petstore.swagger.io/v2'
|
||||||
- url: 'http://path-server-test.petstore.local/v2'
|
- url: 'http://path-server-test.petstore.local/v2'
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
@@ -822,82 +822,171 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
'400':
|
'400':
|
||||||
description: Someting wrong
|
description: Someting wrong
|
||||||
/fake/outer/number:
|
/fake/refs/number:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer number types
|
description: Test serialization of outer number types
|
||||||
operationId: fakeOuterNumberSerialize
|
operationId: NumberWithValidations
|
||||||
|
requestBody:
|
||||||
|
description: Input number as post body
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/NumberWithValidations'
|
||||||
|
required: false
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output number
|
description: Output number
|
||||||
content:
|
content:
|
||||||
'*/*':
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/OuterNumber'
|
$ref: '#/components/schemas/NumberWithValidations'
|
||||||
requestBody:
|
/fake/refs/string:
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OuterNumber'
|
|
||||||
description: Input number as post body
|
|
||||||
/fake/outer/string:
|
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer string types
|
description: Test serialization of outer string types
|
||||||
operationId: fakeOuterStringSerialize
|
operationId: String
|
||||||
|
requestBody:
|
||||||
|
description: Input string as post body
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/String'
|
||||||
|
required: false
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output string
|
description: Output string
|
||||||
content:
|
content:
|
||||||
'*/*':
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/OuterString'
|
$ref: '#/components/schemas/String'
|
||||||
requestBody:
|
x-codegen-request-body-name: body
|
||||||
content:
|
/fake/refs/boolean:
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OuterString'
|
|
||||||
description: Input string as post body
|
|
||||||
/fake/outer/boolean:
|
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of outer boolean types
|
description: Test serialization of outer boolean types
|
||||||
operationId: fakeOuterBooleanSerialize
|
operationId: Boolean
|
||||||
|
requestBody:
|
||||||
|
description: Input boolean as post body
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Boolean'
|
||||||
|
required: false
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Output boolean
|
description: Output boolean
|
||||||
content:
|
content:
|
||||||
'*/*':
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/OuterBoolean'
|
$ref: '#/components/schemas/Boolean'
|
||||||
requestBody:
|
x-codegen-request-body-name: body
|
||||||
content:
|
/fake/refs/arraymodel:
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OuterBoolean'
|
|
||||||
description: Input boolean as post body
|
|
||||||
/fake/outer/composite:
|
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
description: Test serialization of object with outer number type
|
description: Test serialization of ArrayModel
|
||||||
operationId: fakeOuterCompositeSerialize
|
operationId: ArrayModel
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Output composite
|
|
||||||
content:
|
|
||||||
'*/*':
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OuterComposite'
|
|
||||||
requestBody:
|
requestBody:
|
||||||
|
description: Input model
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/OuterComposite'
|
$ref: '#/components/schemas/AnimalFarm'
|
||||||
description: Input composite as post body
|
required: false
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output model
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AnimalFarm'
|
||||||
|
x-codegen-request-body-name: body
|
||||||
|
/fake/refs/object_model_with_ref_props:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of object with $refed properties
|
||||||
|
operationId: ObjectModelWithRefProps
|
||||||
|
requestBody:
|
||||||
|
description: Input model
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ObjectModelWithRefProps'
|
||||||
|
required: false
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output model
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ObjectModelWithRefProps'
|
||||||
|
x-codegen-request-body-name: body
|
||||||
|
/fake/refs/enum:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
description: Test serialization of outer enum
|
||||||
|
operationId: StringEnum
|
||||||
|
requestBody:
|
||||||
|
description: Input enum
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnum'
|
||||||
|
required: false
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Output enum
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnum'
|
||||||
|
x-codegen-request-body-name: body
|
||||||
|
/fake/refs/array-of-enums:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
summary: Array of Enums
|
||||||
|
operationId: ArrayOfEnums
|
||||||
|
requestBody:
|
||||||
|
description: Input enum
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ArrayOfEnums'
|
||||||
|
required: false
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Got named array of enums
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ArrayOfEnums'
|
||||||
|
/fake/additional-properties-with-array-of-enums:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
summary: Additional Properties with Array of Enums
|
||||||
|
operationId: AdditionalPropertiesWithArrayOfEnums
|
||||||
|
requestBody:
|
||||||
|
description: Input enum
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AdditionalPropertiesWithArrayOfEnums'
|
||||||
|
required: false
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Got object with additional properties with array of enums
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AdditionalPropertiesWithArrayOfEnums'
|
||||||
/fake/jsonFormData:
|
/fake/jsonFormData:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -1099,32 +1188,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/HealthCheckResult'
|
$ref: '#/components/schemas/HealthCheckResult'
|
||||||
/fake/array-of-enums:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- fake
|
|
||||||
summary: Array of Enums
|
|
||||||
operationId: getArrayOfEnums
|
|
||||||
responses:
|
|
||||||
200:
|
|
||||||
description: Got named array of enums
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/ArrayOfEnums'
|
|
||||||
/fake/additional-properties-with-array-of-enums:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- fake
|
|
||||||
summary: Additional Properties with Array of Enums
|
|
||||||
operationId: getAdditionalPropertiesWithArrayOfEnums
|
|
||||||
responses:
|
|
||||||
200:
|
|
||||||
description: Got object with additional properties with array of enums
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/AdditionalPropertiesWithArrayOfEnums'
|
|
||||||
servers:
|
servers:
|
||||||
- url: 'http://{server}.swagger.io:{port}/v2'
|
- url: 'http://{server}.swagger.io:{port}/v2'
|
||||||
description: petstore server
|
description: petstore server
|
||||||
@@ -1430,7 +1493,7 @@ components:
|
|||||||
Address:
|
Address:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: integer
|
type: integer
|
||||||
Animal:
|
Animal:
|
||||||
type: object
|
type: object
|
||||||
discriminator:
|
discriminator:
|
||||||
@@ -1553,14 +1616,16 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- 1.1
|
- 1.1
|
||||||
- -1.2
|
- -1.2
|
||||||
outerEnum:
|
stringEnum:
|
||||||
$ref: '#/components/schemas/OuterEnum'
|
$ref: '#/components/schemas/StringEnum'
|
||||||
outerEnumInteger:
|
IntegerEnum:
|
||||||
$ref: '#/components/schemas/OuterEnumInteger'
|
$ref: '#/components/schemas/IntegerEnum'
|
||||||
outerEnumDefaultValue:
|
StringEnumWithDefaultValue:
|
||||||
$ref: '#/components/schemas/OuterEnumDefaultValue'
|
$ref: '#/components/schemas/StringEnumWithDefaultValue'
|
||||||
outerEnumIntegerDefaultValue:
|
IntegerEnumWithDefaultValue:
|
||||||
$ref: '#/components/schemas/OuterEnumIntegerDefaultValue'
|
$ref: '#/components/schemas/IntegerEnumWithDefaultValue'
|
||||||
|
IntegerEnumOneValue:
|
||||||
|
$ref: '#/components/schemas/IntegerEnumOneValue'
|
||||||
AdditionalPropertiesClass:
|
AdditionalPropertiesClass:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -1727,47 +1792,56 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- fish
|
- fish
|
||||||
- crab
|
- crab
|
||||||
OuterEnum:
|
StringEnum:
|
||||||
nullable: true
|
nullable: true
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- "placed"
|
||||||
|
- "approved"
|
||||||
|
- "delivered"
|
||||||
|
IntegerEnum:
|
||||||
|
type: integer
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
StringEnumWithDefaultValue:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- placed
|
- placed
|
||||||
- approved
|
- approved
|
||||||
- delivered
|
- delivered
|
||||||
OuterEnumInteger:
|
|
||||||
type: integer
|
|
||||||
enum:
|
|
||||||
- 0
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
OuterEnumDefaultValue:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- placed
|
|
||||||
- approved
|
|
||||||
- delivered
|
|
||||||
default: placed
|
default: placed
|
||||||
OuterEnumIntegerDefaultValue:
|
IntegerEnumWithDefaultValue:
|
||||||
type: integer
|
type: integer
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
default: 0
|
default: 0
|
||||||
OuterComposite:
|
IntegerEnumOneValue:
|
||||||
|
type: integer
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
ObjectModelWithRefProps:
|
||||||
|
description: a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
my_number:
|
my_number:
|
||||||
$ref: '#/components/schemas/OuterNumber'
|
$ref: '#/definitions/NumberWithValidations'
|
||||||
my_string:
|
my_string:
|
||||||
$ref: '#/components/schemas/OuterString'
|
$ref: '#/definitions/String'
|
||||||
my_boolean:
|
my_boolean:
|
||||||
$ref: '#/components/schemas/OuterBoolean'
|
$ref: '#/definitions/Boolean'
|
||||||
OuterNumber:
|
NumberWithValidations:
|
||||||
type: number
|
type: number
|
||||||
OuterString:
|
minimum: 10
|
||||||
|
maximum: 20
|
||||||
|
Number:
|
||||||
|
type: number
|
||||||
|
String:
|
||||||
type: string
|
type: string
|
||||||
OuterBoolean:
|
Boolean:
|
||||||
type: boolean
|
type: boolean
|
||||||
x-codegen-body-parameter-name: boolean_post_body
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
StringBooleanMap:
|
StringBooleanMap:
|
||||||
@@ -1939,19 +2013,19 @@ components:
|
|||||||
required:
|
required:
|
||||||
- className
|
- className
|
||||||
gmFruit:
|
gmFruit:
|
||||||
properties:
|
properties:
|
||||||
color:
|
color:
|
||||||
type: string
|
type: string
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/apple'
|
- $ref: '#/components/schemas/apple'
|
||||||
- $ref: '#/components/schemas/banana'
|
- $ref: '#/components/schemas/banana'
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
fruitReq:
|
fruitReq:
|
||||||
oneOf:
|
oneOf:
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
- $ref: '#/components/schemas/appleReq'
|
- $ref: '#/components/schemas/appleReq'
|
||||||
- $ref: '#/components/schemas/bananaReq'
|
- $ref: '#/components/schemas/bananaReq'
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
appleReq:
|
appleReq:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -2103,7 +2177,7 @@ components:
|
|||||||
ArrayOfEnums:
|
ArrayOfEnums:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/OuterEnum'
|
$ref: '#/components/schemas/StringEnum'
|
||||||
AdditionalPropertiesWithArrayOfEnums:
|
AdditionalPropertiesWithArrayOfEnums:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
|
|||||||
48
pom.xml
48
pom.xml
@@ -1267,6 +1267,7 @@
|
|||||||
<module>samples/client/petstore/java/google-api-client</module>
|
<module>samples/client/petstore/java/google-api-client</module>
|
||||||
<module>samples/client/petstore/java/rest-assured</module>
|
<module>samples/client/petstore/java/rest-assured</module>
|
||||||
<module>samples/client/petstore/java/rest-assured-jackson</module>
|
<module>samples/client/petstore/java/rest-assured-jackson</module>
|
||||||
|
<module>samples/client/petstore/java/microprofile-rest-client</module>
|
||||||
<module>samples/client/petstore/groovy</module>
|
<module>samples/client/petstore/groovy</module>
|
||||||
<!-- servers -->
|
<!-- servers -->
|
||||||
<module>samples/server/petstore/jaxrs-jersey</module>
|
<module>samples/server/petstore/jaxrs-jersey</module>
|
||||||
@@ -1322,13 +1323,13 @@
|
|||||||
<module>samples/server/petstore/kotlin-springboot</module>
|
<module>samples/server/petstore/kotlin-springboot</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
<!-- test with JDK7 in CircleCI -->
|
<!-- other tests in CircleCI -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>samples.circleci.jdk7</id>
|
<id>samples.circleci.others</id>
|
||||||
<activation>
|
<activation>
|
||||||
<property>
|
<property>
|
||||||
<name>env</name>
|
<name>env</name>
|
||||||
<value>samples.circleci.jdk7</value>
|
<value>samples.circleci.others</value>
|
||||||
</property>
|
</property>
|
||||||
</activation>
|
</activation>
|
||||||
<modules>
|
<modules>
|
||||||
@@ -1336,50 +1337,9 @@
|
|||||||
<module>samples/client/petstore/javascript-promise-es6</module>
|
<module>samples/client/petstore/javascript-promise-es6</module>
|
||||||
<module>samples/server/petstore/go-api-server</module>
|
<module>samples/server/petstore/go-api-server</module>
|
||||||
<module>samples/server/petstore/go-gin-api-server</module>
|
<module>samples/server/petstore/go-gin-api-server</module>
|
||||||
<!-- test java-related projects -->
|
|
||||||
<module>samples/client/petstore/dart2/petstore</module>
|
<module>samples/client/petstore/dart2/petstore</module>
|
||||||
<module>samples/client/petstore/dart-jaguar/openapi</module>
|
<module>samples/client/petstore/dart-jaguar/openapi</module>
|
||||||
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
|
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
|
||||||
<module>samples/client/petstore/scala-akka</module>
|
|
||||||
<module>samples/client/petstore/scala-httpclient</module>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
|
||||||
<module>samples/client/petstore/java/resttemplate-withXml</module>
|
|
||||||
<module>samples/client/petstore/java/vertx</module>
|
|
||||||
<module>samples/client/petstore/java/resteasy</module>
|
|
||||||
<module>samples/client/petstore/java/google-api-client</module>
|
|
||||||
<module>samples/client/petstore/java/microprofile-rest-client</module>
|
|
||||||
<!-- servers -->
|
|
||||||
<module>samples/server/petstore/jaxrs-jersey</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-spec</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
|
|
||||||
<module>samples/server/petstore/java-vertx/rx</module>
|
|
||||||
<module>samples/server/petstore/java-vertx/async</module>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
<module>samples/server/petstore/java-undertow</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1-useTags</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2-useTags</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-java8</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
<module>samples/server/petstore/springboot-useoptional</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
|
||||||
<module>samples/server/petstore/java-msf4j</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
<!-- test with JDK9 in Shippable CI -->
|
<!-- test with JDK9 in Shippable CI -->
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ To test special tags and operation ID starting with number
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.AnotherFakeApi;
|
import org.openapitools.client.api.AnotherFakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ this route creates an XmlItem
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -100,7 +100,7 @@ Test serialization of outer boolean types
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -165,7 +165,7 @@ Test serialization of object with outer number type
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -230,7 +230,7 @@ Test serialization of outer number types
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -295,7 +295,7 @@ Test serialization of outer string types
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -360,7 +360,7 @@ For this test, the body for this request much reference a schema named `File`.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -422,7 +422,7 @@ No authorization required
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -488,7 +488,7 @@ To test "client" model
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -557,7 +557,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -653,7 +653,7 @@ To test enum parameters
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -732,7 +732,7 @@ Fake endpoint to test group parameters (optional)
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -811,7 +811,7 @@ test inline additionalProperties
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -873,7 +873,7 @@ test json serialization of form data
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -939,7 +939,7 @@ To test the collection format in query parameters
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeClassnameTags123Api;
|
import org.openapitools.client.api.FakeClassnameTags123Api;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -98,7 +98,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -170,7 +170,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -241,7 +241,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -312,7 +312,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -384,7 +384,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -454,7 +454,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -525,7 +525,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -597,7 +597,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -92,7 +92,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -159,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -224,7 +224,7 @@ Place an order for a pet
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ This can only be done by the logged in user.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -92,7 +92,7 @@ Creates list of users with given input array
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -154,7 +154,7 @@ Creates list of users with given input array
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -218,7 +218,7 @@ This can only be done by the logged in user.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -281,7 +281,7 @@ Get user by user name
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -346,7 +346,7 @@ Logs user into the system
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -412,7 +412,7 @@ Logs out current logged in user session
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -472,7 +472,7 @@ This can only be done by the logged in user.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ public class ApiClient {
|
|||||||
* @param obj Object
|
* @param obj Object
|
||||||
* @param formParams Form parameters
|
* @param formParams Form parameters
|
||||||
* @param contentType Context type
|
* @param contentType Context type
|
||||||
* @param isBodyNulalble True if the body is nullable
|
* @param isBodyNullable True if the body is nullable
|
||||||
* @return String
|
* @return String
|
||||||
* @throws ApiException API exception
|
* @throws ApiException API exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Code** | **Int32** | | [optional] [default to null]
|
**Code** | **Int32** | | [optional]
|
||||||
**Type** | **String** | | [optional] [default to null]
|
**Type** | **String** | | [optional]
|
||||||
**Message** | **String** | | [optional] [default to null]
|
**Message** | **String** | | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **Int64** | | [optional] [default to null]
|
**Id** | **Int64** | | [optional]
|
||||||
**Name** | **String** | | [optional] [default to null]
|
**Name** | **String** | | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Name** | **String** | Updated name of the pet | [optional] [default to null]
|
**Name** | **String** | Updated name of the pet | [optional]
|
||||||
**Status** | **String** | Updated status of the pet | [optional] [default to null]
|
**Status** | **String** | Updated status of the pet | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**AdditionalMetadata** | **String** | Additional data to pass to server | [optional] [default to null]
|
**AdditionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||||
**File** | **System.IO.FileInfo** | file to upload | [optional] [default to null]
|
**File** | **System.IO.FileInfo** | file to upload | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **Int64** | | [optional] [default to null]
|
**Id** | **Int64** | | [optional]
|
||||||
**PetId** | **Int64** | | [optional] [default to null]
|
**PetId** | **Int64** | | [optional]
|
||||||
**Quantity** | **Int32** | | [optional] [default to null]
|
**Quantity** | **Int32** | | [optional]
|
||||||
**ShipDate** | **System.DateTime** | | [optional] [default to null]
|
**ShipDate** | **System.DateTime** | | [optional]
|
||||||
**Status** | **String** | Order Status | [optional] [default to null]
|
**Status** | **String** | Order Status | [optional]
|
||||||
**Complete** | **Boolean** | | [optional] [default to false]
|
**Complete** | **Boolean** | | [optional] [default to $false]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ $Configuration = Get-PSPetstoreConfiguration
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
$PetId = 987 # Int64 | Pet id to delete (default to null)
|
$PetId = 987 # Int64 | Pet id to delete
|
||||||
$ApiKey = "ApiKey_example" # String | (optional) (default to null)
|
$ApiKey = "ApiKey_example" # String | (optional)
|
||||||
|
|
||||||
# Deletes a pet
|
# Deletes a pet
|
||||||
try {
|
try {
|
||||||
@@ -93,8 +93,8 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**PetId** | **Int64**| Pet id to delete | [default to null]
|
**PetId** | **Int64**| Pet id to delete |
|
||||||
**ApiKey** | **String**| | [optional] [default to null]
|
**ApiKey** | **String**| | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ $Configuration = Get-PSPetstoreConfiguration
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
$Status = @("Status_example") # String[] | Status values that need to be considered for filter (default to null)
|
$Status = @("Status_example") # String[] | Status values that need to be considered for filter
|
||||||
|
|
||||||
# Finds Pets by status
|
# Finds Pets by status
|
||||||
try {
|
try {
|
||||||
@@ -143,7 +143,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**Status** | [**String[]**](String.md)| Status values that need to be considered for filter | [default to null]
|
**Status** | [**String[]**](String.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ $Configuration = Get-PSPetstoreConfiguration
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
$Tags = @("Inner_example") # String[] | Tags to filter by (default to null)
|
$Tags = @("Inner_example") # String[] | Tags to filter by
|
||||||
|
|
||||||
# Finds Pets by tags
|
# Finds Pets by tags
|
||||||
try {
|
try {
|
||||||
@@ -192,7 +192,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**Tags** | [**String[]**](String.md)| Tags to filter by | [default to null]
|
**Tags** | [**String[]**](String.md)| Tags to filter by |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ $Configuration["ApiKey"]["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["ApiKeyPrefix"]["api_key"] = "Bearer"
|
#$Configuration["ApiKeyPrefix"]["api_key"] = "Bearer"
|
||||||
|
|
||||||
$PetId = 987 # Int64 | ID of pet to return (default to null)
|
$PetId = 987 # Int64 | ID of pet to return
|
||||||
|
|
||||||
# Find pet by ID
|
# Find pet by ID
|
||||||
try {
|
try {
|
||||||
@@ -243,7 +243,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**PetId** | **Int64**| ID of pet to return | [default to null]
|
**PetId** | **Int64**| ID of pet to return |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -324,9 +324,9 @@ $Configuration = Get-PSPetstoreConfiguration
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
$PetId = 987 # Int64 | ID of pet that needs to be updated (default to null)
|
$PetId = 987 # Int64 | ID of pet that needs to be updated
|
||||||
$Name = "Name_example" # String | Updated name of the pet (optional) (default to null)
|
$Name = "Name_example" # String | Updated name of the pet (optional)
|
||||||
$Status = "Status_example" # String | Updated status of the pet (optional) (default to null)
|
$Status = "Status_example" # String | Updated status of the pet (optional)
|
||||||
|
|
||||||
# Updates a pet in the store with form data
|
# Updates a pet in the store with form data
|
||||||
try {
|
try {
|
||||||
@@ -341,9 +341,9 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**PetId** | **Int64**| ID of pet that needs to be updated | [default to null]
|
**PetId** | **Int64**| ID of pet that needs to be updated |
|
||||||
**Name** | **String**| Updated name of the pet | [optional] [default to null]
|
**Name** | **String**| Updated name of the pet | [optional]
|
||||||
**Status** | **String**| Updated status of the pet | [optional] [default to null]
|
**Status** | **String**| Updated status of the pet | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -377,9 +377,9 @@ $Configuration = Get-PSPetstoreConfiguration
|
|||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
$PetId = 987 # Int64 | ID of pet to update (default to null)
|
$PetId = 987 # Int64 | ID of pet to update
|
||||||
$AdditionalMetadata = "AdditionalMetadata_example" # String | Additional data to pass to server (optional) (default to null)
|
$AdditionalMetadata = "AdditionalMetadata_example" # String | Additional data to pass to server (optional)
|
||||||
$File = 987 # System.IO.FileInfo | file to upload (optional) (default to null)
|
$File = 987 # System.IO.FileInfo | file to upload (optional)
|
||||||
|
|
||||||
# uploads an image
|
# uploads an image
|
||||||
try {
|
try {
|
||||||
@@ -394,9 +394,9 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**PetId** | **Int64**| ID of pet to update | [default to null]
|
**PetId** | **Int64**| ID of pet to update |
|
||||||
**AdditionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
**AdditionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||||
**File** | **System.IO.FileInfo****System.IO.FileInfo**| file to upload | [optional] [default to null]
|
**File** | **System.IO.FileInfo****System.IO.FileInfo**| file to upload | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
|||||||
```powershell
|
```powershell
|
||||||
Import-Module -Name PSPetstore
|
Import-Module -Name PSPetstore
|
||||||
|
|
||||||
$OrderId = "OrderId_example" # String | ID of the order that needs to be deleted (default to null)
|
$OrderId = "OrderId_example" # String | ID of the order that needs to be deleted
|
||||||
|
|
||||||
# Delete purchase order by ID
|
# Delete purchase order by ID
|
||||||
try {
|
try {
|
||||||
@@ -38,7 +38,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**OrderId** | **String**| ID of the order that needs to be deleted | [default to null]
|
**OrderId** | **String**| ID of the order that needs to be deleted |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
|||||||
```powershell
|
```powershell
|
||||||
Import-Module -Name PSPetstore
|
Import-Module -Name PSPetstore
|
||||||
|
|
||||||
$OrderId = 987 # Int64 | ID of pet that needs to be fetched (default to null)
|
$OrderId = 987 # Int64 | ID of pet that needs to be fetched
|
||||||
|
|
||||||
# Find purchase order by ID
|
# Find purchase order by ID
|
||||||
try {
|
try {
|
||||||
@@ -129,7 +129,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**OrderId** | **Int64**| ID of pet that needs to be fetched | [default to null]
|
**OrderId** | **Int64**| ID of pet that needs to be fetched |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ $Configuration["ApiKey"]["AUTH_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["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||||
|
|
||||||
$Username = "Username_example" # String | The name that needs to be deleted (default to null)
|
$Username = "Username_example" # String | The name that needs to be deleted
|
||||||
|
|
||||||
# Delete user
|
# Delete user
|
||||||
try {
|
try {
|
||||||
@@ -197,7 +197,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**Username** | **String**| The name that needs to be deleted | [default to null]
|
**Username** | **String**| The name that needs to be deleted |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ Get user by user name
|
|||||||
```powershell
|
```powershell
|
||||||
Import-Module -Name PSPetstore
|
Import-Module -Name PSPetstore
|
||||||
|
|
||||||
$Username = "Username_example" # String | The name that needs to be fetched. Use user1 for testing. (default to null)
|
$Username = "Username_example" # String | The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
# Get user by user name
|
# Get user by user name
|
||||||
try {
|
try {
|
||||||
@@ -240,7 +240,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**Username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null]
|
**Username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -269,8 +269,8 @@ Logs user into the system
|
|||||||
```powershell
|
```powershell
|
||||||
Import-Module -Name PSPetstore
|
Import-Module -Name PSPetstore
|
||||||
|
|
||||||
$Username = "Username_example" # String | The user name for login (default to null)
|
$Username = "Username_example" # String | The user name for login
|
||||||
$Password = "Password_example" # String | The password for login in clear text (default to null)
|
$Password = "Password_example" # String | The password for login in clear text
|
||||||
|
|
||||||
# Logs user into the system
|
# Logs user into the system
|
||||||
try {
|
try {
|
||||||
@@ -285,8 +285,8 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**Username** | **String**| The user name for login | [default to null]
|
**Username** | **String**| The user name for login |
|
||||||
**Password** | **String**| The password for login in clear text | [default to null]
|
**Password** | **String**| The password for login in clear text |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -367,7 +367,7 @@ $Configuration["ApiKey"]["AUTH_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["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||||
|
|
||||||
$Username = "Username_example" # String | name that need to be deleted (default to null)
|
$Username = "Username_example" # String | name that need to be deleted
|
||||||
$User = # User | Updated user object
|
$User = # User | Updated user object
|
||||||
|
|
||||||
# Updated user
|
# Updated user
|
||||||
@@ -383,7 +383,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**Username** | **String**| name that need to be deleted | [default to null]
|
**Username** | **String**| name that need to be deleted |
|
||||||
**User** | [**User**](User.md)| Updated user object |
|
**User** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **Int64** | | [optional] [default to null]
|
**Id** | **Int64** | | [optional]
|
||||||
**Category** | [**Category**](Category.md) | | [optional] [default to null]
|
**Category** | [**Category**](Category.md) | | [optional]
|
||||||
**Name** | **String** | | [default to null]
|
**Name** | **String** | |
|
||||||
**PhotoUrls** | **String[]** | | [default to null]
|
**PhotoUrls** | **String[]** | |
|
||||||
**Tags** | [**Tag[]**](Tag.md) | | [optional] [default to null]
|
**Tags** | [**Tag[]**](Tag.md) | | [optional]
|
||||||
**Status** | **String** | pet status in the store | [optional] [default to null]
|
**Status** | **String** | pet status in the store | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **Int64** | | [optional] [default to null]
|
**Id** | **Int64** | | [optional]
|
||||||
**Name** | **String** | | [optional] [default to null]
|
**Name** | **String** | | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **Int64** | | [optional] [default to null]
|
**Id** | **Int64** | | [optional]
|
||||||
**Username** | **String** | | [optional] [default to null]
|
**Username** | **String** | | [optional]
|
||||||
**FirstName** | **String** | | [optional] [default to null]
|
**FirstName** | **String** | | [optional]
|
||||||
**LastName** | **String** | | [optional] [default to null]
|
**LastName** | **String** | | [optional]
|
||||||
**Email** | **String** | | [optional] [default to null]
|
**Email** | **String** | | [optional]
|
||||||
**Password** | **String** | | [optional] [default to null]
|
**Password** | **String** | | [optional]
|
||||||
**Phone** | **String** | | [optional] [default to null]
|
**Phone** | **String** | | [optional]
|
||||||
**UserStatus** | **Int32** | User Status | [optional] [default to null]
|
**UserStatus** | **Int32** | User Status | [optional]
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function Initialize-PSOrder {
|
|||||||
${Status},
|
${Status},
|
||||||
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
|
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
|
||||||
[System.Nullable[Boolean]]
|
[System.Nullable[Boolean]]
|
||||||
${Complete}
|
${Complete} = $false
|
||||||
)
|
)
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|||||||
@@ -51,10 +51,9 @@ docs/Model200Response.md
|
|||||||
docs/ModelReturn.md
|
docs/ModelReturn.md
|
||||||
docs/Name.md
|
docs/Name.md
|
||||||
docs/NumberOnly.md
|
docs/NumberOnly.md
|
||||||
|
docs/NumberWithValidations.md
|
||||||
|
docs/ObjectModelWithRefProps.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
docs/OuterComposite.md
|
|
||||||
docs/OuterEnum.md
|
|
||||||
docs/OuterNumber.md
|
|
||||||
docs/Parent.md
|
docs/Parent.md
|
||||||
docs/ParentAllOf.md
|
docs/ParentAllOf.md
|
||||||
docs/ParentPet.md
|
docs/ParentPet.md
|
||||||
@@ -65,6 +64,7 @@ docs/ReadOnlyFirst.md
|
|||||||
docs/SpecialModelName.md
|
docs/SpecialModelName.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/StringBooleanMap.md
|
docs/StringBooleanMap.md
|
||||||
|
docs/StringEnum.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
docs/TypeHolderDefault.md
|
docs/TypeHolderDefault.md
|
||||||
docs/TypeHolderExample.md
|
docs/TypeHolderExample.md
|
||||||
@@ -131,10 +131,9 @@ petstore_api/model/model200_response.py
|
|||||||
petstore_api/model/model_return.py
|
petstore_api/model/model_return.py
|
||||||
petstore_api/model/name.py
|
petstore_api/model/name.py
|
||||||
petstore_api/model/number_only.py
|
petstore_api/model/number_only.py
|
||||||
|
petstore_api/model/number_with_validations.py
|
||||||
|
petstore_api/model/object_model_with_ref_props.py
|
||||||
petstore_api/model/order.py
|
petstore_api/model/order.py
|
||||||
petstore_api/model/outer_composite.py
|
|
||||||
petstore_api/model/outer_enum.py
|
|
||||||
petstore_api/model/outer_number.py
|
|
||||||
petstore_api/model/parent.py
|
petstore_api/model/parent.py
|
||||||
petstore_api/model/parent_all_of.py
|
petstore_api/model/parent_all_of.py
|
||||||
petstore_api/model/parent_pet.py
|
petstore_api/model/parent_pet.py
|
||||||
@@ -143,6 +142,7 @@ petstore_api/model/player.py
|
|||||||
petstore_api/model/read_only_first.py
|
petstore_api/model/read_only_first.py
|
||||||
petstore_api/model/special_model_name.py
|
petstore_api/model/special_model_name.py
|
||||||
petstore_api/model/string_boolean_map.py
|
petstore_api/model/string_boolean_map.py
|
||||||
|
petstore_api/model/string_enum.py
|
||||||
petstore_api/model/tag.py
|
petstore_api/model/tag.py
|
||||||
petstore_api/model/type_holder_default.py
|
petstore_api/model/type_holder_default.py
|
||||||
petstore_api/model/type_holder_example.py
|
petstore_api/model/type_holder_example.py
|
||||||
|
|||||||
@@ -81,12 +81,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
|
*FakeApi* | [**array_model**](docs/FakeApi.md#array_model) | **POST** /fake/refs/arraymodel |
|
||||||
|
*FakeApi* | [**boolean**](docs/FakeApi.md#boolean) | **POST** /fake/refs/boolean |
|
||||||
*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||||
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
*FakeApi* | [**number_with_validations**](docs/FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
|
||||||
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
*FakeApi* | [**object_model_with_ref_props**](docs/FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
|
||||||
*FakeApi* | [**fake_outer_enum_serialize**](docs/FakeApi.md#fake_outer_enum_serialize) | **POST** /fake/outer/enum |
|
*FakeApi* | [**string**](docs/FakeApi.md#string) | **POST** /fake/refs/string |
|
||||||
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
*FakeApi* | [**string_enum**](docs/FakeApi.md#string_enum) | **POST** /fake/refs/enum |
|
||||||
*FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
|
||||||
*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
||||||
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
||||||
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
||||||
@@ -168,10 +169,9 @@ Class | Method | HTTP request | Description
|
|||||||
- [model_return.ModelReturn](docs/ModelReturn.md)
|
- [model_return.ModelReturn](docs/ModelReturn.md)
|
||||||
- [name.Name](docs/Name.md)
|
- [name.Name](docs/Name.md)
|
||||||
- [number_only.NumberOnly](docs/NumberOnly.md)
|
- [number_only.NumberOnly](docs/NumberOnly.md)
|
||||||
|
- [number_with_validations.NumberWithValidations](docs/NumberWithValidations.md)
|
||||||
|
- [object_model_with_ref_props.ObjectModelWithRefProps](docs/ObjectModelWithRefProps.md)
|
||||||
- [order.Order](docs/Order.md)
|
- [order.Order](docs/Order.md)
|
||||||
- [outer_composite.OuterComposite](docs/OuterComposite.md)
|
|
||||||
- [outer_enum.OuterEnum](docs/OuterEnum.md)
|
|
||||||
- [outer_number.OuterNumber](docs/OuterNumber.md)
|
|
||||||
- [parent.Parent](docs/Parent.md)
|
- [parent.Parent](docs/Parent.md)
|
||||||
- [parent_all_of.ParentAllOf](docs/ParentAllOf.md)
|
- [parent_all_of.ParentAllOf](docs/ParentAllOf.md)
|
||||||
- [parent_pet.ParentPet](docs/ParentPet.md)
|
- [parent_pet.ParentPet](docs/ParentPet.md)
|
||||||
@@ -180,6 +180,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [read_only_first.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [read_only_first.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [special_model_name.SpecialModelName](docs/SpecialModelName.md)
|
- [special_model_name.SpecialModelName](docs/SpecialModelName.md)
|
||||||
- [string_boolean_map.StringBooleanMap](docs/StringBooleanMap.md)
|
- [string_boolean_map.StringBooleanMap](docs/StringBooleanMap.md)
|
||||||
|
- [string_enum.StringEnum](docs/StringEnum.md)
|
||||||
- [tag.Tag](docs/Tag.md)
|
- [tag.Tag](docs/Tag.md)
|
||||||
- [type_holder_default.TypeHolderDefault](docs/TypeHolderDefault.md)
|
- [type_holder_default.TypeHolderDefault](docs/TypeHolderDefault.md)
|
||||||
- [type_holder_example.TypeHolderExample](docs/TypeHolderExample.md)
|
- [type_holder_example.TypeHolderExample](docs/TypeHolderExample.md)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|||||||
**enum_string** | **str** | | [optional]
|
**enum_string** | **str** | | [optional]
|
||||||
**enum_integer** | **int** | | [optional]
|
**enum_integer** | **int** | | [optional]
|
||||||
**enum_number** | **float** | | [optional]
|
**enum_number** | **float** | | [optional]
|
||||||
**outer_enum** | [**outer_enum.OuterEnum**](OuterEnum.md) | | [optional]
|
**string_enum** | [**string_enum.StringEnum**](StringEnum.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**array_model**](FakeApi.md#array_model) | **POST** /fake/refs/arraymodel |
|
||||||
|
[**boolean**](FakeApi.md#boolean) | **POST** /fake/refs/boolean |
|
||||||
[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||||
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
[**number_with_validations**](FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
|
||||||
[**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
[**object_model_with_ref_props**](FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
|
||||||
[**fake_outer_enum_serialize**](FakeApi.md#fake_outer_enum_serialize) | **POST** /fake/outer/enum |
|
[**string**](FakeApi.md#string) | **POST** /fake/refs/string |
|
||||||
[**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
[**string_enum**](FakeApi.md#string_enum) | **POST** /fake/refs/enum |
|
||||||
[**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
|
||||||
[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
||||||
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
||||||
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
||||||
@@ -21,6 +22,133 @@ Method | HTTP request | Description
|
|||||||
[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
|
# **array_model**
|
||||||
|
> animal_farm.AnimalFarm array_model()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of ArrayModel
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import animal_farm
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = animal_farm.AnimalFarm() # animal_farm.AnimalFarm | Input model (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.array_model(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->array_model: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**animal_farm.AnimalFarm**](AnimalFarm.md)| Input model | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**animal_farm.AnimalFarm**](AnimalFarm.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output model | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
# **boolean**
|
||||||
|
> bool boolean()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = True # bool | Input boolean as post body (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.boolean(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->boolean: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **bool**| Input boolean as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**bool**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output boolean | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
# **create_xml_item**
|
# **create_xml_item**
|
||||||
> create_xml_item(xml_item)
|
> create_xml_item(xml_item)
|
||||||
|
|
||||||
@@ -84,199 +212,8 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **fake_outer_boolean_serialize**
|
# **number_with_validations**
|
||||||
> bool fake_outer_boolean_serialize()
|
> number_with_validations.NumberWithValidations number_with_validations()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer boolean types
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from __future__ import print_function
|
|
||||||
import time
|
|
||||||
import petstore_api
|
|
||||||
from petstore_api.api import fake_api
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = petstore_api.Configuration(
|
|
||||||
host = "http://petstore.swagger.io:80/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with petstore_api.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
|
||||||
body = True # bool | Input boolean as post body (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
api_response = api_instance.fake_outer_boolean_serialize(body=body)
|
|
||||||
pprint(api_response)
|
|
||||||
except petstore_api.ApiException as e:
|
|
||||||
print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | **bool**| Input boolean as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**bool**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | Output boolean | - |
|
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
# **fake_outer_composite_serialize**
|
|
||||||
> outer_composite.OuterComposite fake_outer_composite_serialize()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of object with outer number type
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from __future__ import print_function
|
|
||||||
import time
|
|
||||||
import petstore_api
|
|
||||||
from petstore_api.api import fake_api
|
|
||||||
from petstore_api.model import outer_composite
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = petstore_api.Configuration(
|
|
||||||
host = "http://petstore.swagger.io:80/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with petstore_api.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
|
||||||
body = outer_composite.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
api_response = api_instance.fake_outer_composite_serialize(body=body)
|
|
||||||
pprint(api_response)
|
|
||||||
except petstore_api.ApiException as e:
|
|
||||||
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**outer_composite.OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**outer_composite.OuterComposite**](OuterComposite.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | Output composite | - |
|
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
# **fake_outer_enum_serialize**
|
|
||||||
> outer_enum.OuterEnum fake_outer_enum_serialize()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer enum
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from __future__ import print_function
|
|
||||||
import time
|
|
||||||
import petstore_api
|
|
||||||
from petstore_api.api import fake_api
|
|
||||||
from petstore_api.model import outer_enum
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = petstore_api.Configuration(
|
|
||||||
host = "http://petstore.swagger.io:80/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with petstore_api.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
|
||||||
body = outer_enum.OuterEnum("placed") # outer_enum.OuterEnum | Input enum as post body (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
api_response = api_instance.fake_outer_enum_serialize(body=body)
|
|
||||||
pprint(api_response)
|
|
||||||
except petstore_api.ApiException as e:
|
|
||||||
print("Exception when calling FakeApi->fake_outer_enum_serialize: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**outer_enum.OuterEnum**](OuterEnum.md)| Input enum as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**outer_enum.OuterEnum**](OuterEnum.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | Output enum | - |
|
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
# **fake_outer_number_serialize**
|
|
||||||
> outer_number.OuterNumber fake_outer_number_serialize()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -289,7 +226,7 @@ from __future__ import print_function
|
|||||||
import time
|
import time
|
||||||
import petstore_api
|
import petstore_api
|
||||||
from petstore_api.api import fake_api
|
from petstore_api.api import fake_api
|
||||||
from petstore_api.model import outer_number
|
from petstore_api.model import number_with_validations
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
@@ -302,26 +239,26 @@ configuration = petstore_api.Configuration(
|
|||||||
with petstore_api.ApiClient() as api_client:
|
with petstore_api.ApiClient() as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
body = outer_number.OuterNumber(3.4) # outer_number.OuterNumber | Input number as post body (optional)
|
body = number_with_validations.NumberWithValidations(3.4) # number_with_validations.NumberWithValidations | Input number as post body (optional)
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
# and optional values
|
# and optional values
|
||||||
try:
|
try:
|
||||||
api_response = api_instance.fake_outer_number_serialize(body=body)
|
api_response = api_instance.number_with_validations(body=body)
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except petstore_api.ApiException as e:
|
except petstore_api.ApiException as e:
|
||||||
print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e)
|
print("Exception when calling FakeApi->number_with_validations: %s\n" % e)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**outer_number.OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
|
**body** | [**number_with_validations.NumberWithValidations**](NumberWithValidations.md)| Input number as post body | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**outer_number.OuterNumber**](OuterNumber.md)
|
[**number_with_validations.NumberWithValidations**](NumberWithValidations.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@@ -339,8 +276,72 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **fake_outer_string_serialize**
|
# **object_model_with_ref_props**
|
||||||
> str fake_outer_string_serialize()
|
> object_model_with_ref_props.ObjectModelWithRefProps object_model_with_ref_props()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with $refed properties
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import object_model_with_ref_props
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = object_model_with_ref_props.ObjectModelWithRefProps() # object_model_with_ref_props.ObjectModelWithRefProps | Input model (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.object_model_with_ref_props(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**object_model_with_ref_props.ObjectModelWithRefProps**](ObjectModelWithRefProps.md)| Input model | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**object_model_with_ref_props.ObjectModelWithRefProps**](ObjectModelWithRefProps.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output model | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
# **string**
|
||||||
|
> str string()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -370,10 +371,10 @@ with petstore_api.ApiClient() as api_client:
|
|||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
# and optional values
|
# and optional values
|
||||||
try:
|
try:
|
||||||
api_response = api_instance.fake_outer_string_serialize(body=body)
|
api_response = api_instance.string(body=body)
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except petstore_api.ApiException as e:
|
except petstore_api.ApiException as e:
|
||||||
print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e)
|
print("Exception when calling FakeApi->string: %s\n" % e)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
@@ -402,6 +403,70 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
|
# **string_enum**
|
||||||
|
> string_enum.StringEnum string_enum()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer enum
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import string_enum
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = string_enum.StringEnum("placed") # string_enum.StringEnum | Input enum (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.string_enum(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->string_enum: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**string_enum.StringEnum**](StringEnum.md)| Input enum | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**string_enum.StringEnum**](StringEnum.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output enum | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
# **test_body_with_file_schema**
|
# **test_body_with_file_schema**
|
||||||
> test_body_with_file_schema(body)
|
> test_body_with_file_schema(body)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# outer_number.OuterNumber
|
# number_with_validations.NumberWithValidations
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
# outer_composite.OuterComposite
|
# object_model_with_ref_props.ObjectModelWithRefProps
|
||||||
|
|
||||||
|
a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**my_number** | [**outer_number.OuterNumber**](OuterNumber.md) | | [optional]
|
**my_number** | [**number_with_validations.NumberWithValidations**](NumberWithValidations.md) | | [optional]
|
||||||
**my_string** | **str** | | [optional]
|
**my_string** | **str** | | [optional]
|
||||||
**my_boolean** | **bool** | | [optional]
|
**my_boolean** | **bool** | | [optional]
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# outer_enum.OuterEnum
|
# string_enum.StringEnum
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
@@ -30,10 +30,11 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
str,
|
str,
|
||||||
validate_and_convert_types
|
validate_and_convert_types
|
||||||
)
|
)
|
||||||
|
from petstore_api.model import animal_farm
|
||||||
from petstore_api.model import xml_item
|
from petstore_api.model import xml_item
|
||||||
from petstore_api.model import outer_composite
|
from petstore_api.model import number_with_validations
|
||||||
from petstore_api.model import outer_enum
|
from petstore_api.model import object_model_with_ref_props
|
||||||
from petstore_api.model import outer_number
|
from petstore_api.model import string_enum
|
||||||
from petstore_api.model import file_schema_test_class
|
from petstore_api.model import file_schema_test_class
|
||||||
from petstore_api.model import user
|
from petstore_api.model import user
|
||||||
from petstore_api.model import client
|
from petstore_api.model import client
|
||||||
@@ -51,6 +52,226 @@ class FakeApi(object):
|
|||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
|
||||||
|
def __array_model(
|
||||||
|
self,
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
"""array_model # noqa: E501
|
||||||
|
|
||||||
|
Test serialization of ArrayModel # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.array_model(async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
body (animal_farm.AnimalFarm): Input model. [optional]
|
||||||
|
_return_http_data_only (bool): response data without head status
|
||||||
|
code and headers. Default is True.
|
||||||
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
|
will be returned without reading/decoding response data.
|
||||||
|
Default is True.
|
||||||
|
_request_timeout (float/tuple): timeout setting for this request. If one
|
||||||
|
number provided, it will be total request timeout. It can also
|
||||||
|
be a pair (tuple) of (connection, read) timeouts.
|
||||||
|
Default is None.
|
||||||
|
_check_input_type (bool): specifies if type checking
|
||||||
|
should be done one the data sent to the server.
|
||||||
|
Default is True.
|
||||||
|
_check_return_type (bool): specifies if type checking
|
||||||
|
should be done one the data received from the server.
|
||||||
|
Default is True.
|
||||||
|
_host_index (int/None): specifies the index of the server
|
||||||
|
that we want to use.
|
||||||
|
Default is read from the configuration.
|
||||||
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
animal_farm.AnimalFarm
|
||||||
|
If the method is called asynchronously, returns the request
|
||||||
|
thread.
|
||||||
|
"""
|
||||||
|
kwargs['async_req'] = kwargs.get(
|
||||||
|
'async_req', False
|
||||||
|
)
|
||||||
|
kwargs['_return_http_data_only'] = kwargs.get(
|
||||||
|
'_return_http_data_only', True
|
||||||
|
)
|
||||||
|
kwargs['_preload_content'] = kwargs.get(
|
||||||
|
'_preload_content', True
|
||||||
|
)
|
||||||
|
kwargs['_request_timeout'] = kwargs.get(
|
||||||
|
'_request_timeout', None
|
||||||
|
)
|
||||||
|
kwargs['_check_input_type'] = kwargs.get(
|
||||||
|
'_check_input_type', True
|
||||||
|
)
|
||||||
|
kwargs['_check_return_type'] = kwargs.get(
|
||||||
|
'_check_return_type', True
|
||||||
|
)
|
||||||
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
|
return self.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
|
self.array_model = Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (animal_farm.AnimalFarm,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/fake/refs/arraymodel',
|
||||||
|
'operation_id': 'array_model',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(animal_farm.AnimalFarm,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'*/*'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client,
|
||||||
|
callable=__array_model
|
||||||
|
)
|
||||||
|
|
||||||
|
def __boolean(
|
||||||
|
self,
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
"""boolean # noqa: E501
|
||||||
|
|
||||||
|
Test serialization of outer boolean types # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.boolean(async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
body (bool): Input boolean as post body. [optional]
|
||||||
|
_return_http_data_only (bool): response data without head status
|
||||||
|
code and headers. Default is True.
|
||||||
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
|
will be returned without reading/decoding response data.
|
||||||
|
Default is True.
|
||||||
|
_request_timeout (float/tuple): timeout setting for this request. If one
|
||||||
|
number provided, it will be total request timeout. It can also
|
||||||
|
be a pair (tuple) of (connection, read) timeouts.
|
||||||
|
Default is None.
|
||||||
|
_check_input_type (bool): specifies if type checking
|
||||||
|
should be done one the data sent to the server.
|
||||||
|
Default is True.
|
||||||
|
_check_return_type (bool): specifies if type checking
|
||||||
|
should be done one the data received from the server.
|
||||||
|
Default is True.
|
||||||
|
_host_index (int/None): specifies the index of the server
|
||||||
|
that we want to use.
|
||||||
|
Default is read from the configuration.
|
||||||
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool
|
||||||
|
If the method is called asynchronously, returns the request
|
||||||
|
thread.
|
||||||
|
"""
|
||||||
|
kwargs['async_req'] = kwargs.get(
|
||||||
|
'async_req', False
|
||||||
|
)
|
||||||
|
kwargs['_return_http_data_only'] = kwargs.get(
|
||||||
|
'_return_http_data_only', True
|
||||||
|
)
|
||||||
|
kwargs['_preload_content'] = kwargs.get(
|
||||||
|
'_preload_content', True
|
||||||
|
)
|
||||||
|
kwargs['_request_timeout'] = kwargs.get(
|
||||||
|
'_request_timeout', None
|
||||||
|
)
|
||||||
|
kwargs['_check_input_type'] = kwargs.get(
|
||||||
|
'_check_input_type', True
|
||||||
|
)
|
||||||
|
kwargs['_check_return_type'] = kwargs.get(
|
||||||
|
'_check_return_type', True
|
||||||
|
)
|
||||||
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
|
return self.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
|
self.boolean = Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (bool,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/fake/refs/boolean',
|
||||||
|
'operation_id': 'boolean',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(bool,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'*/*'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client,
|
||||||
|
callable=__boolean
|
||||||
|
)
|
||||||
|
|
||||||
def __create_xml_item(
|
def __create_xml_item(
|
||||||
self,
|
self,
|
||||||
xml_item,
|
xml_item,
|
||||||
@@ -172,352 +393,22 @@ class FakeApi(object):
|
|||||||
callable=__create_xml_item
|
callable=__create_xml_item
|
||||||
)
|
)
|
||||||
|
|
||||||
def __fake_outer_boolean_serialize(
|
def __number_with_validations(
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
"""fake_outer_boolean_serialize # noqa: E501
|
"""number_with_validations # noqa: E501
|
||||||
|
|
||||||
Test serialization of outer boolean types # noqa: E501
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.fake_outer_boolean_serialize(async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
body (bool): Input boolean as post body. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
bool
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.fake_outer_boolean_serialize = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (bool,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/fake/outer/boolean',
|
|
||||||
'operation_id': 'fake_outer_boolean_serialize',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(bool,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'*/*'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__fake_outer_boolean_serialize
|
|
||||||
)
|
|
||||||
|
|
||||||
def __fake_outer_composite_serialize(
|
|
||||||
self,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""fake_outer_composite_serialize # noqa: E501
|
|
||||||
|
|
||||||
Test serialization of object with outer number type # noqa: E501
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.fake_outer_composite_serialize(async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
body (outer_composite.OuterComposite): Input composite as post body. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
outer_composite.OuterComposite
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.fake_outer_composite_serialize = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (outer_composite.OuterComposite,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/fake/outer/composite',
|
|
||||||
'operation_id': 'fake_outer_composite_serialize',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(outer_composite.OuterComposite,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'*/*'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__fake_outer_composite_serialize
|
|
||||||
)
|
|
||||||
|
|
||||||
def __fake_outer_enum_serialize(
|
|
||||||
self,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""fake_outer_enum_serialize # noqa: E501
|
|
||||||
|
|
||||||
Test serialization of outer enum # noqa: E501
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.fake_outer_enum_serialize(async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
body (outer_enum.OuterEnum): Input enum as post body. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
outer_enum.OuterEnum
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.fake_outer_enum_serialize = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (outer_enum.OuterEnum,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/fake/outer/enum',
|
|
||||||
'operation_id': 'fake_outer_enum_serialize',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(outer_enum.OuterEnum,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'*/*'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__fake_outer_enum_serialize
|
|
||||||
)
|
|
||||||
|
|
||||||
def __fake_outer_number_serialize(
|
|
||||||
self,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""fake_outer_number_serialize # noqa: E501
|
|
||||||
|
|
||||||
Test serialization of outer number types # noqa: E501
|
Test serialization of outer number types # noqa: E501
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
asynchronous HTTP request, please pass async_req=True
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
>>> thread = api.fake_outer_number_serialize(async_req=True)
|
>>> thread = api.number_with_validations(async_req=True)
|
||||||
>>> result = thread.get()
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
Keyword Args:
|
||||||
body (outer_number.OuterNumber): Input number as post body. [optional]
|
body (number_with_validations.NumberWithValidations): Input number as post body. [optional]
|
||||||
_return_http_data_only (bool): response data without head status
|
_return_http_data_only (bool): response data without head status
|
||||||
code and headers. Default is True.
|
code and headers. Default is True.
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
@@ -539,7 +430,7 @@ class FakeApi(object):
|
|||||||
async_req (bool): execute request asynchronously
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
outer_number.OuterNumber
|
number_with_validations.NumberWithValidations
|
||||||
If the method is called asynchronously, returns the request
|
If the method is called asynchronously, returns the request
|
||||||
thread.
|
thread.
|
||||||
"""
|
"""
|
||||||
@@ -564,12 +455,12 @@ class FakeApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.fake_outer_number_serialize = Endpoint(
|
self.number_with_validations = Endpoint(
|
||||||
settings={
|
settings={
|
||||||
'response_type': (outer_number.OuterNumber,),
|
'response_type': (number_with_validations.NumberWithValidations,),
|
||||||
'auth': [],
|
'auth': [],
|
||||||
'endpoint_path': '/fake/outer/number',
|
'endpoint_path': '/fake/refs/number',
|
||||||
'operation_id': 'fake_outer_number_serialize',
|
'operation_id': 'number_with_validations',
|
||||||
'http_method': 'POST',
|
'http_method': 'POST',
|
||||||
'servers': None,
|
'servers': None,
|
||||||
},
|
},
|
||||||
@@ -592,7 +483,7 @@ class FakeApi(object):
|
|||||||
},
|
},
|
||||||
'openapi_types': {
|
'openapi_types': {
|
||||||
'body':
|
'body':
|
||||||
(outer_number.OuterNumber,),
|
(number_with_validations.NumberWithValidations,),
|
||||||
},
|
},
|
||||||
'attribute_map': {
|
'attribute_map': {
|
||||||
},
|
},
|
||||||
@@ -609,20 +500,130 @@ class FakeApi(object):
|
|||||||
'content_type': [],
|
'content_type': [],
|
||||||
},
|
},
|
||||||
api_client=api_client,
|
api_client=api_client,
|
||||||
callable=__fake_outer_number_serialize
|
callable=__number_with_validations
|
||||||
)
|
)
|
||||||
|
|
||||||
def __fake_outer_string_serialize(
|
def __object_model_with_ref_props(
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
"""fake_outer_string_serialize # noqa: E501
|
"""object_model_with_ref_props # noqa: E501
|
||||||
|
|
||||||
|
Test serialization of object with $refed properties # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.object_model_with_ref_props(async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
body (object_model_with_ref_props.ObjectModelWithRefProps): Input model. [optional]
|
||||||
|
_return_http_data_only (bool): response data without head status
|
||||||
|
code and headers. Default is True.
|
||||||
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
|
will be returned without reading/decoding response data.
|
||||||
|
Default is True.
|
||||||
|
_request_timeout (float/tuple): timeout setting for this request. If one
|
||||||
|
number provided, it will be total request timeout. It can also
|
||||||
|
be a pair (tuple) of (connection, read) timeouts.
|
||||||
|
Default is None.
|
||||||
|
_check_input_type (bool): specifies if type checking
|
||||||
|
should be done one the data sent to the server.
|
||||||
|
Default is True.
|
||||||
|
_check_return_type (bool): specifies if type checking
|
||||||
|
should be done one the data received from the server.
|
||||||
|
Default is True.
|
||||||
|
_host_index (int/None): specifies the index of the server
|
||||||
|
that we want to use.
|
||||||
|
Default is read from the configuration.
|
||||||
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object_model_with_ref_props.ObjectModelWithRefProps
|
||||||
|
If the method is called asynchronously, returns the request
|
||||||
|
thread.
|
||||||
|
"""
|
||||||
|
kwargs['async_req'] = kwargs.get(
|
||||||
|
'async_req', False
|
||||||
|
)
|
||||||
|
kwargs['_return_http_data_only'] = kwargs.get(
|
||||||
|
'_return_http_data_only', True
|
||||||
|
)
|
||||||
|
kwargs['_preload_content'] = kwargs.get(
|
||||||
|
'_preload_content', True
|
||||||
|
)
|
||||||
|
kwargs['_request_timeout'] = kwargs.get(
|
||||||
|
'_request_timeout', None
|
||||||
|
)
|
||||||
|
kwargs['_check_input_type'] = kwargs.get(
|
||||||
|
'_check_input_type', True
|
||||||
|
)
|
||||||
|
kwargs['_check_return_type'] = kwargs.get(
|
||||||
|
'_check_return_type', True
|
||||||
|
)
|
||||||
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
|
return self.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
|
self.object_model_with_ref_props = Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (object_model_with_ref_props.ObjectModelWithRefProps,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/fake/refs/object_model_with_ref_props',
|
||||||
|
'operation_id': 'object_model_with_ref_props',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(object_model_with_ref_props.ObjectModelWithRefProps,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'*/*'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client,
|
||||||
|
callable=__object_model_with_ref_props
|
||||||
|
)
|
||||||
|
|
||||||
|
def __string(
|
||||||
|
self,
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
"""string # noqa: E501
|
||||||
|
|
||||||
Test serialization of outer string types # noqa: E501
|
Test serialization of outer string types # noqa: E501
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
asynchronous HTTP request, please pass async_req=True
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
>>> thread = api.fake_outer_string_serialize(async_req=True)
|
>>> thread = api.string(async_req=True)
|
||||||
>>> result = thread.get()
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
@@ -674,12 +675,12 @@ class FakeApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.fake_outer_string_serialize = Endpoint(
|
self.string = Endpoint(
|
||||||
settings={
|
settings={
|
||||||
'response_type': (str,),
|
'response_type': (str,),
|
||||||
'auth': [],
|
'auth': [],
|
||||||
'endpoint_path': '/fake/outer/string',
|
'endpoint_path': '/fake/refs/string',
|
||||||
'operation_id': 'fake_outer_string_serialize',
|
'operation_id': 'string',
|
||||||
'http_method': 'POST',
|
'http_method': 'POST',
|
||||||
'servers': None,
|
'servers': None,
|
||||||
},
|
},
|
||||||
@@ -719,7 +720,117 @@ class FakeApi(object):
|
|||||||
'content_type': [],
|
'content_type': [],
|
||||||
},
|
},
|
||||||
api_client=api_client,
|
api_client=api_client,
|
||||||
callable=__fake_outer_string_serialize
|
callable=__string
|
||||||
|
)
|
||||||
|
|
||||||
|
def __string_enum(
|
||||||
|
self,
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
"""string_enum # noqa: E501
|
||||||
|
|
||||||
|
Test serialization of outer enum # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.string_enum(async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
body (string_enum.StringEnum): Input enum. [optional]
|
||||||
|
_return_http_data_only (bool): response data without head status
|
||||||
|
code and headers. Default is True.
|
||||||
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
|
will be returned without reading/decoding response data.
|
||||||
|
Default is True.
|
||||||
|
_request_timeout (float/tuple): timeout setting for this request. If one
|
||||||
|
number provided, it will be total request timeout. It can also
|
||||||
|
be a pair (tuple) of (connection, read) timeouts.
|
||||||
|
Default is None.
|
||||||
|
_check_input_type (bool): specifies if type checking
|
||||||
|
should be done one the data sent to the server.
|
||||||
|
Default is True.
|
||||||
|
_check_return_type (bool): specifies if type checking
|
||||||
|
should be done one the data received from the server.
|
||||||
|
Default is True.
|
||||||
|
_host_index (int/None): specifies the index of the server
|
||||||
|
that we want to use.
|
||||||
|
Default is read from the configuration.
|
||||||
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
string_enum.StringEnum
|
||||||
|
If the method is called asynchronously, returns the request
|
||||||
|
thread.
|
||||||
|
"""
|
||||||
|
kwargs['async_req'] = kwargs.get(
|
||||||
|
'async_req', False
|
||||||
|
)
|
||||||
|
kwargs['_return_http_data_only'] = kwargs.get(
|
||||||
|
'_return_http_data_only', True
|
||||||
|
)
|
||||||
|
kwargs['_preload_content'] = kwargs.get(
|
||||||
|
'_preload_content', True
|
||||||
|
)
|
||||||
|
kwargs['_request_timeout'] = kwargs.get(
|
||||||
|
'_request_timeout', None
|
||||||
|
)
|
||||||
|
kwargs['_check_input_type'] = kwargs.get(
|
||||||
|
'_check_input_type', True
|
||||||
|
)
|
||||||
|
kwargs['_check_return_type'] = kwargs.get(
|
||||||
|
'_check_return_type', True
|
||||||
|
)
|
||||||
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
|
return self.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
|
self.string_enum = Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (string_enum.StringEnum,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/fake/refs/enum',
|
||||||
|
'operation_id': 'string_enum',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(string_enum.StringEnum,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'*/*'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client,
|
||||||
|
callable=__string_enum
|
||||||
)
|
)
|
||||||
|
|
||||||
def __test_body_with_file_schema(
|
def __test_body_with_file_schema(
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
validate_get_composed_info,
|
validate_get_composed_info,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum
|
from petstore_api.model import string_enum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum = sys.modules[
|
string_enum = sys.modules[
|
||||||
'petstore_api.model.outer_enum']
|
'petstore_api.model.string_enum']
|
||||||
|
|
||||||
|
|
||||||
class EnumTest(ModelNormal):
|
class EnumTest(ModelNormal):
|
||||||
@@ -107,7 +107,7 @@ class EnumTest(ModelNormal):
|
|||||||
'enum_string': (str,), # noqa: E501
|
'enum_string': (str,), # noqa: E501
|
||||||
'enum_integer': (int,), # noqa: E501
|
'enum_integer': (int,), # noqa: E501
|
||||||
'enum_number': (float,), # noqa: E501
|
'enum_number': (float,), # noqa: E501
|
||||||
'outer_enum': (outer_enum.OuterEnum,), # noqa: E501
|
'string_enum': (string_enum.StringEnum,), # noqa: E501
|
||||||
}
|
}
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
@@ -119,7 +119,7 @@ class EnumTest(ModelNormal):
|
|||||||
'enum_string': 'enum_string', # noqa: E501
|
'enum_string': 'enum_string', # noqa: E501
|
||||||
'enum_integer': 'enum_integer', # noqa: E501
|
'enum_integer': 'enum_integer', # noqa: E501
|
||||||
'enum_number': 'enum_number', # noqa: E501
|
'enum_number': 'enum_number', # noqa: E501
|
||||||
'outer_enum': 'outerEnum', # noqa: E501
|
'string_enum': 'stringEnum', # noqa: E501
|
||||||
}
|
}
|
||||||
|
|
||||||
_composed_schemas = {}
|
_composed_schemas = {}
|
||||||
@@ -174,7 +174,7 @@ class EnumTest(ModelNormal):
|
|||||||
enum_string (str): [optional] # noqa: E501
|
enum_string (str): [optional] # noqa: E501
|
||||||
enum_integer (int): [optional] # noqa: E501
|
enum_integer (int): [optional] # noqa: E501
|
||||||
enum_number (float): [optional] # noqa: E501
|
enum_number (float): [optional] # noqa: E501
|
||||||
outer_enum (outer_enum.OuterEnum): [optional] # noqa: E501
|
string_enum (string_enum.StringEnum): [optional] # noqa: E501
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
_check_type = kwargs.pop('_check_type', True)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OuterNumber(ModelSimple):
|
class NumberWithValidations(ModelSimple):
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
Ref: https://openapi-generator.tech
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ class OuterNumber(ModelSimple):
|
|||||||
|
|
||||||
@convert_js_args_to_python_args
|
@convert_js_args_to_python_args
|
||||||
def __init__(self, value, *args, **kwargs): # noqa: E501
|
def __init__(self, value, *args, **kwargs): # noqa: E501
|
||||||
"""outer_number.OuterNumber - a model defined in OpenAPI
|
"""number_with_validations.NumberWithValidations - a model defined in OpenAPI
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
value (float):
|
value (float):
|
||||||
@@ -34,13 +34,13 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
validate_get_composed_info,
|
validate_get_composed_info,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_number
|
from petstore_api.model import number_with_validations
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_number = sys.modules[
|
number_with_validations = sys.modules[
|
||||||
'petstore_api.model.outer_number']
|
'petstore_api.model.number_with_validations']
|
||||||
|
|
||||||
|
|
||||||
class OuterComposite(ModelNormal):
|
class ObjectModelWithRefProps(ModelNormal):
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
Ref: https://openapi-generator.tech
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ class OuterComposite(ModelNormal):
|
|||||||
and the value is attribute type.
|
and the value is attribute type.
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
'my_number': (outer_number.OuterNumber,), # noqa: E501
|
'my_number': (number_with_validations.NumberWithValidations,), # noqa: E501
|
||||||
'my_string': (str,), # noqa: E501
|
'my_string': (str,), # noqa: E501
|
||||||
'my_boolean': (bool,), # noqa: E501
|
'my_boolean': (bool,), # noqa: E501
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ class OuterComposite(ModelNormal):
|
|||||||
|
|
||||||
@convert_js_args_to_python_args
|
@convert_js_args_to_python_args
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
def __init__(self, *args, **kwargs): # noqa: E501
|
||||||
"""outer_composite.OuterComposite - a model defined in OpenAPI
|
"""object_model_with_ref_props.ObjectModelWithRefProps - a model defined in OpenAPI
|
||||||
|
|
||||||
Keyword Args:
|
Keyword Args:
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
_check_type (bool): if True, values for parameters in openapi_types
|
||||||
@@ -146,7 +146,7 @@ class OuterComposite(ModelNormal):
|
|||||||
Animal class but this time we won't travel
|
Animal class but this time we won't travel
|
||||||
through its discriminator because we passed in
|
through its discriminator because we passed in
|
||||||
_visited_composed_classes = (Animal,)
|
_visited_composed_classes = (Animal,)
|
||||||
my_number (outer_number.OuterNumber): [optional] # noqa: E501
|
my_number (number_with_validations.NumberWithValidations): [optional] # noqa: E501
|
||||||
my_string (str): [optional] # noqa: E501
|
my_string (str): [optional] # noqa: E501
|
||||||
my_boolean (bool): [optional] # noqa: E501
|
my_boolean (bool): [optional] # noqa: E501
|
||||||
"""
|
"""
|
||||||
@@ -35,7 +35,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OuterEnum(ModelSimple):
|
class StringEnum(ModelSimple):
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
Ref: https://openapi-generator.tech
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class OuterEnum(ModelSimple):
|
|||||||
|
|
||||||
@convert_js_args_to_python_args
|
@convert_js_args_to_python_args
|
||||||
def __init__(self, value, *args, **kwargs): # noqa: E501
|
def __init__(self, value, *args, **kwargs): # noqa: E501
|
||||||
"""outer_enum.OuterEnum - a model defined in OpenAPI
|
"""string_enum.StringEnum - a model defined in OpenAPI
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
value (str):
|
value (str):
|
||||||
@@ -57,10 +57,9 @@ from petstore_api.model.model200_response import Model200Response
|
|||||||
from petstore_api.model.model_return import ModelReturn
|
from petstore_api.model.model_return import ModelReturn
|
||||||
from petstore_api.model.name import Name
|
from petstore_api.model.name import Name
|
||||||
from petstore_api.model.number_only import NumberOnly
|
from petstore_api.model.number_only import NumberOnly
|
||||||
|
from petstore_api.model.number_with_validations import NumberWithValidations
|
||||||
|
from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
|
||||||
from petstore_api.model.order import Order
|
from petstore_api.model.order import Order
|
||||||
from petstore_api.model.outer_composite import OuterComposite
|
|
||||||
from petstore_api.model.outer_enum import OuterEnum
|
|
||||||
from petstore_api.model.outer_number import OuterNumber
|
|
||||||
from petstore_api.model.parent import Parent
|
from petstore_api.model.parent import Parent
|
||||||
from petstore_api.model.parent_all_of import ParentAllOf
|
from petstore_api.model.parent_all_of import ParentAllOf
|
||||||
from petstore_api.model.parent_pet import ParentPet
|
from petstore_api.model.parent_pet import ParentPet
|
||||||
@@ -69,6 +68,7 @@ from petstore_api.model.player import Player
|
|||||||
from petstore_api.model.read_only_first import ReadOnlyFirst
|
from petstore_api.model.read_only_first import ReadOnlyFirst
|
||||||
from petstore_api.model.special_model_name import SpecialModelName
|
from petstore_api.model.special_model_name import SpecialModelName
|
||||||
from petstore_api.model.string_boolean_map import StringBooleanMap
|
from petstore_api.model.string_boolean_map import StringBooleanMap
|
||||||
|
from petstore_api.model.string_enum import StringEnum
|
||||||
from petstore_api.model.tag import Tag
|
from petstore_api.model.tag import Tag
|
||||||
from petstore_api.model.type_holder_default import TypeHolderDefault
|
from petstore_api.model.type_holder_default import TypeHolderDefault
|
||||||
from petstore_api.model.type_holder_example import TypeHolderExample
|
from petstore_api.model.type_holder_example import TypeHolderExample
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ import unittest
|
|||||||
|
|
||||||
import petstore_api
|
import petstore_api
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum
|
from petstore_api.model import string_enum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum = sys.modules[
|
string_enum = sys.modules[
|
||||||
'petstore_api.model.outer_enum']
|
'petstore_api.model.string_enum']
|
||||||
from petstore_api.model.enum_test import EnumTest
|
from petstore_api.model.enum_test import EnumTest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,43 +34,58 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def test_fake_outer_boolean_serialize(self):
|
def test_boolean(self):
|
||||||
"""Test case for fake_outer_boolean_serialize
|
"""Test case for boolean
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
endpoint = self.api.boolean
|
||||||
|
assert endpoint.openapi_types['body'] == (bool,)
|
||||||
|
assert endpoint.settings['response_type'] == (bool,)
|
||||||
|
|
||||||
def test_fake_outer_composite_serialize(self):
|
def test_string(self):
|
||||||
"""Test case for fake_outer_composite_serialize
|
"""Test case for string
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
from petstore_api.model_utils import str
|
||||||
|
endpoint = self.api.string
|
||||||
|
assert endpoint.openapi_types['body'] == (str,)
|
||||||
|
assert endpoint.settings['response_type'] == (str,)
|
||||||
|
|
||||||
def test_fake_outer_enum_serialize(self):
|
def test_object_model_with_ref_props(self):
|
||||||
"""Test case for fake_outer_enum_serialize
|
"""Test case for object_model_with_ref_props
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# verify that the input and output are type OuterEnum
|
from petstore_api.model import object_model_with_ref_props
|
||||||
from petstore_api.model import outer_enum
|
endpoint = self.api.object_model_with_ref_props
|
||||||
endpoint = self.api.fake_outer_enum_serialize
|
assert endpoint.openapi_types['body'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
||||||
assert endpoint.openapi_types['body'] == (outer_enum.OuterEnum,)
|
assert endpoint.settings['response_type'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
||||||
assert endpoint.settings['response_type'] == (outer_enum.OuterEnum,)
|
|
||||||
|
|
||||||
def test_fake_outer_number_serialize(self):
|
def test_string_enum(self):
|
||||||
"""Test case for fake_outer_number_serialize
|
"""Test case for string_enum
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# verify that the input and output are the correct type
|
from petstore_api.model import string_enum
|
||||||
from petstore_api.model import outer_number
|
endpoint = self.api.string_enum
|
||||||
endpoint = self.api.fake_outer_number_serialize
|
assert endpoint.openapi_types['body'] == (string_enum.StringEnum,)
|
||||||
assert endpoint.openapi_types['body'] == (outer_number.OuterNumber,)
|
assert endpoint.settings['response_type'] == (string_enum.StringEnum,)
|
||||||
assert endpoint.settings['response_type'] == (outer_number.OuterNumber,)
|
|
||||||
|
|
||||||
def test_fake_outer_string_serialize(self):
|
def test_array_model(self):
|
||||||
"""Test case for fake_outer_string_serialize
|
"""Test case for array_model
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
from petstore_api.model import animal_farm
|
||||||
|
endpoint = self.api.array_model
|
||||||
|
assert endpoint.openapi_types['body'] == (animal_farm.AnimalFarm,)
|
||||||
|
assert endpoint.settings['response_type'] == (animal_farm.AnimalFarm,)
|
||||||
|
|
||||||
|
def test_number_with_validations(self):
|
||||||
|
"""Test case for number_with_validations
|
||||||
|
|
||||||
|
"""
|
||||||
|
from petstore_api.model import number_with_validations
|
||||||
|
endpoint = self.api.number_with_validations
|
||||||
|
assert endpoint.openapi_types['body'] == (number_with_validations.NumberWithValidations,)
|
||||||
|
assert endpoint.settings['response_type'] == (number_with_validations.NumberWithValidations,)
|
||||||
|
|
||||||
def test_test_body_with_file_schema(self):
|
def test_test_body_with_file_schema(self):
|
||||||
"""Test case for test_body_with_file_schema
|
"""Test case for test_body_with_file_schema
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
OpenAPI 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: \" \\ # noqa: E501
|
||||||
|
|
||||||
|
The version of the OpenAPI document: 1.0.0
|
||||||
|
Generated by: https://openapi-generator.tech
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.model.number_with_validations import NumberWithValidations
|
||||||
|
|
||||||
|
|
||||||
|
class TestNumberWithValidations(unittest.TestCase):
|
||||||
|
"""NumberWithValidations unit test stubs"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def testNumberWithValidations(self):
|
||||||
|
"""Test NumberWithValidations"""
|
||||||
|
valid_values = [10.0, 15.0, 20.0]
|
||||||
|
for valid_value in valid_values:
|
||||||
|
model = NumberWithValidations(valid_value)
|
||||||
|
assert model.value == valid_value
|
||||||
|
|
||||||
|
invalid_values = [9.0, 21.0]
|
||||||
|
for invalid_value in invalid_values:
|
||||||
|
with self.assertRaises(petstore_api.ApiValueError):
|
||||||
|
NumberWithValidations(invalid_value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
OpenAPI 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: \" \\ # noqa: E501
|
||||||
|
|
||||||
|
The version of the OpenAPI document: 1.0.0
|
||||||
|
Generated by: https://openapi-generator.tech
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import petstore_api
|
||||||
|
try:
|
||||||
|
from petstore_api.model import number_with_validations
|
||||||
|
except ImportError:
|
||||||
|
number_with_validations = sys.modules[
|
||||||
|
'petstore_api.model.number_with_validations']
|
||||||
|
from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
|
||||||
|
|
||||||
|
|
||||||
|
class TestObjectModelWithRefProps(unittest.TestCase):
|
||||||
|
"""ObjectModelWithRefProps unit test stubs"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def testObjectModelWithRefProps(self):
|
||||||
|
"""Test ObjectModelWithRefProps"""
|
||||||
|
from petstore_api.model.object_model_with_ref_props import str, number_with_validations
|
||||||
|
self.assertEqual(
|
||||||
|
ObjectModelWithRefProps.openapi_types,
|
||||||
|
{
|
||||||
|
'my_number': (number_with_validations.NumberWithValidations,),
|
||||||
|
'my_string': (str,),
|
||||||
|
'my_boolean': (bool,),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
@@ -15,11 +15,11 @@ import sys
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import petstore_api
|
import petstore_api
|
||||||
from petstore_api.model.outer_enum import OuterEnum
|
from petstore_api.model.string_enum import StringEnum
|
||||||
|
|
||||||
|
|
||||||
class TestOuterEnum(unittest.TestCase):
|
class TestStringEnum(unittest.TestCase):
|
||||||
"""OuterEnum unit test stubs"""
|
"""StringEnum unit test stubs"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
pass
|
pass
|
||||||
@@ -27,20 +27,22 @@ class TestOuterEnum(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def testOuterEnum(self):
|
def testStringEnum(self):
|
||||||
|
"""Test StringEnum"""
|
||||||
|
|
||||||
"""Test OuterEnum"""
|
"""Test OuterEnum"""
|
||||||
# make sure that we can access its allowed_values
|
# make sure that we can access its allowed_values
|
||||||
assert OuterEnum.allowed_values[('value',)] == {
|
assert StringEnum.allowed_values[('value',)] == {
|
||||||
'PLACED': "placed",
|
'PLACED': "placed",
|
||||||
'APPROVED': "approved",
|
'APPROVED': "approved",
|
||||||
'DELIVERED': "delivered"
|
'DELIVERED': "delivered"
|
||||||
}
|
}
|
||||||
# make sure that an exception is thrown on an invalid value
|
# make sure that an exception is thrown on an invalid value
|
||||||
with self.assertRaises(petstore_api.ApiValueError):
|
with self.assertRaises(petstore_api.ApiValueError):
|
||||||
OuterEnum('bad_value')
|
StringEnum('bad_value')
|
||||||
# make sure valid value works
|
# make sure valid value works
|
||||||
valid_value = OuterEnum.allowed_values[('value',)]['PLACED']
|
valid_value = StringEnum.allowed_values[('value',)]['PLACED']
|
||||||
assert valid_value == OuterEnum(valid_value).value
|
assert valid_value == StringEnum(valid_value).value
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@@ -32,8 +32,8 @@ from petstore_api.model import (
|
|||||||
parent_pet,
|
parent_pet,
|
||||||
child_lizard,
|
child_lizard,
|
||||||
category,
|
category,
|
||||||
outer_enum,
|
string_enum,
|
||||||
outer_number,
|
number_with_validations,
|
||||||
string_boolean_map,
|
string_boolean_map,
|
||||||
)
|
)
|
||||||
from petstore_api.model_utils import (
|
from petstore_api.model_utils import (
|
||||||
@@ -61,7 +61,7 @@ class DeserializationTests(unittest.TestCase):
|
|||||||
"enum_string_required": "lower",
|
"enum_string_required": "lower",
|
||||||
"enum_integer": 1,
|
"enum_integer": 1,
|
||||||
"enum_number": 1.1,
|
"enum_number": 1.1,
|
||||||
"outerEnum": "placed"
|
"stringEnum": "placed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response = MockResponse(data=json.dumps(data))
|
response = MockResponse(data=json.dumps(data))
|
||||||
@@ -72,14 +72,14 @@ class DeserializationTests(unittest.TestCase):
|
|||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
isinstance(deserialized['enum_test'], enum_test.EnumTest))
|
isinstance(deserialized['enum_test'], enum_test.EnumTest))
|
||||||
value = (
|
value = (
|
||||||
outer_enum.OuterEnum.allowed_values[('value',)]["PLACED"])
|
string_enum.StringEnum.allowed_values[('value',)]["PLACED"])
|
||||||
outer_enum_val = outer_enum.OuterEnum(value)
|
string_enum_val = string_enum.StringEnum(value)
|
||||||
sample_instance = enum_test.EnumTest(
|
sample_instance = enum_test.EnumTest(
|
||||||
enum_string="UPPER",
|
enum_string="UPPER",
|
||||||
enum_string_required="lower",
|
enum_string_required="lower",
|
||||||
enum_integer=1,
|
enum_integer=1,
|
||||||
enum_number=1.1,
|
enum_number=1.1,
|
||||||
outer_enum=outer_enum_val
|
string_enum=string_enum_val
|
||||||
)
|
)
|
||||||
self.assertEqual(deserialized['enum_test'], sample_instance)
|
self.assertEqual(deserialized['enum_test'], sample_instance)
|
||||||
|
|
||||||
@@ -305,27 +305,27 @@ class DeserializationTests(unittest.TestCase):
|
|||||||
with self.assertRaises(ApiValueError):
|
with self.assertRaises(ApiValueError):
|
||||||
self.deserialize(
|
self.deserialize(
|
||||||
MockResponse(data=json.dumps("test str")),
|
MockResponse(data=json.dumps("test str")),
|
||||||
(outer_enum.OuterEnum,),
|
(string_enum.StringEnum,),
|
||||||
True
|
True
|
||||||
)
|
)
|
||||||
|
|
||||||
# valid value works
|
# valid value works
|
||||||
placed_str = (
|
placed_str = (
|
||||||
outer_enum.OuterEnum.allowed_values[('value',)]["PLACED"]
|
string_enum.StringEnum.allowed_values[('value',)]["PLACED"]
|
||||||
)
|
)
|
||||||
response = MockResponse(data=json.dumps(placed_str))
|
response = MockResponse(data=json.dumps(placed_str))
|
||||||
deserialized = self.deserialize(response,
|
deserialized = self.deserialize(response,
|
||||||
(outer_enum.OuterEnum,), True)
|
(string_enum.StringEnum,), True)
|
||||||
self.assertTrue(isinstance(deserialized, outer_enum.OuterEnum))
|
self.assertTrue(isinstance(deserialized, string_enum.StringEnum))
|
||||||
self.assertTrue(deserialized.value == placed_str)
|
self.assertTrue(deserialized.value == placed_str)
|
||||||
|
|
||||||
def test_deserialize_OuterNumber(self):
|
def test_deserialize_NumberWithValidations(self):
|
||||||
""" deserialize OuterNumber """
|
""" deserialize NumberWithValidations """
|
||||||
# make sure that an exception is thrown on an invalid type value
|
# make sure that an exception is thrown on an invalid type value
|
||||||
with self.assertRaises(ApiTypeError):
|
with self.assertRaises(ApiTypeError):
|
||||||
deserialized = self.deserialize(
|
deserialized = self.deserialize(
|
||||||
MockResponse(data=json.dumps("test str")),
|
MockResponse(data=json.dumps("test str")),
|
||||||
(outer_number.OuterNumber,),
|
(number_with_validations.NumberWithValidations,),
|
||||||
True
|
True
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -333,7 +333,7 @@ class DeserializationTests(unittest.TestCase):
|
|||||||
with self.assertRaises(ApiValueError):
|
with self.assertRaises(ApiValueError):
|
||||||
deserialized = self.deserialize(
|
deserialized = self.deserialize(
|
||||||
MockResponse(data=json.dumps(21.0)),
|
MockResponse(data=json.dumps(21.0)),
|
||||||
(outer_number.OuterNumber,),
|
(number_with_validations.NumberWithValidations,),
|
||||||
True
|
True
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -341,8 +341,8 @@ class DeserializationTests(unittest.TestCase):
|
|||||||
number_val = 11.0
|
number_val = 11.0
|
||||||
response = MockResponse(data=json.dumps(number_val))
|
response = MockResponse(data=json.dumps(number_val))
|
||||||
number = self.deserialize(response,
|
number = self.deserialize(response,
|
||||||
(outer_number.OuterNumber,), True)
|
(number_with_validations.NumberWithValidations,), True)
|
||||||
self.assertTrue(isinstance(number, outer_number.OuterNumber))
|
self.assertTrue(isinstance(number, number_with_validations.NumberWithValidations))
|
||||||
self.assertTrue(number.value == number_val)
|
self.assertTrue(number.value == number_val)
|
||||||
|
|
||||||
def test_deserialize_file(self):
|
def test_deserialize_file(self):
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ from petstore_api.model import (
|
|||||||
parent_pet,
|
parent_pet,
|
||||||
child_lizard,
|
child_lizard,
|
||||||
category,
|
category,
|
||||||
outer_enum,
|
string_enum,
|
||||||
outer_number,
|
|
||||||
string_boolean_map,
|
string_boolean_map,
|
||||||
)
|
)
|
||||||
from petstore_api.model_utils import (
|
from petstore_api.model_utils import (
|
||||||
@@ -56,15 +55,15 @@ class SerializationTests(unittest.TestCase):
|
|||||||
def test_enum_test(self):
|
def test_enum_test(self):
|
||||||
""" serialize dict(str, Enum_Test) """
|
""" serialize dict(str, Enum_Test) """
|
||||||
value = (
|
value = (
|
||||||
outer_enum.OuterEnum.allowed_values[('value',)]["PLACED"])
|
string_enum.StringEnum.allowed_values[('value',)]["PLACED"])
|
||||||
outer_enum_val = outer_enum.OuterEnum(value)
|
string_enum_val = string_enum.StringEnum(value)
|
||||||
|
|
||||||
source = enum_test.EnumTest(
|
source = enum_test.EnumTest(
|
||||||
enum_string="UPPER",
|
enum_string="UPPER",
|
||||||
enum_string_required="lower",
|
enum_string_required="lower",
|
||||||
enum_integer=1,
|
enum_integer=1,
|
||||||
enum_number=1.1,
|
enum_number=1.1,
|
||||||
outer_enum=outer_enum_val
|
string_enum=string_enum_val
|
||||||
)
|
)
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
@@ -73,7 +72,7 @@ class SerializationTests(unittest.TestCase):
|
|||||||
"enum_string_required": "lower",
|
"enum_string_required": "lower",
|
||||||
"enum_integer": 1,
|
"enum_integer": 1,
|
||||||
"enum_number": 1.1,
|
"enum_number": 1.1,
|
||||||
"outerEnum": "placed"
|
"stringEnum": "placed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
serialized = self.serialize({"enum_test": source})
|
serialized = self.serialize({"enum_test": source})
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ To test special tags and operation ID starting with number
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.AnotherFakeApi;
|
import org.openapitools.client.api.AnotherFakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Method | HTTP request | Description
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.DefaultApi;
|
import org.openapitools.client.api.DefaultApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Health check endpoint
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -96,7 +96,7 @@ Test serialization of outer boolean types
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -161,7 +161,7 @@ Test serialization of object with outer number type
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -226,7 +226,7 @@ Test serialization of outer number types
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -291,7 +291,7 @@ Test serialization of outer string types
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -354,7 +354,7 @@ Array of Enums
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -415,7 +415,7 @@ For this test, the body for this request much reference a schema named `File`.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -477,7 +477,7 @@ No authorization required
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -543,7 +543,7 @@ To test "client" model
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -613,7 +613,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -709,7 +709,7 @@ To test enum parameters
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -789,7 +789,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -872,7 +872,7 @@ test inline additionalProperties
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -934,7 +934,7 @@ test json serialization of form data
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -1000,7 +1000,7 @@ To test the collection format in query parameters
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeApi;
|
import org.openapitools.client.api.FakeApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.FakeClassnameTags123Api;
|
import org.openapitools.client.api.FakeClassnameTags123Api;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -98,7 +98,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -169,7 +169,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -241,7 +241,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -313,7 +313,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -385,7 +385,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -455,7 +455,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -526,7 +526,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -598,7 +598,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.PetApi;
|
import org.openapitools.client.api.PetApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -92,7 +92,7 @@ import org.openapitools.client.ApiClient;
|
|||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -159,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -224,7 +224,7 @@ Place an order for a pet
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.StoreApi;
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ This can only be done by the logged in user.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -92,7 +92,7 @@ Creates list of users with given input array
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -154,7 +154,7 @@ Creates list of users with given input array
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -218,7 +218,7 @@ This can only be done by the logged in user.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -281,7 +281,7 @@ Get user by user name
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -346,7 +346,7 @@ Logs user into the system
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -412,7 +412,7 @@ Logs out current logged in user session
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
@@ -472,7 +472,7 @@ This can only be done by the logged in user.
|
|||||||
import org.openapitools.client.ApiClient;
|
import org.openapitools.client.ApiClient;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Configuration;
|
import org.openapitools.client.Configuration;
|
||||||
import org.openapitools.client.models.*;
|
import org.openapitools.client.model.*;
|
||||||
import org.openapitools.client.api.UserApi;
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|||||||
@@ -884,7 +884,7 @@ public class ApiClient {
|
|||||||
* @param obj Object
|
* @param obj Object
|
||||||
* @param formParams Form parameters
|
* @param formParams Form parameters
|
||||||
* @param contentType Context type
|
* @param contentType Context type
|
||||||
* @param isBodyNulalble True if the body is nullable
|
* @param isBodyNullable True if the body is nullable
|
||||||
* @return String
|
* @return String
|
||||||
* @throws ApiException API exception
|
* @throws ApiException API exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ docs/InlineObject3.md
|
|||||||
docs/InlineObject4.md
|
docs/InlineObject4.md
|
||||||
docs/InlineObject5.md
|
docs/InlineObject5.md
|
||||||
docs/InlineResponseDefault.md
|
docs/InlineResponseDefault.md
|
||||||
|
docs/IntegerEnum.md
|
||||||
|
docs/IntegerEnumOneValue.md
|
||||||
|
docs/IntegerEnumWithDefaultValue.md
|
||||||
docs/IsoscelesTriangle.md
|
docs/IsoscelesTriangle.md
|
||||||
docs/List.md
|
docs/List.md
|
||||||
docs/Mammal.md
|
docs/Mammal.md
|
||||||
@@ -66,12 +69,9 @@ docs/Name.md
|
|||||||
docs/NullableClass.md
|
docs/NullableClass.md
|
||||||
docs/NullableShape.md
|
docs/NullableShape.md
|
||||||
docs/NumberOnly.md
|
docs/NumberOnly.md
|
||||||
|
docs/NumberWithValidations.md
|
||||||
|
docs/ObjectModelWithRefProps.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
docs/OuterComposite.md
|
|
||||||
docs/OuterEnum.md
|
|
||||||
docs/OuterEnumDefaultValue.md
|
|
||||||
docs/OuterEnumInteger.md
|
|
||||||
docs/OuterEnumIntegerDefaultValue.md
|
|
||||||
docs/ParentPet.md
|
docs/ParentPet.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@@ -87,6 +87,8 @@ docs/SimpleQuadrilateral.md
|
|||||||
docs/SpecialModelName.md
|
docs/SpecialModelName.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/StringBooleanMap.md
|
docs/StringBooleanMap.md
|
||||||
|
docs/StringEnum.md
|
||||||
|
docs/StringEnumWithDefaultValue.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
docs/Triangle.md
|
docs/Triangle.md
|
||||||
docs/TriangleInterface.md
|
docs/TriangleInterface.md
|
||||||
@@ -158,6 +160,9 @@ petstore_api/model/inline_object3.py
|
|||||||
petstore_api/model/inline_object4.py
|
petstore_api/model/inline_object4.py
|
||||||
petstore_api/model/inline_object5.py
|
petstore_api/model/inline_object5.py
|
||||||
petstore_api/model/inline_response_default.py
|
petstore_api/model/inline_response_default.py
|
||||||
|
petstore_api/model/integer_enum.py
|
||||||
|
petstore_api/model/integer_enum_one_value.py
|
||||||
|
petstore_api/model/integer_enum_with_default_value.py
|
||||||
petstore_api/model/isosceles_triangle.py
|
petstore_api/model/isosceles_triangle.py
|
||||||
petstore_api/model/list.py
|
petstore_api/model/list.py
|
||||||
petstore_api/model/mammal.py
|
petstore_api/model/mammal.py
|
||||||
@@ -169,12 +174,9 @@ petstore_api/model/name.py
|
|||||||
petstore_api/model/nullable_class.py
|
petstore_api/model/nullable_class.py
|
||||||
petstore_api/model/nullable_shape.py
|
petstore_api/model/nullable_shape.py
|
||||||
petstore_api/model/number_only.py
|
petstore_api/model/number_only.py
|
||||||
|
petstore_api/model/number_with_validations.py
|
||||||
|
petstore_api/model/object_model_with_ref_props.py
|
||||||
petstore_api/model/order.py
|
petstore_api/model/order.py
|
||||||
petstore_api/model/outer_composite.py
|
|
||||||
petstore_api/model/outer_enum.py
|
|
||||||
petstore_api/model/outer_enum_default_value.py
|
|
||||||
petstore_api/model/outer_enum_integer.py
|
|
||||||
petstore_api/model/outer_enum_integer_default_value.py
|
|
||||||
petstore_api/model/parent_pet.py
|
petstore_api/model/parent_pet.py
|
||||||
petstore_api/model/pet.py
|
petstore_api/model/pet.py
|
||||||
petstore_api/model/pig.py
|
petstore_api/model/pig.py
|
||||||
@@ -188,6 +190,8 @@ petstore_api/model/shape_or_null.py
|
|||||||
petstore_api/model/simple_quadrilateral.py
|
petstore_api/model/simple_quadrilateral.py
|
||||||
petstore_api/model/special_model_name.py
|
petstore_api/model/special_model_name.py
|
||||||
petstore_api/model/string_boolean_map.py
|
petstore_api/model/string_boolean_map.py
|
||||||
|
petstore_api/model/string_enum.py
|
||||||
|
petstore_api/model/string_enum_with_default_value.py
|
||||||
petstore_api/model/tag.py
|
petstore_api/model/tag.py
|
||||||
petstore_api/model/triangle.py
|
petstore_api/model/triangle.py
|
||||||
petstore_api/model/triangle_interface.py
|
petstore_api/model/triangle_interface.py
|
||||||
|
|||||||
@@ -82,13 +82,15 @@ Class | Method | HTTP request | Description
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||||
|
*FakeApi* | [**additional_properties_with_array_of_enums**](docs/FakeApi.md#additional_properties_with_array_of_enums) | **GET** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums
|
||||||
|
*FakeApi* | [**array_model**](docs/FakeApi.md#array_model) | **POST** /fake/refs/arraymodel |
|
||||||
|
*FakeApi* | [**array_of_enums**](docs/FakeApi.md#array_of_enums) | **POST** /fake/refs/array-of-enums | Array of Enums
|
||||||
|
*FakeApi* | [**boolean**](docs/FakeApi.md#boolean) | **POST** /fake/refs/boolean |
|
||||||
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||||
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
*FakeApi* | [**number_with_validations**](docs/FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
|
||||||
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
*FakeApi* | [**object_model_with_ref_props**](docs/FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
|
||||||
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
*FakeApi* | [**string**](docs/FakeApi.md#string) | **POST** /fake/refs/string |
|
||||||
*FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
*FakeApi* | [**string_enum**](docs/FakeApi.md#string_enum) | **POST** /fake/refs/enum |
|
||||||
*FakeApi* | [**get_additional_properties_with_array_of_enums**](docs/FakeApi.md#get_additional_properties_with_array_of_enums) | **GET** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums
|
|
||||||
*FakeApi* | [**get_array_of_enums**](docs/FakeApi.md#get_array_of_enums) | **GET** /fake/array-of-enums | Array of Enums
|
|
||||||
*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
||||||
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
||||||
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
||||||
@@ -173,6 +175,9 @@ Class | Method | HTTP request | Description
|
|||||||
- [inline_object4.InlineObject4](docs/InlineObject4.md)
|
- [inline_object4.InlineObject4](docs/InlineObject4.md)
|
||||||
- [inline_object5.InlineObject5](docs/InlineObject5.md)
|
- [inline_object5.InlineObject5](docs/InlineObject5.md)
|
||||||
- [inline_response_default.InlineResponseDefault](docs/InlineResponseDefault.md)
|
- [inline_response_default.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||||
|
- [integer_enum.IntegerEnum](docs/IntegerEnum.md)
|
||||||
|
- [integer_enum_one_value.IntegerEnumOneValue](docs/IntegerEnumOneValue.md)
|
||||||
|
- [integer_enum_with_default_value.IntegerEnumWithDefaultValue](docs/IntegerEnumWithDefaultValue.md)
|
||||||
- [isosceles_triangle.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
- [isosceles_triangle.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||||
- [list.List](docs/List.md)
|
- [list.List](docs/List.md)
|
||||||
- [mammal.Mammal](docs/Mammal.md)
|
- [mammal.Mammal](docs/Mammal.md)
|
||||||
@@ -184,12 +189,9 @@ Class | Method | HTTP request | Description
|
|||||||
- [nullable_class.NullableClass](docs/NullableClass.md)
|
- [nullable_class.NullableClass](docs/NullableClass.md)
|
||||||
- [nullable_shape.NullableShape](docs/NullableShape.md)
|
- [nullable_shape.NullableShape](docs/NullableShape.md)
|
||||||
- [number_only.NumberOnly](docs/NumberOnly.md)
|
- [number_only.NumberOnly](docs/NumberOnly.md)
|
||||||
|
- [number_with_validations.NumberWithValidations](docs/NumberWithValidations.md)
|
||||||
|
- [object_model_with_ref_props.ObjectModelWithRefProps](docs/ObjectModelWithRefProps.md)
|
||||||
- [order.Order](docs/Order.md)
|
- [order.Order](docs/Order.md)
|
||||||
- [outer_composite.OuterComposite](docs/OuterComposite.md)
|
|
||||||
- [outer_enum.OuterEnum](docs/OuterEnum.md)
|
|
||||||
- [outer_enum_default_value.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
|
|
||||||
- [outer_enum_integer.OuterEnumInteger](docs/OuterEnumInteger.md)
|
|
||||||
- [outer_enum_integer_default_value.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
|
|
||||||
- [parent_pet.ParentPet](docs/ParentPet.md)
|
- [parent_pet.ParentPet](docs/ParentPet.md)
|
||||||
- [pet.Pet](docs/Pet.md)
|
- [pet.Pet](docs/Pet.md)
|
||||||
- [pig.Pig](docs/Pig.md)
|
- [pig.Pig](docs/Pig.md)
|
||||||
@@ -203,6 +205,8 @@ Class | Method | HTTP request | Description
|
|||||||
- [simple_quadrilateral.SimpleQuadrilateral](docs/SimpleQuadrilateral.md)
|
- [simple_quadrilateral.SimpleQuadrilateral](docs/SimpleQuadrilateral.md)
|
||||||
- [special_model_name.SpecialModelName](docs/SpecialModelName.md)
|
- [special_model_name.SpecialModelName](docs/SpecialModelName.md)
|
||||||
- [string_boolean_map.StringBooleanMap](docs/StringBooleanMap.md)
|
- [string_boolean_map.StringBooleanMap](docs/StringBooleanMap.md)
|
||||||
|
- [string_enum.StringEnum](docs/StringEnum.md)
|
||||||
|
- [string_enum_with_default_value.StringEnumWithDefaultValue](docs/StringEnumWithDefaultValue.md)
|
||||||
- [tag.Tag](docs/Tag.md)
|
- [tag.Tag](docs/Tag.md)
|
||||||
- [triangle.Triangle](docs/Triangle.md)
|
- [triangle.Triangle](docs/Triangle.md)
|
||||||
- [triangle_interface.TriangleInterface](docs/TriangleInterface.md)
|
- [triangle_interface.TriangleInterface](docs/TriangleInterface.md)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**value** | [**[outer_enum.OuterEnum, none_type]**](OuterEnum.md) | |
|
**value** | [**[string_enum.StringEnum, none_type]**](StringEnum.md) | |
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ Name | Type | Description | Notes
|
|||||||
**enum_string** | **str** | | [optional]
|
**enum_string** | **str** | | [optional]
|
||||||
**enum_integer** | **int** | | [optional]
|
**enum_integer** | **int** | | [optional]
|
||||||
**enum_number** | **float** | | [optional]
|
**enum_number** | **float** | | [optional]
|
||||||
**outer_enum** | [**outer_enum.OuterEnum**](OuterEnum.md) | | [optional]
|
**string_enum** | [**string_enum.StringEnum**](StringEnum.md) | | [optional]
|
||||||
**outer_enum_integer** | [**outer_enum_integer.OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
|
**integer_enum** | [**integer_enum.IntegerEnum**](IntegerEnum.md) | | [optional]
|
||||||
**outer_enum_default_value** | [**outer_enum_default_value.OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
|
**string_enum_with_default_value** | [**string_enum_with_default_value.StringEnumWithDefaultValue**](StringEnumWithDefaultValue.md) | | [optional]
|
||||||
**outer_enum_integer_default_value** | [**outer_enum_integer_default_value.OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
**integer_enum_with_default_value** | [**integer_enum_with_default_value.IntegerEnumWithDefaultValue**](IntegerEnumWithDefaultValue.md) | | [optional]
|
||||||
|
**integer_enum_one_value** | [**integer_enum_one_value.IntegerEnumOneValue**](IntegerEnumOneValue.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,15 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**additional_properties_with_array_of_enums**](FakeApi.md#additional_properties_with_array_of_enums) | **GET** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums
|
||||||
|
[**array_model**](FakeApi.md#array_model) | **POST** /fake/refs/arraymodel |
|
||||||
|
[**array_of_enums**](FakeApi.md#array_of_enums) | **POST** /fake/refs/array-of-enums | Array of Enums
|
||||||
|
[**boolean**](FakeApi.md#boolean) | **POST** /fake/refs/boolean |
|
||||||
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||||
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
[**number_with_validations**](FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
|
||||||
[**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
[**object_model_with_ref_props**](FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
|
||||||
[**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
[**string**](FakeApi.md#string) | **POST** /fake/refs/string |
|
||||||
[**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
[**string_enum**](FakeApi.md#string_enum) | **POST** /fake/refs/enum |
|
||||||
[**get_additional_properties_with_array_of_enums**](FakeApi.md#get_additional_properties_with_array_of_enums) | **GET** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums
|
|
||||||
[**get_array_of_enums**](FakeApi.md#get_array_of_enums) | **GET** /fake/array-of-enums | Array of Enums
|
|
||||||
[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
||||||
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
||||||
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
||||||
@@ -22,6 +24,259 @@ Method | HTTP request | Description
|
|||||||
[**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-paramters |
|
[**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-paramters |
|
||||||
|
|
||||||
|
|
||||||
|
# **additional_properties_with_array_of_enums**
|
||||||
|
> additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums additional_properties_with_array_of_enums()
|
||||||
|
|
||||||
|
Additional Properties with Array of Enums
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import additional_properties_with_array_of_enums
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
additional_properties_with_array_of_enums_additional_properties_with_array_of_enums = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums() # additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums | Input enum (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
# Additional Properties with Array of Enums
|
||||||
|
api_response = api_instance.additional_properties_with_array_of_enums(additional_properties_with_array_of_enums_additional_properties_with_array_of_enums=additional_properties_with_array_of_enums_additional_properties_with_array_of_enums)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->additional_properties_with_array_of_enums: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**additional_properties_with_array_of_enums_additional_properties_with_array_of_enums** | [**additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums**](AdditionalPropertiesWithArrayOfEnums.md)| Input enum | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums**](AdditionalPropertiesWithArrayOfEnums.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Got object with additional properties with array of enums | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
# **array_model**
|
||||||
|
> animal_farm.AnimalFarm array_model()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of ArrayModel
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import animal_farm
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = animal_farm.AnimalFarm() # animal_farm.AnimalFarm | Input model (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.array_model(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->array_model: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**animal_farm.AnimalFarm**](AnimalFarm.md)| Input model | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**animal_farm.AnimalFarm**](AnimalFarm.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output model | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
# **array_of_enums**
|
||||||
|
> array_of_enums.ArrayOfEnums array_of_enums()
|
||||||
|
|
||||||
|
Array of Enums
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import array_of_enums
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
array_of_enums_array_of_enums = array_of_enums.ArrayOfEnums() # array_of_enums.ArrayOfEnums | Input enum (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
# Array of Enums
|
||||||
|
api_response = api_instance.array_of_enums(array_of_enums_array_of_enums=array_of_enums_array_of_enums)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->array_of_enums: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**array_of_enums_array_of_enums** | [**array_of_enums.ArrayOfEnums**](ArrayOfEnums.md)| Input enum | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**array_of_enums.ArrayOfEnums**](ArrayOfEnums.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Got named array of enums | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
# **boolean**
|
||||||
|
> bool boolean()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = True # bool | Input boolean as post body (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.boolean(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->boolean: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **bool**| Input boolean as post body | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**bool**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output boolean | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
# **fake_health_get**
|
# **fake_health_get**
|
||||||
> health_check_result.HealthCheckResult fake_health_get()
|
> health_check_result.HealthCheckResult fake_health_get()
|
||||||
|
|
||||||
@@ -80,135 +335,8 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **fake_outer_boolean_serialize**
|
# **number_with_validations**
|
||||||
> bool fake_outer_boolean_serialize()
|
> number_with_validations.NumberWithValidations number_with_validations()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer boolean types
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from __future__ import print_function
|
|
||||||
import time
|
|
||||||
import petstore_api
|
|
||||||
from petstore_api.api import fake_api
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = petstore_api.Configuration(
|
|
||||||
host = "http://petstore.swagger.io:80/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with petstore_api.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
|
||||||
body = True # bool | Input boolean as post body (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
api_response = api_instance.fake_outer_boolean_serialize(body=body)
|
|
||||||
pprint(api_response)
|
|
||||||
except petstore_api.ApiException as e:
|
|
||||||
print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | **bool**| Input boolean as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**bool**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | Output boolean | - |
|
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
# **fake_outer_composite_serialize**
|
|
||||||
> outer_composite.OuterComposite fake_outer_composite_serialize()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of object with outer number type
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from __future__ import print_function
|
|
||||||
import time
|
|
||||||
import petstore_api
|
|
||||||
from petstore_api.api import fake_api
|
|
||||||
from petstore_api.model import outer_composite
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = petstore_api.Configuration(
|
|
||||||
host = "http://petstore.swagger.io:80/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with petstore_api.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
|
||||||
outer_composite_outer_composite = outer_composite.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
api_response = api_instance.fake_outer_composite_serialize(outer_composite_outer_composite=outer_composite_outer_composite)
|
|
||||||
pprint(api_response)
|
|
||||||
except petstore_api.ApiException as e:
|
|
||||||
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**outer_composite_outer_composite** | [**outer_composite.OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**outer_composite.OuterComposite**](OuterComposite.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: */*
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | Output composite | - |
|
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
# **fake_outer_number_serialize**
|
|
||||||
> float fake_outer_number_serialize()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -221,6 +349,7 @@ from __future__ import print_function
|
|||||||
import time
|
import time
|
||||||
import petstore_api
|
import petstore_api
|
||||||
from petstore_api.api import fake_api
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import number_with_validations
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
@@ -233,26 +362,26 @@ configuration = petstore_api.Configuration(
|
|||||||
with petstore_api.ApiClient() as api_client:
|
with petstore_api.ApiClient() as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
body = 3.4 # float | Input number as post body (optional)
|
body = number_with_validations.NumberWithValidations(3.4) # number_with_validations.NumberWithValidations | Input number as post body (optional)
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
# and optional values
|
# and optional values
|
||||||
try:
|
try:
|
||||||
api_response = api_instance.fake_outer_number_serialize(body=body)
|
api_response = api_instance.number_with_validations(body=body)
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except petstore_api.ApiException as e:
|
except petstore_api.ApiException as e:
|
||||||
print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e)
|
print("Exception when calling FakeApi->number_with_validations: %s\n" % e)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **float**| Input number as post body | [optional]
|
**body** | [**number_with_validations.NumberWithValidations**](NumberWithValidations.md)| Input number as post body | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
**float**
|
[**number_with_validations.NumberWithValidations**](NumberWithValidations.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@@ -261,7 +390,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: */*
|
- **Accept**: application/json
|
||||||
|
|
||||||
### HTTP response details
|
### HTTP response details
|
||||||
| Status code | Description | Response headers |
|
| Status code | Description | Response headers |
|
||||||
@@ -270,8 +399,72 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **fake_outer_string_serialize**
|
# **object_model_with_ref_props**
|
||||||
> str fake_outer_string_serialize()
|
> object_model_with_ref_props.ObjectModelWithRefProps object_model_with_ref_props()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with $refed properties
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __future__ import print_function
|
||||||
|
import time
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.api import fake_api
|
||||||
|
from petstore_api.model import object_model_with_ref_props
|
||||||
|
from pprint import pprint
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient() as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = object_model_with_ref_props.ObjectModelWithRefProps() # object_model_with_ref_props.ObjectModelWithRefProps | Input model (optional)
|
||||||
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
|
try:
|
||||||
|
api_response = api_instance.object_model_with_ref_props(body=body)
|
||||||
|
pprint(api_response)
|
||||||
|
except petstore_api.ApiException as e:
|
||||||
|
print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**object_model_with_ref_props.ObjectModelWithRefProps**](ObjectModelWithRefProps.md)| Input model | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**object_model_with_ref_props.ObjectModelWithRefProps**](ObjectModelWithRefProps.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Output model | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
# **string**
|
||||||
|
> str string()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -301,10 +494,10 @@ with petstore_api.ApiClient() as api_client:
|
|||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
# and optional values
|
# and optional values
|
||||||
try:
|
try:
|
||||||
api_response = api_instance.fake_outer_string_serialize(body=body)
|
api_response = api_instance.string(body=body)
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except petstore_api.ApiException as e:
|
except petstore_api.ApiException as e:
|
||||||
print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e)
|
print("Exception when calling FakeApi->string: %s\n" % e)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
@@ -324,7 +517,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: */*
|
- **Accept**: application/json
|
||||||
|
|
||||||
### HTTP response details
|
### HTTP response details
|
||||||
| Status code | Description | Response headers |
|
| Status code | Description | Response headers |
|
||||||
@@ -333,10 +526,12 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **get_additional_properties_with_array_of_enums**
|
# **string_enum**
|
||||||
> additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums get_additional_properties_with_array_of_enums()
|
> string_enum.StringEnum string_enum()
|
||||||
|
|
||||||
Additional Properties with Array of Enums
|
|
||||||
|
|
||||||
|
Test serialization of outer enum
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@@ -345,7 +540,7 @@ from __future__ import print_function
|
|||||||
import time
|
import time
|
||||||
import petstore_api
|
import petstore_api
|
||||||
from petstore_api.api import fake_api
|
from petstore_api.api import fake_api
|
||||||
from petstore_api.model import additional_properties_with_array_of_enums
|
from petstore_api.model import string_enum
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
@@ -358,22 +553,26 @@ configuration = petstore_api.Configuration(
|
|||||||
with petstore_api.ApiClient() as api_client:
|
with petstore_api.ApiClient() as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
|
body = string_enum.StringEnum("placed") # string_enum.StringEnum | Input enum (optional)
|
||||||
# example, this endpoint has no required or optional parameters
|
|
||||||
|
# example passing only required values which don't have defaults set
|
||||||
|
# and optional values
|
||||||
try:
|
try:
|
||||||
# Additional Properties with Array of Enums
|
api_response = api_instance.string_enum(body=body)
|
||||||
api_response = api_instance.get_additional_properties_with_array_of_enums()
|
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except petstore_api.ApiException as e:
|
except petstore_api.ApiException as e:
|
||||||
print("Exception when calling FakeApi->get_additional_properties_with_array_of_enums: %s\n" % e)
|
print("Exception when calling FakeApi->string_enum: %s\n" % e)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**string_enum.StringEnum**](StringEnum.md)| Input enum | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums**](AdditionalPropertiesWithArrayOfEnums.md)
|
[**string_enum.StringEnum**](StringEnum.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@@ -381,71 +580,13 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
### HTTP response details
|
### HTTP response details
|
||||||
| Status code | Description | Response headers |
|
| Status code | Description | Response headers |
|
||||||
|-------------|-------------|------------------|
|
|-------------|-------------|------------------|
|
||||||
**200** | Got object with additional properties with array of enums | - |
|
**200** | Output enum | - |
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
# **get_array_of_enums**
|
|
||||||
> array_of_enums.ArrayOfEnums get_array_of_enums()
|
|
||||||
|
|
||||||
Array of Enums
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from __future__ import print_function
|
|
||||||
import time
|
|
||||||
import petstore_api
|
|
||||||
from petstore_api.api import fake_api
|
|
||||||
from petstore_api.model import array_of_enums
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = petstore_api.Configuration(
|
|
||||||
host = "http://petstore.swagger.io:80/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with petstore_api.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
|
||||||
|
|
||||||
# example, this endpoint has no required or optional parameters
|
|
||||||
try:
|
|
||||||
# Array of Enums
|
|
||||||
api_response = api_instance.get_array_of_enums()
|
|
||||||
pprint(api_response)
|
|
||||||
except petstore_api.ApiException as e:
|
|
||||||
print("Exception when calling FakeApi->get_array_of_enums: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**array_of_enums.ArrayOfEnums**](ArrayOfEnums.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | Got named array of enums | - |
|
|
||||||
|
|
||||||
[[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)
|
[[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,4 +1,4 @@
|
|||||||
# outer_enum_integer.OuterEnumInteger
|
# integer_enum.IntegerEnum
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# outer_enum_integer_default_value.OuterEnumIntegerDefaultValue
|
# integer_enum_one_value.IntegerEnumOneValue
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# integer_enum_with_default_value.IntegerEnumWithDefaultValue
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**value** | **int** | | defaults to 0
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# number_with_validations.NumberWithValidations
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**value** | **float** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
# outer_composite.OuterComposite
|
# object_model_with_ref_props.ObjectModelWithRefProps
|
||||||
|
|
||||||
|
a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**my_number** | **float** | | [optional]
|
**my_number** | [**number_with_validations.NumberWithValidations**](NumberWithValidations.md) | | [optional]
|
||||||
**my_string** | **str** | | [optional]
|
**my_string** | **str** | | [optional]
|
||||||
**my_boolean** | **bool** | | [optional]
|
**my_boolean** | **bool** | | [optional]
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# outer_enum.OuterEnum
|
# string_enum.StringEnum
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# outer_enum_default_value.OuterEnumDefaultValue
|
# string_enum_with_default_value.StringEnumWithDefaultValue
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -34,10 +34,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
validate_get_composed_info,
|
validate_get_composed_info,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum
|
from petstore_api.model import string_enum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum = sys.modules[
|
string_enum = sys.modules[
|
||||||
'petstore_api.model.outer_enum']
|
'petstore_api.model.string_enum']
|
||||||
|
|
||||||
|
|
||||||
class ArrayOfEnums(ModelSimple):
|
class ArrayOfEnums(ModelSimple):
|
||||||
@@ -81,7 +81,7 @@ class ArrayOfEnums(ModelSimple):
|
|||||||
and the value is attribute type.
|
and the value is attribute type.
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
'value': ([outer_enum.OuterEnum, none_type],), # noqa: E501
|
'value': ([string_enum.StringEnum, none_type],), # noqa: E501
|
||||||
}
|
}
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
@@ -106,7 +106,7 @@ class ArrayOfEnums(ModelSimple):
|
|||||||
"""array_of_enums.ArrayOfEnums - a model defined in OpenAPI
|
"""array_of_enums.ArrayOfEnums - a model defined in OpenAPI
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
value ([outer_enum.OuterEnum, none_type]):
|
value ([string_enum.StringEnum, none_type]):
|
||||||
|
|
||||||
Keyword Args:
|
Keyword Args:
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
_check_type (bool): if True, values for parameters in openapi_types
|
||||||
|
|||||||
@@ -34,25 +34,30 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
validate_get_composed_info,
|
validate_get_composed_info,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum
|
from petstore_api.model import integer_enum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum = sys.modules[
|
integer_enum = sys.modules[
|
||||||
'petstore_api.model.outer_enum']
|
'petstore_api.model.integer_enum']
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum_default_value
|
from petstore_api.model import integer_enum_one_value
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum_default_value = sys.modules[
|
integer_enum_one_value = sys.modules[
|
||||||
'petstore_api.model.outer_enum_default_value']
|
'petstore_api.model.integer_enum_one_value']
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum_integer
|
from petstore_api.model import integer_enum_with_default_value
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum_integer = sys.modules[
|
integer_enum_with_default_value = sys.modules[
|
||||||
'petstore_api.model.outer_enum_integer']
|
'petstore_api.model.integer_enum_with_default_value']
|
||||||
try:
|
try:
|
||||||
from petstore_api.model import outer_enum_integer_default_value
|
from petstore_api.model import string_enum
|
||||||
except ImportError:
|
except ImportError:
|
||||||
outer_enum_integer_default_value = sys.modules[
|
string_enum = sys.modules[
|
||||||
'petstore_api.model.outer_enum_integer_default_value']
|
'petstore_api.model.string_enum']
|
||||||
|
try:
|
||||||
|
from petstore_api.model import string_enum_with_default_value
|
||||||
|
except ImportError:
|
||||||
|
string_enum_with_default_value = sys.modules[
|
||||||
|
'petstore_api.model.string_enum_with_default_value']
|
||||||
|
|
||||||
|
|
||||||
class EnumTest(ModelNormal):
|
class EnumTest(ModelNormal):
|
||||||
@@ -122,10 +127,11 @@ class EnumTest(ModelNormal):
|
|||||||
'enum_string': (str,), # noqa: E501
|
'enum_string': (str,), # noqa: E501
|
||||||
'enum_integer': (int,), # noqa: E501
|
'enum_integer': (int,), # noqa: E501
|
||||||
'enum_number': (float,), # noqa: E501
|
'enum_number': (float,), # noqa: E501
|
||||||
'outer_enum': (outer_enum.OuterEnum,), # noqa: E501
|
'string_enum': (string_enum.StringEnum,), # noqa: E501
|
||||||
'outer_enum_integer': (outer_enum_integer.OuterEnumInteger,), # noqa: E501
|
'integer_enum': (integer_enum.IntegerEnum,), # noqa: E501
|
||||||
'outer_enum_default_value': (outer_enum_default_value.OuterEnumDefaultValue,), # noqa: E501
|
'string_enum_with_default_value': (string_enum_with_default_value.StringEnumWithDefaultValue,), # noqa: E501
|
||||||
'outer_enum_integer_default_value': (outer_enum_integer_default_value.OuterEnumIntegerDefaultValue,), # noqa: E501
|
'integer_enum_with_default_value': (integer_enum_with_default_value.IntegerEnumWithDefaultValue,), # noqa: E501
|
||||||
|
'integer_enum_one_value': (integer_enum_one_value.IntegerEnumOneValue,), # noqa: E501
|
||||||
}
|
}
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
@@ -137,10 +143,11 @@ class EnumTest(ModelNormal):
|
|||||||
'enum_string': 'enum_string', # noqa: E501
|
'enum_string': 'enum_string', # noqa: E501
|
||||||
'enum_integer': 'enum_integer', # noqa: E501
|
'enum_integer': 'enum_integer', # noqa: E501
|
||||||
'enum_number': 'enum_number', # noqa: E501
|
'enum_number': 'enum_number', # noqa: E501
|
||||||
'outer_enum': 'outerEnum', # noqa: E501
|
'string_enum': 'stringEnum', # noqa: E501
|
||||||
'outer_enum_integer': 'outerEnumInteger', # noqa: E501
|
'integer_enum': 'IntegerEnum', # noqa: E501
|
||||||
'outer_enum_default_value': 'outerEnumDefaultValue', # noqa: E501
|
'string_enum_with_default_value': 'StringEnumWithDefaultValue', # noqa: E501
|
||||||
'outer_enum_integer_default_value': 'outerEnumIntegerDefaultValue', # noqa: E501
|
'integer_enum_with_default_value': 'IntegerEnumWithDefaultValue', # noqa: E501
|
||||||
|
'integer_enum_one_value': 'IntegerEnumOneValue', # noqa: E501
|
||||||
}
|
}
|
||||||
|
|
||||||
_composed_schemas = {}
|
_composed_schemas = {}
|
||||||
@@ -195,10 +202,11 @@ class EnumTest(ModelNormal):
|
|||||||
enum_string (str): [optional] # noqa: E501
|
enum_string (str): [optional] # noqa: E501
|
||||||
enum_integer (int): [optional] # noqa: E501
|
enum_integer (int): [optional] # noqa: E501
|
||||||
enum_number (float): [optional] # noqa: E501
|
enum_number (float): [optional] # noqa: E501
|
||||||
outer_enum (outer_enum.OuterEnum): [optional] # noqa: E501
|
string_enum (string_enum.StringEnum): [optional] # noqa: E501
|
||||||
outer_enum_integer (outer_enum_integer.OuterEnumInteger): [optional] # noqa: E501
|
integer_enum (integer_enum.IntegerEnum): [optional] # noqa: E501
|
||||||
outer_enum_default_value (outer_enum_default_value.OuterEnumDefaultValue): [optional] # noqa: E501
|
string_enum_with_default_value (string_enum_with_default_value.StringEnumWithDefaultValue): [optional] # noqa: E501
|
||||||
outer_enum_integer_default_value (outer_enum_integer_default_value.OuterEnumIntegerDefaultValue): [optional] # noqa: E501
|
integer_enum_with_default_value (integer_enum_with_default_value.IntegerEnumWithDefaultValue): [optional] # noqa: E501
|
||||||
|
integer_enum_one_value (integer_enum_one_value.IntegerEnumOneValue): [optional] # noqa: E501
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
_check_type = kwargs.pop('_check_type', True)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OuterEnumInteger(ModelSimple):
|
class IntegerEnum(ModelSimple):
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
Ref: https://openapi-generator.tech
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class OuterEnumInteger(ModelSimple):
|
|||||||
|
|
||||||
@convert_js_args_to_python_args
|
@convert_js_args_to_python_args
|
||||||
def __init__(self, value, *args, **kwargs): # noqa: E501
|
def __init__(self, value, *args, **kwargs): # noqa: E501
|
||||||
"""outer_enum_integer.OuterEnumInteger - a model defined in OpenAPI
|
"""integer_enum.IntegerEnum - a model defined in OpenAPI
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
value (int):
|
value (int):
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
OpenAPI 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: \" \\ # noqa: E501
|
||||||
|
|
||||||
|
The version of the OpenAPI document: 1.0.0
|
||||||
|
Generated by: https://openapi-generator.tech
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import re # noqa: F401
|
||||||
|
import sys # noqa: F401
|
||||||
|
|
||||||
|
import six # noqa: F401
|
||||||
|
import nulltype # noqa: F401
|
||||||
|
|
||||||
|
from petstore_api.model_utils import ( # noqa: F401
|
||||||
|
ApiTypeError,
|
||||||
|
ModelComposed,
|
||||||
|
ModelNormal,
|
||||||
|
ModelSimple,
|
||||||
|
cached_property,
|
||||||
|
change_keys_js_to_python,
|
||||||
|
convert_js_args_to_python_args,
|
||||||
|
date,
|
||||||
|
datetime,
|
||||||
|
file_type,
|
||||||
|
int,
|
||||||
|
none_type,
|
||||||
|
str,
|
||||||
|
validate_get_composed_info,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class IntegerEnumOneValue(ModelSimple):
|
||||||
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
|
Do not edit the class manually.
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
allowed_values (dict): The key is the tuple path to the attribute
|
||||||
|
and the for var_name this is (var_name,). The value is a dict
|
||||||
|
with a capitalized key describing the allowed value and an allowed
|
||||||
|
value. These dicts store the allowed enum values.
|
||||||
|
validations (dict): The key is the tuple path to the attribute
|
||||||
|
and the for var_name this is (var_name,). The value is a dict
|
||||||
|
that stores validations for max_length, min_length, max_items,
|
||||||
|
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
||||||
|
inclusive_minimum, and regex.
|
||||||
|
additional_properties_type (tuple): A tuple of classes accepted
|
||||||
|
as additional properties values.
|
||||||
|
"""
|
||||||
|
|
||||||
|
allowed_values = {
|
||||||
|
('value',): {
|
||||||
|
'0': 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
validations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
additional_properties_type = None
|
||||||
|
|
||||||
|
_nullable = False
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def openapi_types():
|
||||||
|
"""
|
||||||
|
This must be a class method so a model may have properties that are
|
||||||
|
of type self, this ensures that we don't create a cyclic import
|
||||||
|
|
||||||
|
Returns
|
||||||
|
openapi_types (dict): The key is attribute name
|
||||||
|
and the value is attribute type.
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
'value': (int,), # noqa: E501
|
||||||
|
}
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def discriminator():
|
||||||
|
return None
|
||||||
|
|
||||||
|
attribute_map = {}
|
||||||
|
|
||||||
|
_composed_schemas = None
|
||||||
|
|
||||||
|
required_properties = set([
|
||||||
|
'_data_store',
|
||||||
|
'_check_type',
|
||||||
|
'_spec_property_naming',
|
||||||
|
'_path_to_item',
|
||||||
|
'_configuration',
|
||||||
|
'_visited_composed_classes',
|
||||||
|
])
|
||||||
|
|
||||||
|
@convert_js_args_to_python_args
|
||||||
|
def __init__(self, *args, **kwargs): # noqa: E501
|
||||||
|
"""integer_enum_one_value.IntegerEnumOneValue - a model defined in OpenAPI
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
value (int): defaults to 0, must be one of [0, ] # noqa: E501
|
||||||
|
_check_type (bool): if True, values for parameters in openapi_types
|
||||||
|
will be type checked and a TypeError will be
|
||||||
|
raised if the wrong type is input.
|
||||||
|
Defaults to True
|
||||||
|
_path_to_item (tuple/list): This is a list of keys or values to
|
||||||
|
drill down to the model in received_data
|
||||||
|
when deserializing a response
|
||||||
|
_spec_property_naming (bool): True if the variable names in the input data
|
||||||
|
are serialized names, as specified in the OpenAPI document.
|
||||||
|
False if the variable names in the input data
|
||||||
|
are pythonic names, e.g. snake case (default)
|
||||||
|
_configuration (Configuration): the instance to use when
|
||||||
|
deserializing a file_type parameter.
|
||||||
|
If passed, type conversion is attempted
|
||||||
|
If omitted no type conversion is done.
|
||||||
|
_visited_composed_classes (tuple): This stores a tuple of
|
||||||
|
classes that we have traveled through so that
|
||||||
|
if we see that class again we will not use its
|
||||||
|
discriminator again.
|
||||||
|
When traveling through a discriminator, the
|
||||||
|
composed schema that is
|
||||||
|
is traveled through is added to this set.
|
||||||
|
For example if Animal has a discriminator
|
||||||
|
petType and we pass in "Dog", and the class Dog
|
||||||
|
allOf includes Animal, we move through Animal
|
||||||
|
once using the discriminator, and pick Dog.
|
||||||
|
Then in Dog, we will make an instance of the
|
||||||
|
Animal class but this time we won't travel
|
||||||
|
through its discriminator because we passed in
|
||||||
|
_visited_composed_classes = (Animal,)
|
||||||
|
"""
|
||||||
|
|
||||||
|
value = kwargs.get('value', 0)
|
||||||
|
_check_type = kwargs.pop('_check_type', True)
|
||||||
|
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||||
|
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||||
|
_configuration = kwargs.pop('_configuration', None)
|
||||||
|
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||||
|
|
||||||
|
if args:
|
||||||
|
raise ApiTypeError(
|
||||||
|
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||||
|
args,
|
||||||
|
self.__class__.__name__,
|
||||||
|
),
|
||||||
|
path_to_item=_path_to_item,
|
||||||
|
valid_classes=(self.__class__,),
|
||||||
|
)
|
||||||
|
|
||||||
|
self._data_store = {}
|
||||||
|
self._check_type = _check_type
|
||||||
|
self._spec_property_naming = _spec_property_naming
|
||||||
|
self._path_to_item = _path_to_item
|
||||||
|
self._configuration = _configuration
|
||||||
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||||
|
|
||||||
|
self.value = value
|
||||||
|
for var_name, var_value in six.iteritems(kwargs):
|
||||||
|
if var_name not in self.attribute_map and \
|
||||||
|
self._configuration is not None and \
|
||||||
|
self._configuration.discard_unknown_keys and \
|
||||||
|
self.additional_properties_type is None:
|
||||||
|
# discard variable.
|
||||||
|
continue
|
||||||
|
setattr(self, var_name, var_value)
|
||||||
@@ -35,7 +35,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OuterEnumIntegerDefaultValue(ModelSimple):
|
class IntegerEnumWithDefaultValue(ModelSimple):
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
Ref: https://openapi-generator.tech
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class OuterEnumIntegerDefaultValue(ModelSimple):
|
|||||||
|
|
||||||
@convert_js_args_to_python_args
|
@convert_js_args_to_python_args
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
def __init__(self, *args, **kwargs): # noqa: E501
|
||||||
"""outer_enum_integer_default_value.OuterEnumIntegerDefaultValue - a model defined in OpenAPI
|
"""integer_enum_with_default_value.IntegerEnumWithDefaultValue - a model defined in OpenAPI
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
OpenAPI 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: \" \\ # noqa: E501
|
||||||
|
|
||||||
|
The version of the OpenAPI document: 1.0.0
|
||||||
|
Generated by: https://openapi-generator.tech
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import re # noqa: F401
|
||||||
|
import sys # noqa: F401
|
||||||
|
|
||||||
|
import six # noqa: F401
|
||||||
|
import nulltype # noqa: F401
|
||||||
|
|
||||||
|
from petstore_api.model_utils import ( # noqa: F401
|
||||||
|
ApiTypeError,
|
||||||
|
ModelComposed,
|
||||||
|
ModelNormal,
|
||||||
|
ModelSimple,
|
||||||
|
cached_property,
|
||||||
|
change_keys_js_to_python,
|
||||||
|
convert_js_args_to_python_args,
|
||||||
|
date,
|
||||||
|
datetime,
|
||||||
|
file_type,
|
||||||
|
int,
|
||||||
|
none_type,
|
||||||
|
str,
|
||||||
|
validate_get_composed_info,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class NumberWithValidations(ModelSimple):
|
||||||
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||||
|
Ref: https://openapi-generator.tech
|
||||||
|
|
||||||
|
Do not edit the class manually.
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
allowed_values (dict): The key is the tuple path to the attribute
|
||||||
|
and the for var_name this is (var_name,). The value is a dict
|
||||||
|
with a capitalized key describing the allowed value and an allowed
|
||||||
|
value. These dicts store the allowed enum values.
|
||||||
|
validations (dict): The key is the tuple path to the attribute
|
||||||
|
and the for var_name this is (var_name,). The value is a dict
|
||||||
|
that stores validations for max_length, min_length, max_items,
|
||||||
|
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
||||||
|
inclusive_minimum, and regex.
|
||||||
|
additional_properties_type (tuple): A tuple of classes accepted
|
||||||
|
as additional properties values.
|
||||||
|
"""
|
||||||
|
|
||||||
|
allowed_values = {
|
||||||
|
}
|
||||||
|
|
||||||
|
validations = {
|
||||||
|
('value',): {
|
||||||
|
'inclusive_maximum': 20,
|
||||||
|
'inclusive_minimum': 10,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
additional_properties_type = None
|
||||||
|
|
||||||
|
_nullable = False
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def openapi_types():
|
||||||
|
"""
|
||||||
|
This must be a class method so a model may have properties that are
|
||||||
|
of type self, this ensures that we don't create a cyclic import
|
||||||
|
|
||||||
|
Returns
|
||||||
|
openapi_types (dict): The key is attribute name
|
||||||
|
and the value is attribute type.
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
'value': (float,), # noqa: E501
|
||||||
|
}
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def discriminator():
|
||||||
|
return None
|
||||||
|
|
||||||
|
attribute_map = {}
|
||||||
|
|
||||||
|
_composed_schemas = None
|
||||||
|
|
||||||
|
required_properties = set([
|
||||||
|
'_data_store',
|
||||||
|
'_check_type',
|
||||||
|
'_spec_property_naming',
|
||||||
|
'_path_to_item',
|
||||||
|
'_configuration',
|
||||||
|
'_visited_composed_classes',
|
||||||
|
])
|
||||||
|
|
||||||
|
@convert_js_args_to_python_args
|
||||||
|
def __init__(self, value, *args, **kwargs): # noqa: E501
|
||||||
|
"""number_with_validations.NumberWithValidations - a model defined in OpenAPI
|
||||||
|
|
||||||
|
Args:
|
||||||
|
value (float):
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
_check_type (bool): if True, values for parameters in openapi_types
|
||||||
|
will be type checked and a TypeError will be
|
||||||
|
raised if the wrong type is input.
|
||||||
|
Defaults to True
|
||||||
|
_path_to_item (tuple/list): This is a list of keys or values to
|
||||||
|
drill down to the model in received_data
|
||||||
|
when deserializing a response
|
||||||
|
_spec_property_naming (bool): True if the variable names in the input data
|
||||||
|
are serialized names, as specified in the OpenAPI document.
|
||||||
|
False if the variable names in the input data
|
||||||
|
are pythonic names, e.g. snake case (default)
|
||||||
|
_configuration (Configuration): the instance to use when
|
||||||
|
deserializing a file_type parameter.
|
||||||
|
If passed, type conversion is attempted
|
||||||
|
If omitted no type conversion is done.
|
||||||
|
_visited_composed_classes (tuple): This stores a tuple of
|
||||||
|
classes that we have traveled through so that
|
||||||
|
if we see that class again we will not use its
|
||||||
|
discriminator again.
|
||||||
|
When traveling through a discriminator, the
|
||||||
|
composed schema that is
|
||||||
|
is traveled through is added to this set.
|
||||||
|
For example if Animal has a discriminator
|
||||||
|
petType and we pass in "Dog", and the class Dog
|
||||||
|
allOf includes Animal, we move through Animal
|
||||||
|
once using the discriminator, and pick Dog.
|
||||||
|
Then in Dog, we will make an instance of the
|
||||||
|
Animal class but this time we won't travel
|
||||||
|
through its discriminator because we passed in
|
||||||
|
_visited_composed_classes = (Animal,)
|
||||||
|
"""
|
||||||
|
|
||||||
|
_check_type = kwargs.pop('_check_type', True)
|
||||||
|
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||||
|
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||||
|
_configuration = kwargs.pop('_configuration', None)
|
||||||
|
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||||
|
|
||||||
|
if args:
|
||||||
|
raise ApiTypeError(
|
||||||
|
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||||
|
args,
|
||||||
|
self.__class__.__name__,
|
||||||
|
),
|
||||||
|
path_to_item=_path_to_item,
|
||||||
|
valid_classes=(self.__class__,),
|
||||||
|
)
|
||||||
|
|
||||||
|
self._data_store = {}
|
||||||
|
self._check_type = _check_type
|
||||||
|
self._spec_property_naming = _spec_property_naming
|
||||||
|
self._path_to_item = _path_to_item
|
||||||
|
self._configuration = _configuration
|
||||||
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||||
|
|
||||||
|
self.value = value
|
||||||
|
for var_name, var_value in six.iteritems(kwargs):
|
||||||
|
if var_name not in self.attribute_map and \
|
||||||
|
self._configuration is not None and \
|
||||||
|
self._configuration.discard_unknown_keys and \
|
||||||
|
self.additional_properties_type is None:
|
||||||
|
# discard variable.
|
||||||
|
continue
|
||||||
|
setattr(self, var_name, var_value)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user