forked from loafle/openapi-generator-original
Compare commits
36 Commits
dart-oneof
...
test-pytho
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e511d9c99 | ||
|
|
7a98580f45 | ||
|
|
b72d5ca81e | ||
|
|
ec815ca33a | ||
|
|
2c59f1dc8c | ||
|
|
a5ee2e0454 | ||
|
|
cb4b03fcf3 | ||
|
|
f608803a40 | ||
|
|
9ace82ae14 | ||
|
|
5472943134 | ||
|
|
d6bfecf2ef | ||
|
|
9ba943318a | ||
|
|
f3fbc7d782 | ||
|
|
5f3d974a08 | ||
|
|
9778d970ac | ||
|
|
5dffbabc74 | ||
|
|
7b1563326a | ||
|
|
49760f7a34 | ||
|
|
596bbb9c58 | ||
|
|
29ca272a95 | ||
|
|
5ebf26e0d2 | ||
|
|
bc799b2488 | ||
|
|
7dd4fd1d98 | ||
|
|
bdc964a6c1 | ||
|
|
6612c16624 | ||
|
|
874c2a19d8 | ||
|
|
94ed8187f9 | ||
|
|
56c9f0dc1e | ||
|
|
6e937ba9f9 | ||
|
|
1716ee3154 | ||
|
|
d2aabc5f80 | ||
|
|
8c78f13a41 | ||
|
|
04b39cc86b | ||
|
|
2157d526e1 | ||
|
|
a5fcb17416 | ||
|
|
96bba3769b |
@@ -777,6 +777,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
|||||||
- 2020-08-25 - [OpenAPI Generator と TypeScript で型安全にフロントエンド開発をしている話](https://tech.smarthr.jp/entry/2020/08/25/135631) at [SmartHR Tech Blog](https://tech.smarthr.jp/)
|
- 2020-08-25 - [OpenAPI Generator と TypeScript で型安全にフロントエンド開発をしている話](https://tech.smarthr.jp/entry/2020/08/25/135631) at [SmartHR Tech Blog](https://tech.smarthr.jp/)
|
||||||
- 2020-09-10 - [Introduction to OpenAPI with Instana](https://www.instana.com/blog/introduction-to-openapi-with-instana/) by [Cedric Ziel](https://www.instana.com/blog/author/cedricziel/) at [Instana Blog](https://www.instana.com/blog/)
|
- 2020-09-10 - [Introduction to OpenAPI with Instana](https://www.instana.com/blog/introduction-to-openapi-with-instana/) by [Cedric Ziel](https://www.instana.com/blog/author/cedricziel/) at [Instana Blog](https://www.instana.com/blog/)
|
||||||
- 2020-09-17 - [Generate PowerShellSDK using openapi-generator](https://medium.com/@ghufz.learn/generate-powershellsdk-using-openapi-generator-33b700891e33) by [Ghufran Zahidi](https://medium.com/@ghufz.learn)
|
- 2020-09-17 - [Generate PowerShellSDK using openapi-generator](https://medium.com/@ghufz.learn/generate-powershellsdk-using-openapi-generator-33b700891e33) by [Ghufran Zahidi](https://medium.com/@ghufz.learn)
|
||||||
|
- 2020-09-24 - [How to automate API code generation (OpenAPI/Swagger) and boost productivity - Tutorial with React Native featuring TypeScript](https://medium.com/@sceleski/how-to-automate-api-code-generation-openapi-swagger-and-boost-productivity-1176a0056d8a) by [Sanjin Celeski](https://medium.com/@sceleski)
|
||||||
|
|
||||||
## [6 - About Us](#table-of-contents)
|
## [6 - About Us](#table-of-contents)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
# for .net standard
|
||||||
generatorName: csharp-netcore
|
generatorName: csharp-netcore
|
||||||
outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient
|
outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||||
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
|
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
generatorName: python
|
generatorName: python-experimental
|
||||||
outputDir: samples/client/petstore/python-asyncio
|
outputDir: samples/client/petstore/python-asyncio
|
||||||
library: asyncio
|
library: asyncio
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/
|
|||||||
templateDir: modules/openapi-generator/src/main/resources/python
|
templateDir: modules/openapi-generator/src/main/resources/python
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
packageName: petstore_api
|
packageName: petstore_api
|
||||||
|
recursionLimit: "1234"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
generatorName: python
|
generatorName: python-experimental
|
||||||
outputDir: samples/client/petstore/python-tornado
|
outputDir: samples/client/petstore/python-tornado
|
||||||
library: tornado
|
library: tornado
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
|||||||
9
bin/configs/ruby-features-dynamic-servers.yaml
Normal file
9
bin/configs/ruby-features-dynamic-servers.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
generatorName: ruby
|
||||||
|
outputDir: samples/openapi3/client/features/dynamic-servers/ruby/
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/features/dynamic-servers.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/ruby-client
|
||||||
|
additionalProperties:
|
||||||
|
gemVersion: 1.0.0
|
||||||
|
moduleName: DynamicServers
|
||||||
|
gemName: dynamic_servers
|
||||||
|
skipFormModel: "true"
|
||||||
12
bin/configs/ruby-generate-alias-as-model.yaml
Normal file
12
bin/configs/ruby-generate-alias-as-model.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
generatorName: ruby
|
||||||
|
outputDir: samples/openapi3/client/features/generate-alias-as-model/ruby-client/
|
||||||
|
library: typhoeus
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/features/generate-alias-as-model.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/ruby-client
|
||||||
|
additionalProperties:
|
||||||
|
gemVersion: 1.0.0
|
||||||
|
moduleName: Petstore
|
||||||
|
gemName: petstore
|
||||||
|
skipFormModel: "true"
|
||||||
|
strictSpecBehavior: false
|
||||||
|
generateAliasAsModel: true
|
||||||
@@ -11,6 +11,7 @@ if [ ! -f "$executable" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -ea -server -Duser.timezone=UTC"
|
export JAVA_OPTS="${JAVA_OPTS} -ea -server -Duser.timezone=UTC"
|
||||||
|
export BATCH_OPTS="${BATCH_OPTS:-}"
|
||||||
|
|
||||||
files=()
|
files=()
|
||||||
args=()
|
args=()
|
||||||
@@ -61,6 +62,6 @@ else
|
|||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
java ${JAVA_OPTS} -jar "$executable" batch --includes-base-dir "${root}" --fail-fast -- ${files[@]}
|
java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ sidebar_label: python-experimental
|
|||||||
|packageUrl|python package URL.| |null|
|
|packageUrl|python package URL.| |null|
|
||||||
|packageVersion|python package version.| |1.0.0|
|
|packageVersion|python package version.| |1.0.0|
|
||||||
|projectName|python project name in setup.py (e.g. petstore-api).| |null|
|
|projectName|python project name in setup.py (e.g. petstore-api).| |null|
|
||||||
|
|recursionLimit|Set the recursion limit. If not set, use the system default value.| |null|
|
||||||
|useNose|use the nose test framework| |false|
|
|useNose|use the nose test framework| |false|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
## IMPORT MAPPING
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ sidebar_label: python
|
|||||||
|packageUrl|python package URL.| |null|
|
|packageUrl|python package URL.| |null|
|
||||||
|packageVersion|python package version.| |1.0.0|
|
|packageVersion|python package version.| |1.0.0|
|
||||||
|projectName|python project name in setup.py (e.g. petstore-api).| |null|
|
|projectName|python project name in setup.py (e.g. petstore-api).| |null|
|
||||||
|
|recursionLimit|Set the recursion limit. If not set, use the system default value.| |null|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||||
|useNose|use the nose test framework| |false|
|
|useNose|use the nose test framework| |false|
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ sidebar_label: ruby-on-rails
|
|||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
| Type/Alias | Instantiated By |
|
||||||
| ---------- | --------------- |
|
| ---------- | --------------- |
|
||||||
|
|array|Array|
|
||||||
|
|map|Hash|
|
||||||
|
|set|Set|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
## LANGUAGE PRIMITIVES
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ sidebar_label: ruby-sinatra
|
|||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
| Type/Alias | Instantiated By |
|
||||||
| ---------- | --------------- |
|
| ---------- | --------------- |
|
||||||
|
|array|Array|
|
||||||
|
|map|Hash|
|
||||||
|
|set|Set|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
## LANGUAGE PRIMITIVES
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ sidebar_label: ruby
|
|||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
| Type/Alias | Instantiated By |
|
||||||
| ---------- | --------------- |
|
| ---------- | --------------- |
|
||||||
|
|array|Array|
|
||||||
|
|map|Hash|
|
||||||
|
|set|Set|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
## LANGUAGE PRIMITIVES
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.fasterxml.jackson.databind.util.TokenBuffer;
|
|||||||
import io.airlift.airline.Arguments;
|
import io.airlift.airline.Arguments;
|
||||||
import io.airlift.airline.Command;
|
import io.airlift.airline.Command;
|
||||||
import io.airlift.airline.Option;
|
import io.airlift.airline.Option;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.ClientOptInput;
|
import org.openapitools.codegen.ClientOptInput;
|
||||||
import org.openapitools.codegen.CodegenConfig;
|
import org.openapitools.codegen.CodegenConfig;
|
||||||
@@ -46,6 +47,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@@ -77,6 +79,9 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
|||||||
@Option(name = {"--fail-fast"}, description = "fail fast on any errors")
|
@Option(name = {"--fail-fast"}, description = "fail fast on any errors")
|
||||||
private Boolean failFast;
|
private Boolean failFast;
|
||||||
|
|
||||||
|
@Option(name = {"--clean"}, description = "clean output of previously written files before generation")
|
||||||
|
private Boolean clean;
|
||||||
|
|
||||||
@Option(name = {"--timeout"}, description = "execution timeout (minutes)")
|
@Option(name = {"--timeout"}, description = "execution timeout (minutes)")
|
||||||
private Integer timeout;
|
private Integer timeout;
|
||||||
|
|
||||||
@@ -149,7 +154,10 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
|||||||
ExecutorService executor = Executors.newFixedThreadPool(numThreads);
|
ExecutorService executor = Executors.newFixedThreadPool(numThreads);
|
||||||
|
|
||||||
// Execute each configurator on a separate pooled thread.
|
// Execute each configurator on a separate pooled thread.
|
||||||
configurators.forEach(configurator -> executor.execute(new GenerationRunner(configurator, rootDir, Boolean.TRUE.equals(failFast))));
|
configurators.forEach(configurator -> {
|
||||||
|
GenerationRunner runner = new GenerationRunner(configurator, rootDir, Boolean.TRUE.equals(failFast), Boolean.TRUE.equals(clean));
|
||||||
|
executor.execute(runner);
|
||||||
|
});
|
||||||
|
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
|
|
||||||
@@ -178,11 +186,13 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
|||||||
private final CodegenConfigurator configurator;
|
private final CodegenConfigurator configurator;
|
||||||
private final Path rootDir;
|
private final Path rootDir;
|
||||||
private final boolean exitOnError;
|
private final boolean exitOnError;
|
||||||
|
private final boolean clean;
|
||||||
|
|
||||||
private GenerationRunner(CodegenConfigurator configurator, Path rootDir, boolean failFast) {
|
private GenerationRunner(CodegenConfigurator configurator, Path rootDir, boolean failFast, boolean clean) {
|
||||||
this.configurator = configurator;
|
this.configurator = configurator;
|
||||||
this.rootDir = rootDir;
|
this.rootDir = rootDir;
|
||||||
this.exitOnError = failFast;
|
this.exitOnError = failFast;
|
||||||
|
this.clean = clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -198,7 +208,7 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
String name = "";
|
String name = null;
|
||||||
try {
|
try {
|
||||||
GlobalSettings.reset();
|
GlobalSettings.reset();
|
||||||
|
|
||||||
@@ -210,6 +220,10 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
|||||||
Path updated = rootDir.resolve(target);
|
Path updated = rootDir.resolve(target);
|
||||||
config.setOutputDir(updated.toString());
|
config.setOutputDir(updated.toString());
|
||||||
|
|
||||||
|
if (this.clean) {
|
||||||
|
cleanPreviousFiles(name, updated);
|
||||||
|
}
|
||||||
|
|
||||||
System.out.printf(Locale.ROOT, "[%s] Generating %s (outputs to %s)…%n", Thread.currentThread().getName(), name, updated.toString());
|
System.out.printf(Locale.ROOT, "[%s] Generating %s (outputs to %s)…%n", Thread.currentThread().getName(), name, updated.toString());
|
||||||
|
|
||||||
DefaultGenerator defaultGenerator = new DefaultGenerator();
|
DefaultGenerator defaultGenerator = new DefaultGenerator();
|
||||||
@@ -234,6 +248,28 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
|||||||
GlobalSettings.reset();
|
GlobalSettings.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cleanPreviousFiles(final String name, Path outDir) throws IOException {
|
||||||
|
System.out.printf(Locale.ROOT, "[%s] Cleaning previous contents for %s in %s…%n", Thread.currentThread().getName(), name, outDir.toString());
|
||||||
|
Path filesMeta = Paths.get(outDir.toAbsolutePath().toString(), ".openapi-generator", "FILES");
|
||||||
|
if (filesMeta.toFile().exists()) {
|
||||||
|
FileUtils.readLines(filesMeta.toFile(), StandardCharsets.UTF_8).forEach(relativePath -> {
|
||||||
|
if (!StringUtils.startsWith(relativePath, ".")) {
|
||||||
|
Path file = outDir.resolve(relativePath).toAbsolutePath();
|
||||||
|
// hack: disallow directory traversal outside of output directory. we don't want to delete wrong files.
|
||||||
|
if (file.toString().startsWith(outDir.toAbsolutePath().toString())) {
|
||||||
|
try {
|
||||||
|
Files.delete(file);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
System.out.printf(Locale.ROOT, "[%s] Generator %s failed to clean file %s…%n", Thread.currentThread().getName(), name, file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.printf(Locale.ROOT, "[%s] Generator %s skip cleaning special filename %s…%n", Thread.currentThread().getName(), name, relativePath);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SimpleModule getCustomDeserializationModel(final File includesDir) {
|
static SimpleModule getCustomDeserializationModel(final File includesDir) {
|
||||||
|
|||||||
@@ -394,19 +394,17 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
if (this.useOneOfInterfaces) {
|
if (this.useOneOfInterfaces) {
|
||||||
// First, add newly created oneOf interfaces
|
// First, add newly created oneOf interfaces
|
||||||
for (CodegenModel cm : addOneOfInterfaces) {
|
for (CodegenModel cm : addOneOfInterfaces) {
|
||||||
Map<String, Object> modelValue = new HashMap<String, Object>() {{
|
Map<String, Object> modelValue = new HashMap<>(additionalProperties());
|
||||||
putAll(additionalProperties());
|
modelValue.put("model", cm);
|
||||||
put("model", cm);
|
|
||||||
}};
|
|
||||||
List<Object> modelsValue = Arrays.asList(modelValue);
|
List<Object> modelsValue = Arrays.asList(modelValue);
|
||||||
List<Map<String, String>> importsValue = new ArrayList<Map<String, String>>();
|
List<Map<String, String>> importsValue = new ArrayList<Map<String, String>>();
|
||||||
Map<String, Object> objsValue = new HashMap<String, Object>() {{
|
Map<String, Object> objsValue = new HashMap<>();
|
||||||
put("models", modelsValue);
|
objsValue.put("models", modelsValue);
|
||||||
put("package", modelPackage());
|
objsValue.put("package", modelPackage());
|
||||||
put("imports", importsValue);
|
objsValue.put("imports", importsValue);
|
||||||
put("classname", cm.classname);
|
objsValue.put("classname", cm.classname);
|
||||||
putAll(additionalProperties);
|
objsValue.putAll(additionalProperties);
|
||||||
}};
|
|
||||||
objs.put(cm.name, objsValue);
|
objs.put(cm.name, objsValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1578,6 +1576,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
specialCharReplacements.put("<=", "Less_Than_Or_Equal_To");
|
specialCharReplacements.put("<=", "Less_Than_Or_Equal_To");
|
||||||
specialCharReplacements.put(">=", "Greater_Than_Or_Equal_To");
|
specialCharReplacements.put(">=", "Greater_Than_Or_Equal_To");
|
||||||
specialCharReplacements.put("!=", "Not_Equal");
|
specialCharReplacements.put("!=", "Not_Equal");
|
||||||
|
specialCharReplacements.put("~=", "Tilde_Equal");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2704,7 +2703,8 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
if (foundDisc != null) {
|
if (foundDisc != null) {
|
||||||
return foundDisc;
|
return foundDisc;
|
||||||
}
|
}
|
||||||
if (!!this.getLegacyDiscriminatorBehavior()) {
|
|
||||||
|
if (this.getLegacyDiscriminatorBehavior()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Discriminator disc = new Discriminator();
|
Discriminator disc = new Discriminator();
|
||||||
@@ -2742,7 +2742,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
throw new RuntimeException("The oneOf schemas have conflicting discriminator property names. " +
|
throw new RuntimeException("The oneOf schemas have conflicting discriminator property names. " +
|
||||||
"oneOf schemas must have the same property name, but found " + String.join(", ", discriminatorsPropNames));
|
"oneOf schemas must have the same property name, but found " + String.join(", ", discriminatorsPropNames));
|
||||||
}
|
}
|
||||||
if ((hasDiscriminatorCnt + hasNullTypeCnt) == composedSchema.getOneOf().size() && discriminatorsPropNames.size() == 1) {
|
if (foundDisc != null && (hasDiscriminatorCnt + hasNullTypeCnt) == composedSchema.getOneOf().size() && discriminatorsPropNames.size() == 1) {
|
||||||
disc.setPropertyName(foundDisc.getPropertyName());
|
disc.setPropertyName(foundDisc.getPropertyName());
|
||||||
disc.setMapping(foundDisc.getMapping());
|
disc.setMapping(foundDisc.getMapping());
|
||||||
return disc;
|
return disc;
|
||||||
@@ -2771,7 +2771,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
throw new RuntimeException("The anyOf schemas have conflicting discriminator property names. " +
|
throw new RuntimeException("The anyOf schemas have conflicting discriminator property names. " +
|
||||||
"anyOf schemas must have the same property name, but found " + String.join(", ", discriminatorsPropNames));
|
"anyOf schemas must have the same property name, but found " + String.join(", ", discriminatorsPropNames));
|
||||||
}
|
}
|
||||||
if ((hasDiscriminatorCnt + hasNullTypeCnt) == composedSchema.getAnyOf().size() && discriminatorsPropNames.size() == 1) {
|
if (foundDisc != null && (hasDiscriminatorCnt + hasNullTypeCnt) == composedSchema.getAnyOf().size() && discriminatorsPropNames.size() == 1) {
|
||||||
disc.setPropertyName(foundDisc.getPropertyName());
|
disc.setPropertyName(foundDisc.getPropertyName());
|
||||||
disc.setMapping(foundDisc.getMapping());
|
disc.setMapping(foundDisc.getMapping());
|
||||||
return disc;
|
return disc;
|
||||||
@@ -2860,8 +2860,12 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
List<MappedModel> descendentSchemas = new ArrayList();
|
List<MappedModel> descendentSchemas = new ArrayList();
|
||||||
Map<String, Schema> schemas = ModelUtils.getSchemas(openAPI);
|
Map<String, Schema> schemas = ModelUtils.getSchemas(openAPI);
|
||||||
String currentSchemaName = thisSchemaName;
|
String currentSchemaName = thisSchemaName;
|
||||||
while (true) {
|
Set<String> keys = schemas.keySet();
|
||||||
for (String childName : schemas.keySet()) {
|
|
||||||
|
int count = 0;
|
||||||
|
// hack: avoid infinite loop on potential self-references in event our checks fail.
|
||||||
|
while (100000 > count++) {
|
||||||
|
for (String childName : keys) {
|
||||||
if (childName.equals(thisSchemaName)) {
|
if (childName.equals(thisSchemaName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -2879,8 +2883,8 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String parentName = ModelUtils.getSimpleRef(ref);
|
String parentName = ModelUtils.getSimpleRef(ref);
|
||||||
if (parentName.equals(currentSchemaName)) {
|
if (parentName != null && parentName.equals(currentSchemaName)) {
|
||||||
if (queue.contains(childName) || descendentSchemas.contains(childName)) {
|
if (queue.contains(childName) || descendentSchemas.stream().anyMatch(i -> childName.equals(i.getMappingName()))) {
|
||||||
throw new RuntimeException("Stack overflow hit when looking for " + thisSchemaName + " an infinite loop starting and ending at " + childName + " was seen");
|
throw new RuntimeException("Stack overflow hit when looking for " + thisSchemaName + " an infinite loop starting and ending at " + childName + " was seen");
|
||||||
}
|
}
|
||||||
queue.add(childName);
|
queue.add(childName);
|
||||||
@@ -3600,7 +3604,10 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
op.hasReference = schemas != null && schemas.containsKey(op.returnBaseType);
|
op.hasReference = schemas != null && schemas.containsKey(op.returnBaseType);
|
||||||
|
|
||||||
// lookup discriminator
|
// lookup discriminator
|
||||||
Schema schema = schemas.get(op.returnBaseType);
|
Schema schema = null;
|
||||||
|
if (schemas != null) {
|
||||||
|
schema = schemas.get(op.returnBaseType);
|
||||||
|
}
|
||||||
if (schema != null) {
|
if (schema != null) {
|
||||||
CodegenModel cmod = fromModel(op.returnBaseType, schema);
|
CodegenModel cmod = fromModel(op.returnBaseType, schema);
|
||||||
op.discriminator = cmod.discriminator;
|
op.discriminator = cmod.discriminator;
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
protected String licenseUrl = "http://unlicense.org";
|
protected String licenseUrl = "http://unlicense.org";
|
||||||
protected String projectFolder = "src/main";
|
protected String projectFolder = "src/main";
|
||||||
protected String projectTestFolder = "src/test";
|
protected String projectTestFolder = "src/test";
|
||||||
protected String sourceFolder = projectFolder + File.separator + "java";
|
// this must not be OS-specific
|
||||||
|
protected String sourceFolder = projectFolder + "/java";
|
||||||
protected String testFolder = projectTestFolder + "/java";
|
protected String testFolder = projectTestFolder + "/java";
|
||||||
protected boolean fullJavaUtil;
|
protected boolean fullJavaUtil;
|
||||||
protected boolean discriminatorCaseSensitive = true; // True if the discriminator value lookup should be case-sensitive.
|
protected boolean discriminatorCaseSensitive = true; // True if the discriminator value lookup should be case-sensitive.
|
||||||
@@ -806,17 +807,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
if (ModelUtils.isArraySchema(schema)) {
|
if (ModelUtils.isArraySchema(schema)) {
|
||||||
final String pattern;
|
final String pattern;
|
||||||
if (ModelUtils.isSet(schema)) {
|
if (ModelUtils.isSet(schema)) {
|
||||||
if (fullJavaUtil) {
|
String mapInstantiationType = instantiationTypes().getOrDefault("set", "LinkedHashSet");
|
||||||
pattern = "new java.util.LinkedHashSet<%s>()";
|
pattern = "new " + mapInstantiationType + "<%s>()";
|
||||||
} else {
|
|
||||||
pattern = "new LinkedHashSet<%s>()";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (fullJavaUtil) {
|
String arrInstantiationType = instantiationTypes().getOrDefault("array", "ArrayList");
|
||||||
pattern = "new java.util.ArrayList<%s>()";
|
pattern = "new " + arrInstantiationType + "<%s>()";
|
||||||
} else {
|
|
||||||
pattern = "new ArrayList<%s>()";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Schema<?> items = getSchemaItems((ArraySchema) schema);
|
Schema<?> items = getSchemaItems((ArraySchema) schema);
|
||||||
@@ -839,12 +834,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final String pattern;
|
|
||||||
if (fullJavaUtil) {
|
String mapInstantiationType = instantiationTypes().getOrDefault("map", "HashMap");
|
||||||
pattern = "new java.util.HashMap<%s>()";
|
final String pattern = "new " + mapInstantiationType + "<%s>()";
|
||||||
} else {
|
|
||||||
pattern = "new HashMap<%s>()";
|
|
||||||
}
|
|
||||||
if (getAdditionalProperties(schema) == null) {
|
if (getAdditionalProperties(schema) == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,10 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
|
|||||||
typeMapping.put("ByteArray", "String");
|
typeMapping.put("ByteArray", "String");
|
||||||
typeMapping.put("UUID", "String");
|
typeMapping.put("UUID", "String");
|
||||||
typeMapping.put("URI", "String");
|
typeMapping.put("URI", "String");
|
||||||
|
|
||||||
|
instantiationTypes.put("map", "Hash");
|
||||||
|
instantiationTypes.put("array", "Array");
|
||||||
|
instantiationTypes.put("set", "Set");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -118,6 +122,22 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
|
|||||||
return super.getTypeDeclaration(schema);
|
return super.getTypeDeclaration(schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toInstantiationType(Schema schema) {
|
||||||
|
if (ModelUtils.isMapSchema(schema)) {
|
||||||
|
return instantiationTypes.get("map");
|
||||||
|
} else if (ModelUtils.isArraySchema(schema)) {
|
||||||
|
String parentType;
|
||||||
|
if (ModelUtils.isSet(schema)) {
|
||||||
|
parentType = "set";
|
||||||
|
} else {
|
||||||
|
parentType = "array";
|
||||||
|
}
|
||||||
|
return instantiationTypes.get(parentType);
|
||||||
|
}
|
||||||
|
return super.toInstantiationType(schema);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toDefaultValue(Schema p) {
|
public String toDefaultValue(Schema p) {
|
||||||
if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) {
|
if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) {
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen {
|
|||||||
@Override
|
@Override
|
||||||
public void processOpts() {
|
public void processOpts() {
|
||||||
super.processOpts();
|
super.processOpts();
|
||||||
boolean isLibrary = false;
|
|
||||||
|
|
||||||
if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_GUID)) {
|
if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_GUID)) {
|
||||||
setPackageGuid((String) additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_GUID));
|
setPackageGuid((String) additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_GUID));
|
||||||
@@ -191,10 +190,6 @@ public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen {
|
|||||||
|
|
||||||
additionalProperties.put(PROJECT_SDK, projectSdk);
|
additionalProperties.put(PROJECT_SDK, projectSdk);
|
||||||
|
|
||||||
// TODO - should we be supporting a Giraffe class library?
|
|
||||||
if (isLibrary)
|
|
||||||
LOGGER.warn("Library flag not currently supported.");
|
|
||||||
|
|
||||||
String authFolder = sourceFolder + File.separator + "auth";
|
String authFolder = sourceFolder + File.separator + "auth";
|
||||||
String implFolder = sourceFolder + File.separator + "impl";
|
String implFolder = sourceFolder + File.separator + "impl";
|
||||||
String helperFolder = sourceFolder + File.separator + "helpers";
|
String helperFolder = sourceFolder + File.separator + "helpers";
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
|
|||||||
languageSpecificPrimitives.add("File");
|
languageSpecificPrimitives.add("File");
|
||||||
languageSpecificPrimitives.add("Map");
|
languageSpecificPrimitives.add("Map");
|
||||||
|
|
||||||
sourceFolder = projectFolder + File.separator +"groovy";
|
// this must not be OS-specific
|
||||||
|
sourceFolder = projectFolder + "/groovy";
|
||||||
outputFolder = "generated-code/groovy";
|
outputFolder = "generated-code/groovy";
|
||||||
modelTemplateFiles.put("model.mustache", ".groovy");
|
modelTemplateFiles.put("model.mustache", ".groovy");
|
||||||
apiTemplateFiles.put("api.mustache", ".groovy");
|
apiTemplateFiles.put("api.mustache", ".groovy");
|
||||||
|
|||||||
@@ -1274,9 +1274,11 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
|
|||||||
if (dataType == null && cm.isArrayModel) { // isAlias + arrayModelType missing "datatype"
|
if (dataType == null && cm.isArrayModel) { // isAlias + arrayModelType missing "datatype"
|
||||||
dataType = "[" + cm.arrayModelType + "]";
|
dataType = "[" + cm.arrayModelType + "]";
|
||||||
}
|
}
|
||||||
cm.vendorExtensions.put(VENDOR_EXTENSION_X_DATA_TYPE, dataType);
|
if (dataType != null) {
|
||||||
if (dataType.equals("Maybe A.Value")) {
|
cm.vendorExtensions.put(VENDOR_EXTENSION_X_DATA_TYPE, dataType);
|
||||||
cm.vendorExtensions.put(VENDOR_EXTENSION_X_IS_MAYBE_VALUE, true);
|
if (dataType.equals("Maybe A.Value")) {
|
||||||
|
cm.vendorExtensions.put(VENDOR_EXTENSION_X_IS_MAYBE_VALUE, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (CodegenProperty var : cm.vars) {
|
for (CodegenProperty var : cm.vars) {
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
return f;
|
return f;
|
||||||
});
|
});
|
||||||
|
|
||||||
private static final long MILLIS_PER_DAY = 24 * 60 * 60 * 1000;
|
private static final long MILLIS_PER_DAY = 24 * 60 * 60 * 1000L;
|
||||||
|
|
||||||
private static final long MIN_DATE;
|
private static final long MIN_DATE;
|
||||||
|
|
||||||
@@ -551,10 +551,13 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
short inclusiveMax = (short) (var == null || !var.exclusiveMaximum ? 1 : 0);
|
short inclusiveMax = (short) (var == null || !var.exclusiveMaximum ? 1 : 0);
|
||||||
byte randomByte = (byte) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
byte randomByte = (byte) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomByte);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomByte);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(String.format(Locale.getDefault(), "(byte)%0#2x", randomByte));
|
buffer.append(String.format(Locale.getDefault(), "(byte)%0#2x", randomByte));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -568,10 +571,13 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
char inclusiveMax = (char) (var == null || !var.exclusiveMaximum ? 1 : 0);
|
char inclusiveMax = (char) (var == null || !var.exclusiveMaximum ? 1 : 0);
|
||||||
char randomChar = (char) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
char randomChar = (char) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomChar);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomChar);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(String.format(Locale.getDefault(), "'%c'", randomChar));
|
buffer.append(String.format(Locale.getDefault(), "'%c'", randomChar));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -607,24 +613,26 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
BigDecimal exclusiveMinLong = new BigDecimal(var != null && var.exclusiveMinimum ? 1 : 0);
|
BigDecimal exclusiveMinLong = new BigDecimal(var != null && var.exclusiveMinimum ? 1 : 0);
|
||||||
BigDecimal inclusiveMaxLong = new BigDecimal(var == null || !var.exclusiveMaximum ? 1 : 0);
|
BigDecimal inclusiveMaxLong = new BigDecimal(var == null || !var.exclusiveMaximum ? 1 : 0);
|
||||||
long randomDateLong = minLong.add(exclusiveMinLong).add(maxLong.add(inclusiveMaxLong).subtract(minLong)
|
long randomDateLong = minLong.add(exclusiveMinLong).add(maxLong.add(inclusiveMaxLong).subtract(minLong)
|
||||||
.subtract(exclusiveMinLong).multiply(new BigDecimal(Math.random()))).longValue();
|
.subtract(exclusiveMinLong).multiply(BigDecimal.valueOf(Math.random()))).longValue();
|
||||||
|
|
||||||
// If it's just a date without a time, round downwards to the nearest day.
|
// If it's just a date without a time, round downwards to the nearest day.
|
||||||
if ("date".equals(var.dataFormat))
|
if (var != null && "date".equals(var.dataFormat))
|
||||||
randomDateLong = (randomDateLong % MILLIS_PER_DAY) * MILLIS_PER_DAY;
|
randomDateLong = (randomDateLong % MILLIS_PER_DAY) * MILLIS_PER_DAY;
|
||||||
|
|
||||||
// NOTE: By default Jackson serializes Date as long milliseconds since epoch date, but that conflicts with
|
// NOTE: By default Jackson serializes Date as long milliseconds since epoch date, but that conflicts with
|
||||||
// the OpenAPI 2.0/3.0 specs, which mandates the ISO-8601 full-date or date-time formats. Accordingly, date
|
// the OpenAPI 2.0/3.0 specs, which mandates the ISO-8601 full-date or date-time formats. Accordingly, date
|
||||||
// and date-time fields are annotated with @JsonFormat to specify the appropriate ISO format.
|
// and date-time fields are annotated with @JsonFormat to specify the appropriate ISO format.
|
||||||
if (loadTestDataFromFile) {
|
if (loadTestDataFromFile) {
|
||||||
Date randomDate = new Date(randomDateLong);
|
if (var != null) {
|
||||||
switch (var.dataFormat) {
|
Date randomDate = new Date(randomDateLong);
|
||||||
case "date":
|
switch (var.dataFormat) {
|
||||||
var.addTestData(ISO8601_DATE_FORMAT.get().format(randomDate));
|
case "date":
|
||||||
break;
|
var.addTestData(ISO8601_DATE_FORMAT.get().format(randomDate));
|
||||||
case "date-time":
|
break;
|
||||||
var.addTestData(ISO8601_DATETIME_FORMAT.get().format(randomDate));
|
case "date-time":
|
||||||
break;
|
var.addTestData(ISO8601_DATETIME_FORMAT.get().format(randomDate));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
buffer.append("new Date(").append(randomDateLong).append(')');
|
buffer.append("new Date(").append(randomDateLong).append(')');
|
||||||
@@ -635,19 +643,20 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
private void appendRandomDouble(StringBuilder buffer, CodegenOperation op, CodegenVariable var) {
|
private void appendRandomDouble(StringBuilder buffer, CodegenOperation op, CodegenVariable var) {
|
||||||
if (!appendRandomEnum(buffer, op, var)) {
|
if (!appendRandomEnum(buffer, op, var)) {
|
||||||
// NOTE: use BigDecimal to hold double values, to avoid numeric overflow.
|
// NOTE: use BigDecimal to hold double values, to avoid numeric overflow.
|
||||||
BigDecimal min = new BigDecimal(
|
BigDecimal min = BigDecimal.valueOf(var == null || var.minimum == null ? Long.MIN_VALUE : Double.parseDouble(var.minimum));
|
||||||
var == null || var.minimum == null ? Long.MIN_VALUE : Double.parseDouble(var.minimum));
|
BigDecimal max = BigDecimal.valueOf(var == null || var.maximum == null ? Long.MAX_VALUE : Double.parseDouble(var.maximum));
|
||||||
BigDecimal max = new BigDecimal(
|
|
||||||
var == null || var.maximum == null ? Long.MAX_VALUE : Double.parseDouble(var.maximum));
|
|
||||||
BigDecimal exclusiveMin = new BigDecimal(var != null && var.exclusiveMinimum ? 1 : 0);
|
BigDecimal exclusiveMin = new BigDecimal(var != null && var.exclusiveMinimum ? 1 : 0);
|
||||||
BigDecimal inclusiveMax = new BigDecimal(var == null || !var.exclusiveMaximum ? 1 : 0);
|
BigDecimal inclusiveMax = new BigDecimal(var == null || !var.exclusiveMaximum ? 1 : 0);
|
||||||
BigDecimal randomBigDecimal = min.add(exclusiveMin).add(max.add(inclusiveMax).subtract(min)
|
BigDecimal randomBigDecimal = min.add(exclusiveMin).add(max.add(inclusiveMax).subtract(min)
|
||||||
.subtract(exclusiveMin).multiply(new BigDecimal(String.valueOf(Math.random()))));
|
.subtract(exclusiveMin).multiply(new BigDecimal(String.valueOf(Math.random()))));
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomBigDecimal);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomBigDecimal);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(randomBigDecimal.toString()).append('D');
|
buffer.append(randomBigDecimal.toString()).append('D');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -704,10 +713,13 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
float randomFloat = (float) (min + exclusiveMin
|
float randomFloat = (float) (min + exclusiveMin
|
||||||
+ ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
+ ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomFloat);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomFloat);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(String.format(Locale.getDefault(), "%g", randomFloat)).append('F');
|
buffer.append(String.format(Locale.getDefault(), "%g", randomFloat)).append('F');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -720,10 +732,13 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
long inclusiveMax = var == null || !var.exclusiveMaximum ? 1 : 0;
|
long inclusiveMax = var == null || !var.exclusiveMaximum ? 1 : 0;
|
||||||
int randomInt = (int) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
int randomInt = (int) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomInt);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomInt);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(randomInt);
|
buffer.append(randomInt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -737,13 +752,16 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
BigDecimal exclusiveMin = new BigDecimal(var != null && var.exclusiveMinimum ? 1 : 0);
|
BigDecimal exclusiveMin = new BigDecimal(var != null && var.exclusiveMinimum ? 1 : 0);
|
||||||
BigDecimal inclusiveMax = new BigDecimal(var == null || !var.exclusiveMaximum ? 1 : 0);
|
BigDecimal inclusiveMax = new BigDecimal(var == null || !var.exclusiveMaximum ? 1 : 0);
|
||||||
long randomLong = min.add(exclusiveMin).add(
|
long randomLong = min.add(exclusiveMin).add(
|
||||||
max.add(inclusiveMax).subtract(min).subtract(exclusiveMin).multiply(new BigDecimal(Math.random())))
|
max.add(inclusiveMax).subtract(min).subtract(exclusiveMin).multiply(BigDecimal.valueOf(Math.random())))
|
||||||
.longValue();
|
.longValue();
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomLong);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomLong);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(randomLong).append('L');
|
buffer.append(randomLong).append('L');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -757,10 +775,13 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
short randomShort = (short) (min + exclusiveMin
|
short randomShort = (short) (min + exclusiveMin
|
||||||
+ ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
+ ((max + inclusiveMax - min - exclusiveMin) * Math.random()));
|
||||||
|
|
||||||
if (loadTestDataFromFile)
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomShort);
|
if (var != null) {
|
||||||
else
|
var.addTestData(randomShort);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
buffer.append(String.format(Locale.getDefault(), "(short)%d", randomShort));
|
buffer.append(String.format(Locale.getDefault(), "(short)%d", randomShort));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -769,7 +790,9 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
String randomString = generateRandomString(var);
|
String randomString = generateRandomString(var);
|
||||||
|
|
||||||
if (loadTestDataFromFile) {
|
if (loadTestDataFromFile) {
|
||||||
var.addTestData(randomString);
|
if (var != null) {
|
||||||
|
var.addTestData(randomString);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
buffer.append('"').append(randomString).append('"');
|
buffer.append('"').append(randomString).append('"');
|
||||||
}
|
}
|
||||||
@@ -1375,13 +1398,15 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
supportingFiles.remove(supportingFile);
|
if (supportingFile != null) {
|
||||||
SupportingFile updated = new SupportingFile(
|
supportingFiles.remove(supportingFile);
|
||||||
supportingFile.getTemplateFile(),
|
SupportingFile updated = new SupportingFile(
|
||||||
supportingFile.getFolder(),
|
supportingFile.getTemplateFile(),
|
||||||
"ApplicationContext-" + invokerPackage + ".xml"
|
supportingFile.getFolder(),
|
||||||
);
|
"ApplicationContext-" + invokerPackage + ".xml"
|
||||||
supportingFiles.add(updated);
|
);
|
||||||
|
supportingFiles.add(updated);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -818,11 +818,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (addImports) {
|
if (addImports) {
|
||||||
Map<String, String> imports2Classnames = new HashMap<String, String>() {{
|
Map<String, String> imports2Classnames = new HashMap<>();
|
||||||
put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable");
|
imports2Classnames.put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable");
|
||||||
put("NoSuchElementException", "java.util.NoSuchElementException");
|
imports2Classnames.put("NoSuchElementException", "java.util.NoSuchElementException");
|
||||||
put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore");
|
imports2Classnames.put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore");
|
||||||
}};
|
|
||||||
for (Map.Entry<String, String> entry : imports2Classnames.entrySet()) {
|
for (Map.Entry<String, String> entry : imports2Classnames.entrySet()) {
|
||||||
cm.imports.add(entry.getKey());
|
cm.imports.add(entry.getKey());
|
||||||
Map<String, String> importsItem = new HashMap<String, String>();
|
Map<String, String> importsItem = new HashMap<String, String>();
|
||||||
@@ -976,9 +976,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
@Override
|
@Override
|
||||||
public void addImportsToOneOfInterface(List<Map<String, String>> imports) {
|
public void addImportsToOneOfInterface(List<Map<String, String>> imports) {
|
||||||
for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo")) {
|
for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo")) {
|
||||||
Map<String, String> oneImport = new HashMap<String, String>() {{
|
Map<String, String> oneImport = new HashMap<>();
|
||||||
put("import", importMapping.get(i));
|
oneImport.put("import", importMapping.get(i));
|
||||||
}};
|
|
||||||
if (!imports.contains(oneImport)) {
|
if (!imports.contains(oneImport)) {
|
||||||
imports.add(oneImport);
|
imports.add(oneImport);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -701,7 +701,6 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
StringEscapeUtils.escapeJava(input)
|
StringEscapeUtils.escapeJava(input)
|
||||||
.replace("\\/", "/"))
|
.replace("\\/", "/"))
|
||||||
.replaceAll("[\\t\\n\\r]", " ")
|
.replaceAll("[\\t\\n\\r]", " ")
|
||||||
.replace("\\", "\\\\")
|
|
||||||
.replace("\"", "\"\""));
|
.replace("\"", "\"\""));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
public static final String DEFAULT_LIBRARY = "urllib3";
|
public static final String DEFAULT_LIBRARY = "urllib3";
|
||||||
// nose is a python testing framework, we use pytest if USE_NOSE is unset
|
// nose is a python testing framework, we use pytest if USE_NOSE is unset
|
||||||
public static final String USE_NOSE = "useNose";
|
public static final String USE_NOSE = "useNose";
|
||||||
|
public static final String RECURSION_LIMIT = "recursionLimit";
|
||||||
|
|
||||||
protected String packageName = "openapi_client";
|
protected String packageName = "openapi_client";
|
||||||
protected String packageVersion = "1.0.0";
|
protected String packageVersion = "1.0.0";
|
||||||
@@ -184,6 +185,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
.defaultValue(Boolean.FALSE.toString()));
|
.defaultValue(Boolean.FALSE.toString()));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework").
|
cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework").
|
||||||
defaultValue(Boolean.FALSE.toString()));
|
defaultValue(Boolean.FALSE.toString()));
|
||||||
|
cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value."));
|
||||||
|
|
||||||
supportedLibraries.put("urllib3", "urllib3-based client");
|
supportedLibraries.put("urllib3", "urllib3-based client");
|
||||||
supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)");
|
supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)");
|
||||||
@@ -253,6 +255,15 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
setUseNose((String) additionalProperties.get(USE_NOSE));
|
setUseNose((String) additionalProperties.get(USE_NOSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check to see if setRecursionLimit is set and whether it's an integer
|
||||||
|
if (additionalProperties.containsKey(RECURSION_LIMIT)) {
|
||||||
|
try {
|
||||||
|
Integer.parseInt((String)additionalProperties.get(RECURSION_LIMIT));
|
||||||
|
} catch(NumberFormatException | NullPointerException e) {
|
||||||
|
throw new IllegalArgumentException("recursionLimit must be an integer, e.g. 2000.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String readmePath = "README.md";
|
String readmePath = "README.md";
|
||||||
String readmeTemplate = "README.mustache";
|
String readmeTemplate = "README.mustache";
|
||||||
if (generateSourceCodeOnly) {
|
if (generateSourceCodeOnly) {
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
|
|||||||
GlobalFeature.XMLStructureDefinitions,
|
GlobalFeature.XMLStructureDefinitions,
|
||||||
GlobalFeature.Callbacks,
|
GlobalFeature.Callbacks,
|
||||||
GlobalFeature.LinkObjects,
|
GlobalFeature.LinkObjects,
|
||||||
GlobalFeature.ParameterStyling
|
GlobalFeature.ParameterStyling,
|
||||||
|
GlobalFeature.ParameterizedServer,
|
||||||
|
GlobalFeature.MultiServer
|
||||||
)
|
)
|
||||||
.includeSchemaSupportFeatures(
|
.includeSchemaSupportFeatures(
|
||||||
SchemaSupportFeature.Polymorphism
|
SchemaSupportFeature.Polymorphism
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.*;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static org.openapitools.codegen.utils.OnceLogger.once;
|
|
||||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||||
import static org.openapitools.codegen.utils.StringUtils.underscore;
|
import static org.openapitools.codegen.utils.StringUtils.underscore;
|
||||||
|
|
||||||
@@ -260,10 +260,10 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
if (StringUtils.isEmpty(System.getenv("RUST_POST_PROCESS_FILE"))) {
|
if (StringUtils.isEmpty(System.getenv("RUST_POST_PROCESS_FILE"))) {
|
||||||
LOGGER.info("Environment variable RUST_POST_PROCESS_FILE not defined. rustfmt will be used" +
|
LOGGER.info("Environment variable RUST_POST_PROCESS_FILE not defined. rustfmt will be used" +
|
||||||
" by default. To choose a different tool, try" +
|
" by default. To choose a different tool, try" +
|
||||||
" 'export RUST_POST_PROCESS_FILE=\"/usr/local/bin/rustfmt\"' (Linux/Mac)");
|
" 'export RUST_POST_PROCESS_FILE=\"/usr/local/bin/rustfmt\"' (Linux/Mac)");
|
||||||
LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` " +
|
LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` " +
|
||||||
" (--enable-post-process-file for CLI).");
|
" (--enable-post-process-file for CLI).");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Boolean.TRUE.equals(ModelUtils.isGenerateAliasAsModel())) {
|
if (!Boolean.TRUE.equals(ModelUtils.isGenerateAliasAsModel())) {
|
||||||
@@ -311,7 +311,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures a friendly name for the generator. This will be used by the generator
|
* Configures a friendly name for the generator. This will be used by the generator
|
||||||
* to select the library with the -g flag.
|
* to select the library with the -g flag.
|
||||||
*
|
*
|
||||||
* @return the friendly name for the generator
|
* @return the friendly name for the generator
|
||||||
@@ -329,7 +329,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHelp() {
|
public String getHelp() {
|
||||||
return "Generates a Rust client/server library (beta) using the swagger-codegen project.";
|
return "Generates a Rust client/server library (beta) using the openapi-generator project.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -557,14 +557,14 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
private boolean isMimetypeXml(String mimetype) {
|
private boolean isMimetypeXml(String mimetype) {
|
||||||
return mimetype.toLowerCase(Locale.ROOT).startsWith(xmlMimeType) ||
|
return mimetype.toLowerCase(Locale.ROOT).startsWith(xmlMimeType) ||
|
||||||
mimetype.toLowerCase(Locale.ROOT).startsWith(problemXmlMimeType) ||
|
mimetype.toLowerCase(Locale.ROOT).startsWith(problemXmlMimeType) ||
|
||||||
mimetype.toLowerCase(Locale.ROOT).startsWith(textXmlMimeType);
|
mimetype.toLowerCase(Locale.ROOT).startsWith(textXmlMimeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMimetypeJson(String mimetype) {
|
private boolean isMimetypeJson(String mimetype) {
|
||||||
return mimetype.toLowerCase(Locale.ROOT).startsWith(jsonMimeType) ||
|
return mimetype.toLowerCase(Locale.ROOT).startsWith(jsonMimeType) ||
|
||||||
mimetype.toLowerCase(Locale.ROOT).startsWith(mergePatchJsonMimeType) ||
|
mimetype.toLowerCase(Locale.ROOT).startsWith(mergePatchJsonMimeType) ||
|
||||||
mimetype.toLowerCase(Locale.ROOT).startsWith(problemJsonMimeType);
|
mimetype.toLowerCase(Locale.ROOT).startsWith(problemJsonMimeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMimetypeWwwFormUrlEncoded(String mimetype) {
|
private boolean isMimetypeWwwFormUrlEncoded(String mimetype) {
|
||||||
@@ -592,11 +592,11 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
*/
|
*/
|
||||||
boolean isMimetypePlain(String mimetype) {
|
boolean isMimetypePlain(String mimetype) {
|
||||||
boolean result = !(isMimetypeUnknown(mimetype) ||
|
boolean result = !(isMimetypeUnknown(mimetype) ||
|
||||||
isMimetypeXml(mimetype) ||
|
isMimetypeXml(mimetype) ||
|
||||||
isMimetypeJson(mimetype) ||
|
isMimetypeJson(mimetype) ||
|
||||||
isMimetypeWwwFormUrlEncoded(mimetype) ||
|
isMimetypeWwwFormUrlEncoded(mimetype) ||
|
||||||
isMimetypeMultipartFormData(mimetype) ||
|
isMimetypeMultipartFormData(mimetype) ||
|
||||||
isMimetypeMultipartRelated(mimetype));
|
isMimetypeMultipartRelated(mimetype));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,9 +635,9 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// The callback API is logically distinct from the main API, so
|
// The callback API is logically distinct from the main API, so
|
||||||
// it uses a separate path set map.
|
// it uses a separate path set map.
|
||||||
if (op.isCallbackRequest) {
|
if (op.isCallbackRequest) {
|
||||||
pathSetMap = this.callbacksPathSetMap;
|
pathSetMap = this.callbacksPathSetMap;
|
||||||
} else {
|
} else {
|
||||||
pathSetMap = this.pathSetMap;
|
pathSetMap = this.pathSetMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (pathSetMap.containsKey(pathId)) {
|
while (pathSetMap.containsKey(pathId)) {
|
||||||
@@ -735,7 +735,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
op.vendorExtensions.put("x-operation-id", underscoredOperationId);
|
op.vendorExtensions.put("x-operation-id", underscoredOperationId);
|
||||||
op.vendorExtensions.put("x-uppercase-operation-id", underscoredOperationId.toUpperCase(Locale.ROOT));
|
op.vendorExtensions.put("x-uppercase-operation-id", underscoredOperationId.toUpperCase(Locale.ROOT));
|
||||||
String vendorExtensionPath = op.path.replace("{", ":").replace("}", "");
|
String vendorExtensionPath = op.path.replace("{", ":").replace("}", "");
|
||||||
op.vendorExtensions.put("x-path",vendorExtensionPath);
|
op.vendorExtensions.put("x-path", vendorExtensionPath);
|
||||||
op.vendorExtensions.put("x-path-id", pathId);
|
op.vendorExtensions.put("x-path-id", pathId);
|
||||||
op.vendorExtensions.put("x-has-path-params", hasPathParams);
|
op.vendorExtensions.put("x-has-path-params", hasPathParams);
|
||||||
op.vendorExtensions.put("x-path-format-string", formatPath);
|
op.vendorExtensions.put("x-path-format-string", formatPath);
|
||||||
@@ -744,8 +744,8 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
op.vendorExtensions.put("x-http-method", vendorExtensionHttpMethod);
|
op.vendorExtensions.put("x-http-method", vendorExtensionHttpMethod);
|
||||||
|
|
||||||
if (!op.vendorExtensions.containsKey("x-must-use-response")) {
|
if (!op.vendorExtensions.containsKey("x-must-use-response")) {
|
||||||
// If there's more than one response, than by default the user must explicitly handle them
|
// If there's more than one response, than by default the user must explicitly handle them
|
||||||
op.vendorExtensions.put("x-must-use-response", op.responses.size() > 1);
|
op.vendorExtensions.put("x-must-use-response", op.responses.size() > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (CodegenParameter param : op.allParams) {
|
for (CodegenParameter param : op.allParams) {
|
||||||
@@ -1300,23 +1300,23 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// If we have callbacks, add the callbacks module, otherwise remove it
|
// If we have callbacks, add the callbacks module, otherwise remove it
|
||||||
boolean hasCallbacks = haveCallbacks(bundle);
|
boolean hasCallbacks = haveCallbacks(bundle);
|
||||||
bundle.put("hasCallbacks", hasCallbacks);
|
bundle.put("hasCallbacks", hasCallbacks);
|
||||||
SupportingFile[] callbackFiles = new SupportingFile[] {
|
SupportingFile[] callbackFiles = new SupportingFile[]{
|
||||||
new SupportingFile("client-callbacks.mustache", "src/client", "callbacks.rs"),
|
new SupportingFile("client-callbacks.mustache", "src/client", "callbacks.rs"),
|
||||||
new SupportingFile("server-callbacks.mustache", "src/server", "callbacks.rs"),
|
new SupportingFile("server-callbacks.mustache", "src/server", "callbacks.rs"),
|
||||||
new SupportingFile("example-client-server.mustache", "examples/client", "server.rs")
|
new SupportingFile("example-client-server.mustache", "examples/client", "server.rs")
|
||||||
};
|
};
|
||||||
for (SupportingFile callbackFile : callbackFiles) {
|
for (SupportingFile callbackFile : callbackFiles) {
|
||||||
if (hasCallbacks) {
|
if (hasCallbacks) {
|
||||||
supportingFiles.add(callbackFile);
|
supportingFiles.add(callbackFile);
|
||||||
} else {
|
} else {
|
||||||
supportingFiles.remove(callbackFile);
|
supportingFiles.remove(callbackFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasCallbacks) {
|
if (hasCallbacks) {
|
||||||
Map<String, Object> callbackData = new HashMap();
|
Map<String, Object> callbackData = new HashMap();
|
||||||
addPathSetMapToBundle(callbacksPathSetMap, callbackData);
|
addPathSetMapToBundle(callbacksPathSetMap, callbackData);
|
||||||
bundle.put("callbacks", callbackData);
|
bundle.put("callbacks", callbackData);
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.postProcessSupportingFileData(bundle);
|
return super.postProcessSupportingFileData(bundle);
|
||||||
@@ -1326,7 +1326,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
* Add a built path set map to the provided bundle
|
* Add a built path set map to the provided bundle
|
||||||
*
|
*
|
||||||
* @param pathSetMap A previously built path set map
|
* @param pathSetMap A previously built path set map
|
||||||
* @param bundle Bundle for the supporting files to add the data to.
|
* @param bundle Bundle for the supporting files to add the data to.
|
||||||
*/
|
*/
|
||||||
private static void addPathSetMapToBundle(Map<String, Map<String, String>> pathSetMap, Map<String, Object> bundle) {
|
private static void addPathSetMapToBundle(Map<String, Map<String, String>> pathSetMap, Map<String, Object> bundle) {
|
||||||
// We previously built a mapping from path to path ID and regular
|
// We previously built a mapping from path to path ID and regular
|
||||||
@@ -1544,9 +1544,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// the user than the alternative.
|
// the user than the alternative.
|
||||||
LOGGER.warn("Ignoring additionalProperties (see https://github.com/OpenAPITools/openapi-generator/issues/318) alongside defined properties");
|
LOGGER.warn("Ignoring additionalProperties (see https://github.com/OpenAPITools/openapi-generator/issues/318) alongside defined properties");
|
||||||
cm.dataType = null;
|
cm.dataType = null;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
cm.dataType = "std::collections::HashMap<String, " + cm.additionalPropertiesType + ">";
|
cm.dataType = "std::collections::HashMap<String, " + cm.additionalPropertiesType + ">";
|
||||||
}
|
}
|
||||||
} else if (cm.dataType != null) {
|
} else if (cm.dataType != null) {
|
||||||
@@ -1635,7 +1633,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// only process files with .rs extension
|
// only process files with .rs extension
|
||||||
if ("rs".equals(FilenameUtils.getExtension(file.toString()))) {
|
if ("rs".equals(FilenameUtils.getExtension(file.toString()))) {
|
||||||
try {
|
try {
|
||||||
Process p = Runtime.getRuntime().exec(new String[] {commandPrefix, file.toString()});
|
Process p = Runtime.getRuntime().exec(new String[]{commandPrefix, file.toString()});
|
||||||
int exitValue = p.waitFor();
|
int exitValue = p.waitFor();
|
||||||
if (exitValue != 0) {
|
if (exitValue != 0) {
|
||||||
LOGGER.error("Error running the command ({} {}). Exit code: {}", commandPrefix, file.toString(), exitValue);
|
LOGGER.error("Error running the command ({} {}). Exit code: {}", commandPrefix, file.toString(), exitValue);
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package org.openapitools.codegen.languages;
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
import io.swagger.v3.oas.models.Operation;
|
import io.swagger.v3.oas.models.Operation;
|
||||||
import io.swagger.v3.oas.models.parameters.Parameter;
|
import io.swagger.v3.oas.models.parameters.Parameter;
|
||||||
import io.swagger.v3.oas.models.servers.Server;
|
import io.swagger.v3.oas.models.servers.Server;
|
||||||
@@ -269,25 +271,23 @@ public class ScalaAkkaHttpServerCodegen extends AbstractScalaCodegen implements
|
|||||||
return baseObjs;
|
return baseObjs;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Set<String> primitiveParamTypes = new HashSet<String>() {{
|
private static final Set<String> primitiveParamTypes = ImmutableSet.of(
|
||||||
addAll(Arrays.asList(
|
"Int",
|
||||||
"Int",
|
"Long",
|
||||||
"Long",
|
"Float",
|
||||||
"Float",
|
"Double",
|
||||||
"Double",
|
"Boolean",
|
||||||
"Boolean",
|
"String"
|
||||||
"String"
|
);
|
||||||
));
|
|
||||||
}};
|
|
||||||
|
|
||||||
private static Map<String, String> pathTypeToMatcher = new HashMap<String, String>() {{
|
private static final Map<String, String> pathTypeToMatcher = ImmutableMap.<String,String>builder()
|
||||||
put("Int", "IntNumber");
|
.put("Int", "IntNumber")
|
||||||
put("Long", "LongNumber");
|
.put("Long", "LongNumber")
|
||||||
put("Float", "FloatNumber");
|
.put("Float", "FloatNumber")
|
||||||
put("Double", "DoubleNumber");
|
.put("Double", "DoubleNumber")
|
||||||
put("Boolean", "Boolean");
|
.put("Boolean", "Boolean")
|
||||||
put("String", "Segment");
|
.put("String", "Segment")
|
||||||
}};
|
.build();
|
||||||
|
|
||||||
protected static void addPathMatcher(CodegenOperation codegenOperation) {
|
protected static void addPathMatcher(CodegenOperation codegenOperation) {
|
||||||
LinkedList<String> allPaths = new LinkedList<>(Arrays.asList(codegenOperation.path.split("/")));
|
LinkedList<String> allPaths = new LinkedList<>(Arrays.asList(codegenOperation.path.split("/")));
|
||||||
|
|||||||
@@ -172,18 +172,20 @@ public class ModelUtils {
|
|||||||
childrenMap = tmpChildrenMap;
|
childrenMap = tmpChildrenMap;
|
||||||
List<String> unusedSchemas = new ArrayList<String>();
|
List<String> unusedSchemas = new ArrayList<String>();
|
||||||
|
|
||||||
Map<String, Schema> schemas = getSchemas(openAPI);
|
if (openAPI != null) {
|
||||||
unusedSchemas.addAll(schemas.keySet());
|
Map<String, Schema> schemas = getSchemas(openAPI);
|
||||||
|
unusedSchemas.addAll(schemas.keySet());
|
||||||
|
|
||||||
visitOpenAPI(openAPI, (s, t) -> {
|
visitOpenAPI(openAPI, (s, t) -> {
|
||||||
if (s.get$ref() != null) {
|
if (s.get$ref() != null) {
|
||||||
String ref = getSimpleRef(s.get$ref());
|
String ref = getSimpleRef(s.get$ref());
|
||||||
unusedSchemas.remove(ref);
|
unusedSchemas.remove(ref);
|
||||||
if (childrenMap.containsKey(ref)) {
|
if (childrenMap.containsKey(ref)) {
|
||||||
unusedSchemas.removeAll(childrenMap.get(ref));
|
unusedSchemas.removeAll(childrenMap.get(ref));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
return unusedSchemas;
|
return unusedSchemas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ apiClient_t *apiClient_create() {
|
|||||||
apiClient->sslConfig = NULL;
|
apiClient->sslConfig = NULL;
|
||||||
apiClient->dataReceived = NULL;
|
apiClient->dataReceived = NULL;
|
||||||
apiClient->dataReceivedLen = 0;
|
apiClient->dataReceivedLen = 0;
|
||||||
|
apiClient->data_callback_func = NULL;
|
||||||
apiClient->response_code = 0;
|
apiClient->response_code = 0;
|
||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
@@ -58,6 +59,7 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath
|
|||||||
|
|
||||||
apiClient->dataReceived = NULL;
|
apiClient->dataReceived = NULL;
|
||||||
apiClient->dataReceivedLen = 0;
|
apiClient->dataReceivedLen = 0;
|
||||||
|
apiClient->data_callback_func = NULL;
|
||||||
apiClient->response_code = 0;
|
apiClient->response_code = 0;
|
||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
@@ -91,6 +93,7 @@ void apiClient_free(apiClient_t *apiClient) {
|
|||||||
if(apiClient->basePath) {
|
if(apiClient->basePath) {
|
||||||
free(apiClient->basePath);
|
free(apiClient->basePath);
|
||||||
}
|
}
|
||||||
|
apiClient->data_callback_func = NULL;
|
||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
{{#isBasic}}
|
{{#isBasic}}
|
||||||
@@ -558,6 +561,10 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) {
|
|||||||
apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
|
apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
|
||||||
memcpy(apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
|
memcpy(apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
|
||||||
apiClient->dataReceivedLen += size_this_time;
|
apiClient->dataReceivedLen += size_this_time;
|
||||||
|
((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1
|
||||||
|
if (apiClient->data_callback_func) {
|
||||||
|
apiClient->data_callback_func(&apiClient->dataReceived, &apiClient->dataReceivedLen);
|
||||||
|
}
|
||||||
return size_this_time;
|
return size_this_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ typedef struct apiClient_t {
|
|||||||
sslConfig_t *sslConfig;
|
sslConfig_t *sslConfig;
|
||||||
void *dataReceived;
|
void *dataReceived;
|
||||||
long dataReceivedLen;
|
long dataReceivedLen;
|
||||||
|
void (*data_callback_func)(void **, long *);
|
||||||
long response_code;
|
long response_code;
|
||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
|
|||||||
@@ -183,3 +183,18 @@ char* findStrInStrList(list_t *strList, const char *str)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear_and_free_string_list(list_t *list)
|
||||||
|
{
|
||||||
|
if (!list) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
listEntry_t *listEntry = NULL;
|
||||||
|
list_ForEach(listEntry, list) {
|
||||||
|
char *list_item = listEntry->data;
|
||||||
|
free(list_item);
|
||||||
|
list_item = NULL;
|
||||||
|
}
|
||||||
|
list_free(list);
|
||||||
|
}
|
||||||
@@ -38,4 +38,5 @@ void listEntry_printAsInt(listEntry_t* listEntry, void *additionalData);
|
|||||||
void listEntry_free(listEntry_t *listEntry, void *additionalData);
|
void listEntry_free(listEntry_t *listEntry, void *additionalData);
|
||||||
|
|
||||||
char* findStrInStrList(list_t* strList, const char* str);
|
char* findStrInStrList(list_t* strList, const char* str);
|
||||||
|
void clear_and_free_string_list(list_t * list);
|
||||||
#endif // INCLUDE_LIST_H
|
#endif // INCLUDE_LIST_H
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public class OAS {
|
|||||||
|
|
||||||
@TestVisible
|
@TestVisible
|
||||||
protected virtual Object toReturnValue(String body, Type returnType, String contentType) {
|
protected virtual Object toReturnValue(String body, Type returnType, String contentType) {
|
||||||
if (contentType == 'application/json') {
|
if (contentType.contains('application/json')) {
|
||||||
Object o = returnType.newInstance();
|
Object o = returnType.newInstance();
|
||||||
if (o instanceof MappedProperties) {
|
if (o instanceof MappedProperties) {
|
||||||
Map<String, String> propertyMappings = ((MappedProperties) o).getPropertyMappings();
|
Map<String, String> propertyMappings = ((MappedProperties) o).getPropertyMappings();
|
||||||
|
|||||||
@@ -92,11 +92,13 @@ namespace {{packageName}}.Client
|
|||||||
/// <value>The servers</value>
|
/// <value>The servers</value>
|
||||||
private IList<IReadOnlyDictionary<string, object>> _servers;
|
private IList<IReadOnlyDictionary<string, object>> _servers;
|
||||||
{{/servers.0}}
|
{{/servers.0}}
|
||||||
|
{{#hasHttpSignatureMethods}}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HTTPSigning configuration
|
/// HTTPSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private HTTPSigningConfiguration _HTTPSigningConfiguration = null;
|
private HTTPSigningConfiguration _HTTPSigningConfiguration = null;
|
||||||
|
{{/hasHttpSignatureMethods}}
|
||||||
#endregion Private Members
|
#endregion Private Members
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
@@ -467,6 +469,7 @@ namespace {{packageName}}.Client
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
{{/servers.0}}
|
{{/servers.0}}
|
||||||
|
{{#hasHttpSignatureMethods}}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and Sets the HTTPSigningConfiuration
|
/// Gets and Sets the HTTPSigningConfiuration
|
||||||
@@ -476,6 +479,7 @@ namespace {{packageName}}.Client
|
|||||||
get { return _HTTPSigningConfiguration; }
|
get { return _HTTPSigningConfiguration; }
|
||||||
set { _HTTPSigningConfiguration = value; }
|
set { _HTTPSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
{{/hasHttpSignatureMethods}}
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
@@ -553,9 +557,11 @@ namespace {{packageName}}.Client
|
|||||||
Username = second.Username ?? first.Username,
|
Username = second.Username ?? first.Username,
|
||||||
Password = second.Password ?? first.Password,
|
Password = second.Password ?? first.Password,
|
||||||
AccessToken = second.AccessToken ?? first.AccessToken,
|
AccessToken = second.AccessToken ?? first.AccessToken,
|
||||||
|
{{#hasHttpSignatureMethods}}
|
||||||
|
HTTPSigningConfiguration = second.HTTPSigningConfiguration ?? first.HTTPSigningConfiguration,
|
||||||
|
{{/hasHttpSignatureMethods}}
|
||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat
|
||||||
HTTPSigningConfiguration = second.HTTPSigningConfiguration ?? first.HTTPSigningConfiguration
|
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,10 +96,12 @@ namespace {{packageName}}.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>X509 Certificate collection.</value>
|
/// <value>X509 Certificate collection.</value>
|
||||||
X509CertificateCollection ClientCertificates { get; }
|
X509CertificateCollection ClientCertificates { get; }
|
||||||
|
{{#hasHttpSignatureMethods}}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the HTTPSigning configuration
|
/// Gets the HTTPSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HTTPSigningConfiguration HTTPSigningConfiguration { get; }
|
HTTPSigningConfiguration HTTPSigningConfiguration { get; }
|
||||||
|
{{/hasHttpSignatureMethods}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ func main() {
|
|||||||
|
|
||||||
configuration := {{goImportAlias}}.NewConfiguration()
|
configuration := {{goImportAlias}}.NewConfiguration()
|
||||||
api_client := {{goImportAlias}}.NewAPIClient(configuration)
|
api_client := {{goImportAlias}}.NewAPIClient(configuration)
|
||||||
resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(), {{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{{vendorExtensions.x-export-param-name}}}({{{paramName}}}){{/optionalParams}}.Execute()
|
resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err)
|
fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err)
|
||||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
|||||||
@@ -103,29 +103,34 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function findNode(id, currentNode) {
|
function findNode(id, currentNode) {
|
||||||
return (Object.keys(currentNode)[0] === id) ? currentNode : findNodeInChildren(id, currentNode);
|
var currentChild,
|
||||||
}
|
result;
|
||||||
|
|
||||||
function findNodeInChildren(id, currentNode) {
|
if ( Object.keys(currentNode)[0] == id) {
|
||||||
for (let prop in currentNode) {
|
return currentNode;
|
||||||
if (currentNode.hasOwnProperty(prop)) {
|
} else {
|
||||||
let currentChild = currentNode[prop];
|
// Use a for loop instead of forEach to avoid nested functions
|
||||||
if (id === prop) {
|
// Otherwise "return" will not work properly
|
||||||
return currentChild;
|
for(var propt in currentNode){
|
||||||
} else {
|
if (currentNode.hasOwnProperty(propt)) {
|
||||||
// Search in the current child
|
currentChild = currentNode[propt]
|
||||||
if (typeof (currentChild) === 'object') {
|
if (id == propt) {
|
||||||
let result = findNode(id, currentChild);
|
return currentChild;
|
||||||
if (result !== false) {
|
} else {
|
||||||
return result;
|
// Search in the current child
|
||||||
|
if (typeof(currentChild) === 'object') {
|
||||||
|
result = findNode(id, currentChild);
|
||||||
|
if (result != false) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// The node has not been found and we have no more options
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
{{>fonts}}
|
{{>fonts}}
|
||||||
@@ -447,7 +452,7 @@
|
|||||||
var schemaWrapper = {{{jsonSchema}}};
|
var schemaWrapper = {{{jsonSchema}}};
|
||||||
var schema = findNode('schema',schemaWrapper).schema;
|
var schema = findNode('schema',schemaWrapper).schema;
|
||||||
if (!schema) {
|
if (!schema) {
|
||||||
schema = schemaWrapper.schema;
|
schema = schemaWrapper.schema;
|
||||||
}
|
}
|
||||||
if (schema.$ref != null) {
|
if (schema.$ref != null) {
|
||||||
schema = defsParser.$refs.get(schema.$ref);
|
schema = defsParser.$refs.get(schema.$ref);
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var schemaWrapper = {{{jsonSchema}}};
|
var schemaWrapper = {{{jsonSchema}}};
|
||||||
var schema = findNode('schema', schemaWrapper).schema;
|
|
||||||
|
var schema = findNode('schema',schemaWrapper).schema;
|
||||||
if (!schema) {
|
if (!schema) {
|
||||||
schema = schemaWrapper.schema;
|
schema = schemaWrapper.schema;
|
||||||
}
|
}
|
||||||
if (schema.$ref != null) {
|
if (schema.$ref != null) {
|
||||||
schema = defsParser.$refs.get(schema.$ref);
|
schema = defsParser.$refs.get(schema.$ref);
|
||||||
|
|||||||
@@ -27,9 +27,19 @@
|
|||||||
if(discriminatedClassName == nil ){
|
if(discriminatedClassName == nil ){
|
||||||
return [super initWithDictionary:dict error:err];
|
return [super initWithDictionary:dict error:err];
|
||||||
}
|
}
|
||||||
Class class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:discriminatedClassName]);
|
|
||||||
if(!class) {
|
Class class = nil;
|
||||||
class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:[discriminatedClassName capitalizedString]]);
|
{{#discriminator.mappedModels}}
|
||||||
|
if ([discriminatedClassName isEqualToString:@"{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"]) {
|
||||||
|
class = NSClassFromString(@"{{modelName}}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{{/discriminator.mappedModels}}
|
||||||
|
{
|
||||||
|
class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:discriminatedClassName]);
|
||||||
|
if(!class) {
|
||||||
|
class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:[discriminatedClassName capitalizedString]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if([self class ] == class) {
|
if([self class ] == class) {
|
||||||
return [super initWithDictionary:dict error:err];
|
return [super initWithDictionary:dict error:err];
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class ApiException extends Exception
|
|||||||
/**
|
/**
|
||||||
* The HTTP body of the server response either as Json or string.
|
* The HTTP body of the server response either as Json or string.
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var \stdClass|string|null
|
||||||
*/
|
*/
|
||||||
protected $responseBody;
|
protected $responseBody;
|
||||||
|
|
||||||
@@ -48,17 +48,17 @@ class ApiException extends Exception
|
|||||||
/**
|
/**
|
||||||
* The deserialized response object
|
* The deserialized response object
|
||||||
*
|
*
|
||||||
* @var $responseObject;
|
* @var \stdClass|string|null
|
||||||
*/
|
*/
|
||||||
protected $responseObject;
|
protected $responseObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param string $message Error message
|
* @param string $message Error message
|
||||||
* @param int $code HTTP status code
|
* @param int $code HTTP status code
|
||||||
* @param string[]|null $responseHeaders HTTP response header
|
* @param string[]|null $responseHeaders HTTP response header
|
||||||
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string
|
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
|
||||||
*/
|
*/
|
||||||
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
|
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
|
||||||
{
|
{
|
||||||
@@ -80,7 +80,7 @@ class ApiException extends Exception
|
|||||||
/**
|
/**
|
||||||
* Gets the HTTP body of the server response either as Json or string
|
* Gets the HTTP body of the server response either as Json or string
|
||||||
*
|
*
|
||||||
* @return mixed HTTP body of the server response either as \stdClass or string
|
* @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
|
||||||
*/
|
*/
|
||||||
public function getResponseBody()
|
public function getResponseBody()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ namespace {{invokerPackage}};
|
|||||||
*/
|
*/
|
||||||
class Configuration
|
class Configuration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var Configuration
|
||||||
|
*/
|
||||||
private static $defaultConfiguration;
|
private static $defaultConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,7 +131,7 @@ class Configuration
|
|||||||
*
|
*
|
||||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||||
*
|
*
|
||||||
* @return string API key or token
|
* @return null|string API key or token
|
||||||
*/
|
*/
|
||||||
public function getApiKey($apiKeyIdentifier)
|
public function getApiKey($apiKeyIdentifier)
|
||||||
{
|
{
|
||||||
@@ -154,7 +157,7 @@ class Configuration
|
|||||||
*
|
*
|
||||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||||
*
|
*
|
||||||
* @return string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function getApiKeyPrefix($apiKeyIdentifier)
|
public function getApiKeyPrefix($apiKeyIdentifier)
|
||||||
{
|
{
|
||||||
@@ -400,7 +403,7 @@ class Configuration
|
|||||||
*
|
*
|
||||||
* @param string $apiKeyIdentifier name of apikey
|
* @param string $apiKeyIdentifier name of apikey
|
||||||
*
|
*
|
||||||
* @return string API key with the prefix
|
* @return null|string API key with the prefix
|
||||||
*/
|
*/
|
||||||
public function getApiKeyWithPrefix($apiKeyIdentifier)
|
public function getApiKeyWithPrefix($apiKeyIdentifier)
|
||||||
{
|
{
|
||||||
@@ -423,7 +426,7 @@ class Configuration
|
|||||||
/**
|
/**
|
||||||
* Returns an array of host settings
|
* Returns an array of host settings
|
||||||
*
|
*
|
||||||
* @return an array of host settings
|
* @return array an array of host settings
|
||||||
*/
|
*/
|
||||||
public function getHostSettings()
|
public function getHostSettings()
|
||||||
{
|
{
|
||||||
@@ -461,9 +464,9 @@ class Configuration
|
|||||||
/**
|
/**
|
||||||
* Returns URL based on the index and variables
|
* Returns URL based on the index and variables
|
||||||
*
|
*
|
||||||
* @param index array index of the host settings
|
* @param int $index index of the host settings
|
||||||
* @param variables hash of variable and the corresponding value (optional)
|
* @param array|null $variables hash of variable and the corresponding value (optional)
|
||||||
* @return URL based on host settings
|
* @return string URL based on host settings
|
||||||
*/
|
*/
|
||||||
public function getHostFromSettings($index, $variables = null)
|
public function getHostFromSettings($index, $variables = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class HeaderSelector
|
|||||||
*
|
*
|
||||||
* @param string[] $accept Array of header
|
* @param string[] $accept Array of header
|
||||||
*
|
*
|
||||||
* @return string Accept (e.g. application/json)
|
* @return null|string Accept (e.g. application/json)
|
||||||
*/
|
*/
|
||||||
private function selectAcceptHeader($accept)
|
private function selectAcceptHeader($accept)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,20 +51,26 @@ class ObjectSerializer
|
|||||||
* @param string $type the OpenAPIToolsType of the data
|
* @param string $type the OpenAPIToolsType of the data
|
||||||
* @param string $format the format of the OpenAPITools type of the data
|
* @param string $format the format of the OpenAPITools type of the data
|
||||||
*
|
*
|
||||||
* @return string|object serialized form of $data
|
* @return scalar|object|array|null serialized form of $data
|
||||||
*/
|
*/
|
||||||
public static function sanitizeForSerialization($data, $type = null, $format = null)
|
public static function sanitizeForSerialization($data, $type = null, $format = null)
|
||||||
{
|
{
|
||||||
if (is_scalar($data) || null === $data) {
|
if (is_scalar($data) || null === $data) {
|
||||||
return $data;
|
return $data;
|
||||||
} elseif ($data instanceof \DateTime) {
|
}
|
||||||
|
|
||||||
|
if ($data instanceof \DateTime) {
|
||||||
return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat);
|
return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat);
|
||||||
} elseif (is_array($data)) {
|
}
|
||||||
|
|
||||||
|
if (is_array($data)) {
|
||||||
foreach ($data as $property => $value) {
|
foreach ($data as $property => $value) {
|
||||||
$data[$property] = self::sanitizeForSerialization($value);
|
$data[$property] = self::sanitizeForSerialization($value);
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
} elseif (is_object($data)) {
|
}
|
||||||
|
|
||||||
|
if (is_object($data)) {
|
||||||
$values = [];
|
$values = [];
|
||||||
if ($data instanceof ModelInterface) {
|
if ($data instanceof ModelInterface) {
|
||||||
$formats = $data::openAPIFormats();
|
$formats = $data::openAPIFormats();
|
||||||
@@ -250,7 +256,9 @@ class ObjectSerializer
|
|||||||
{
|
{
|
||||||
if (null === $data) {
|
if (null === $data) {
|
||||||
return null;
|
return null;
|
||||||
} elseif (strcasecmp(substr($class, -2), '[]') === 0) {
|
}
|
||||||
|
|
||||||
|
if (strcasecmp(substr($class, -2), '[]') === 0) {
|
||||||
$data = is_string($data) ? json_decode($data) : $data;
|
$data = is_string($data) ? json_decode($data) : $data;
|
||||||
|
|
||||||
if (!is_array($data)) {
|
if (!is_array($data)) {
|
||||||
@@ -263,7 +271,9 @@ class ObjectSerializer
|
|||||||
$values[] = self::deserialize($value, $subClass, null);
|
$values[] = self::deserialize($value, $subClass, null);
|
||||||
}
|
}
|
||||||
return $values;
|
return $values;
|
||||||
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
|
}
|
||||||
|
|
||||||
|
if (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
|
||||||
$data = is_string($data) ? json_decode($data) : $data;
|
$data = is_string($data) ? json_decode($data) : $data;
|
||||||
settype($data, 'array');
|
settype($data, 'array');
|
||||||
$inner = substr($class, 4, -1);
|
$inner = substr($class, 4, -1);
|
||||||
@@ -276,10 +286,14 @@ class ObjectSerializer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $deserialized;
|
return $deserialized;
|
||||||
} elseif ($class === 'object') {
|
}
|
||||||
|
|
||||||
|
if ($class === 'object') {
|
||||||
settype($data, 'array');
|
settype($data, 'array');
|
||||||
return $data;
|
return $data;
|
||||||
} elseif ($class === '\DateTime') {
|
}
|
||||||
|
|
||||||
|
if ($class === '\DateTime') {
|
||||||
// Some API's return an invalid, empty string as a
|
// Some API's return an invalid, empty string as a
|
||||||
// date-time property. DateTime::__construct() will return
|
// date-time property. DateTime::__construct() will return
|
||||||
// the current time for empty input which is probably not
|
// the current time for empty input which is probably not
|
||||||
@@ -291,10 +305,14 @@ class ObjectSerializer
|
|||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} elseif (in_array($class, [{{&primitives}}], true)) {
|
}
|
||||||
|
|
||||||
|
if (in_array($class, [{{&primitives}}], true)) {
|
||||||
settype($data, $class);
|
settype($data, $class);
|
||||||
return $data;
|
return $data;
|
||||||
} elseif ($class === '\SplFileObject') {
|
}
|
||||||
|
|
||||||
|
if ($class === '\SplFileObject') {
|
||||||
/** @var \Psr\Http\Message\StreamInterface $data */
|
/** @var \Psr\Http\Message\StreamInterface $data */
|
||||||
|
|
||||||
// determine file name
|
// determine file name
|
||||||
|
|||||||
@@ -80,17 +80,17 @@ use {{invokerPackage}}\ObjectSerializer;
|
|||||||
/**
|
/**
|
||||||
* Set the host index
|
* Set the host index
|
||||||
*
|
*
|
||||||
* @param int Host index (required)
|
* @param int $hostIndex Host index (required)
|
||||||
*/
|
*/
|
||||||
public function setHostIndex($host_index)
|
public function setHostIndex($hostIndex)
|
||||||
{
|
{
|
||||||
$this->hostIndex = $host_index;
|
$this->hostIndex = $hostIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the host index
|
* Get the host index
|
||||||
*
|
*
|
||||||
* @return Host index
|
* @return int Host index
|
||||||
*/
|
*/
|
||||||
public function getHostIndex()
|
public function getHostIndex()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* Please update the test case below to test the endpoint.
|
* Please update the test case below to test the endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace {{invokerPackage}};
|
namespace {{invokerPackage}}\Test\Api;
|
||||||
|
|
||||||
use \{{invokerPackage}}\Configuration;
|
use \{{invokerPackage}}\Configuration;
|
||||||
use \{{invokerPackage}}\ApiException;
|
use \{{invokerPackage}}\ApiException;
|
||||||
@@ -71,6 +71,8 @@ use PHPUnit\Framework\TestCase;
|
|||||||
*/
|
*/
|
||||||
public function test{{vendorExtensions.x-test-operation-id}}()
|
public function test{{vendorExtensions.x-test-operation-id}}()
|
||||||
{
|
{
|
||||||
|
// TODO: implement
|
||||||
|
$this->markTestIncomplete('Not implemented');
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,6 @@
|
|||||||
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" }
|
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" }
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{testBasePath}}/" }
|
"psr-4": { "{{escapedInvokerPackage}}\\Test\\" : "{{testBasePath}}/" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
* @package {{invokerPackage}}
|
* @package {{invokerPackage}}
|
||||||
* @author OpenAPI Generator team
|
* @author OpenAPI Generator team
|
||||||
* @link https://openapi-generator.tech
|
* @link https://openapi-generator.tech
|
||||||
|
{{^isEnum}}
|
||||||
|
* @implements \ArrayAccess<TKey, TValue>
|
||||||
|
* @template TKey int|null
|
||||||
|
* @template TValue mixed|null
|
||||||
|
{{/isEnum}}
|
||||||
*/
|
*/
|
||||||
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
|
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
|
||||||
{{/model}}{{/models}}
|
{{/model}}{{/models}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}}
|
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}}
|
||||||
{
|
{
|
||||||
const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
|
public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
@@ -23,6 +23,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
* Array of property to format mappings. Used for (de)serialization
|
* Array of property to format mappings. Used for (de)serialization
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
|
* @phpstan-var array<string, string|null>
|
||||||
|
* @psalm-var array<string, string|null>
|
||||||
*/
|
*/
|
||||||
protected static $openAPIFormats = [
|
protected static $openAPIFormats = [
|
||||||
{{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{#hasMore}},
|
{{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{#hasMore}},
|
||||||
@@ -161,7 +163,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
|
|
||||||
{{/parentSchema}}
|
{{/parentSchema}}
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
$this->container['{{name}}'] = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}};
|
$this->container['{{name}}'] = $data['{{name}}'] ?? {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}};
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
|
|
||||||
@@ -278,7 +280,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
*
|
*
|
||||||
* @param {{dataType}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
|
* @param {{dataType}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function {{setter}}(${{name}})
|
public function {{setter}}(${{name}})
|
||||||
{
|
{
|
||||||
@@ -362,18 +364,18 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
|||||||
*
|
*
|
||||||
* @param integer $offset Offset
|
* @param integer $offset Offset
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed|null
|
||||||
*/
|
*/
|
||||||
public function offsetGet($offset)
|
public function offsetGet($offset)
|
||||||
{
|
{
|
||||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
return isset($this->container[$offset]) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets value based on offset.
|
* Sets value based on offset.
|
||||||
*
|
*
|
||||||
* @param integer $offset Offset
|
* @param int|null $offset Offset
|
||||||
* @param mixed $value Value to be set
|
* @param mixed $value Value to be set
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* Please update the test case below to test the model.
|
* Please update the test case below to test the model.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace {{invokerPackage}};
|
namespace {{invokerPackage}}\Test\Model;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
@@ -68,6 +68,8 @@ class {{classname}}Test extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function test{{classname}}()
|
public function test{{classname}}()
|
||||||
{
|
{
|
||||||
|
// TODO: implement
|
||||||
|
$this->markTestIncomplete('Not implemented');
|
||||||
}
|
}
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
|
|
||||||
@@ -76,6 +78,8 @@ class {{classname}}Test extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testProperty{{nameInCamelCase}}()
|
public function testProperty{{nameInCamelCase}}()
|
||||||
{
|
{
|
||||||
|
// TODO: implement
|
||||||
|
$this->markTestIncomplete('Not implemented');
|
||||||
}
|
}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ To install and run `Pester`, please execute the following commands in the termin
|
|||||||
```powershell
|
```powershell
|
||||||
Install-module -name Pester -force
|
Install-module -name Pester -force
|
||||||
|
|
||||||
Invoker-Pester
|
Invoke-Pester
|
||||||
```
|
```
|
||||||
|
|
||||||
For troubleshooting, please run `$DebugPreference = 'Continue'` to turn on debugging and disable it with `$DebugPreference = 'SilentlyContinue'` when done with the troubleshooting.
|
For troubleshooting, please run `$DebugPreference = 'Continue'` to turn on debugging and disable it with `$DebugPreference = 'SilentlyContinue'` when done with the troubleshooting.
|
||||||
|
|||||||
@@ -43,6 +43,18 @@ $Configuration["ApiKey"]["{{{keyParamName}}}"] = "YOUR_API_KEY"
|
|||||||
# Configure OAuth2 access token for authorization: {{{name}}}
|
# Configure OAuth2 access token for authorization: {{{name}}}
|
||||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||||
{{/isOAuth}}
|
{{/isOAuth}}
|
||||||
|
|
||||||
|
{{#isHttpSignature}}
|
||||||
|
# Configure HttpSignature for authorization :{{name}}
|
||||||
|
$httpSigningParams = @{
|
||||||
|
KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8"
|
||||||
|
KeyFilePath = "C:\SecretKey.txt"
|
||||||
|
HttpSigningHeader = @("(request-target)","Host","Date","Digest")
|
||||||
|
HashAlgorithm = "sha256"
|
||||||
|
}
|
||||||
|
Set-{{{packageName}}}ConfigurationHttpSigning @httpSigningParams
|
||||||
|
|
||||||
|
{{/isHttpSignature}}
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
|
|
||||||
{{/hasAuthMethods}}
|
{{/hasAuthMethods}}
|
||||||
@@ -54,7 +66,7 @@ ${{paramName}} = {{{vendorExtensions.x-powershell-example}}} # {{{dataType}}} |
|
|||||||
# {{{.}}}
|
# {{{.}}}
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
try {
|
try {
|
||||||
{{#returnType}}{{returnType}} $Result = {{/returnType}}{{{vendorExtensions.x-powershell-method-name}}}{{#allParams}} -{{paramName}} ${{paramName}}{{/allParams}}
|
$Result = {{{vendorExtensions.x-powershell-method-name}}}{{#allParams}} -{{paramName}} ${{paramName}}{{/allParams}}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host ("Exception occured when calling {{{vendorExtensions.x-powershell-method-name}}}: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
Write-Host ("Exception occured when calling {{{vendorExtensions.x-powershell-method-name}}}: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||||
@@ -69,7 +81,7 @@ Name | Type | Description | Notes
|
|||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
# cmdlet returns PSCustomObject, the return object contains the properties of below type
|
||||||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}}
|
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}}
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
- Prepare the resource
|
- Prepare the resource
|
||||||
```powershell
|
```powershell
|
||||||
Initialize-{{{packageName}}}{{{classname}}} {{#vars}} -{{name}} {{example}}{{#hasMore}} `
|
${{{classname}}} = Initialize-{{{packageName}}}{{{classname}}} {{#vars}} -{{name}} {{example}}{{#hasMore}} `
|
||||||
{{/hasMore}}
|
{{/hasMore}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ Initialize-{{{packageName}}}{{{classname}}} {{#vars}} -{{name}} {{example}}{{#ha
|
|||||||
|
|
||||||
- Convert the resource to JSON
|
- Convert the resource to JSON
|
||||||
```powershell
|
```powershell
|
||||||
${{className}} | Convert-ToJSON
|
${{{classname}}} | ConvertTo-JSON
|
||||||
```
|
```
|
||||||
|
|
||||||
[[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)
|
||||||
|
|||||||
@@ -93,13 +93,13 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
|
|||||||
|
|
||||||
{{/minLength}}
|
{{/minLength}}
|
||||||
{{#maximum}}
|
{{#maximum}}
|
||||||
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMaximum}}-ge{{/exclusiveMaximum}}{{^exclusiveMaximum}}-gt{{/exclusiveMaximum}} {{{maximum}}}) {
|
if ({{^required}}${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMaximum}}-ge{{/exclusiveMaximum}}{{^exclusiveMaximum}}-gt{{/exclusiveMaximum}} {{{maximum}}}) {
|
||||||
throw "invalid value for '{{{name}}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}."
|
throw "invalid value for '{{{name}}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}."
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/maximum}}
|
{{/maximum}}
|
||||||
{{#minimum}}
|
{{#minimum}}
|
||||||
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMinimum}}-le{{/exclusiveMinimum}}{{^exclusiveMinimum}}-lt{{/exclusiveMinimum}} {{{minimum}}}) {
|
if ({{^required}}${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMinimum}}-le{{/exclusiveMinimum}}{{^exclusiveMinimum}}-lt{{/exclusiveMinimum}} {{{minimum}}}) {
|
||||||
throw "invalid value for '{{{name}}}', must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}."
|
throw "invalid value for '{{{name}}}', must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}."
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,13 +153,13 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
|
|||||||
|
|
||||||
{{/minLength}}
|
{{/minLength}}
|
||||||
{{#maximum}}
|
{{#maximum}}
|
||||||
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMaximum}}-ge{{/exclusiveMaximum}}{{^exclusiveMaximum}}-gt{{/exclusiveMaximum}} {{{maximum}}}) {
|
if ({{^required}}${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMaximum}}-ge{{/exclusiveMaximum}}{{^exclusiveMaximum}}-gt{{/exclusiveMaximum}} {{{maximum}}}) {
|
||||||
throw "invalid value for '{{{name}}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}."
|
throw "invalid value for '{{{name}}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}."
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/maximum}}
|
{{/maximum}}
|
||||||
{{#minimum}}
|
{{#minimum}}
|
||||||
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMinimum}}-le{{/exclusiveMinimum}}{{^exclusiveMinimum}}-lt{{/exclusiveMinimum}} {{{minimum}}}) {
|
if ({{^required}}${{{name}}} -and {{/required}}${{{name}}} {{#exclusiveMinimum}}-le{{/exclusiveMinimum}}{{^exclusiveMinimum}}-lt{{/exclusiveMinimum}} {{{minimum}}}) {
|
||||||
throw "invalid value for '{{{name}}}', must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}."
|
throw "invalid value for '{{{name}}}', must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,3 +23,7 @@ from {{packageName}}.exceptions import ApiException
|
|||||||
# import models into sdk package
|
# import models into sdk package
|
||||||
{{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}
|
{{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}
|
||||||
{{/model}}{{/models}}
|
{{/model}}{{/models}}
|
||||||
|
{{#recursionLimit}}
|
||||||
|
|
||||||
|
__import__('sys').setrecursionlimit({{{.}}})
|
||||||
|
{{/recursionLimit}}
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
{{#apiInfo}}
|
||||||
|
{{#apis}}
|
||||||
|
{{#-first}}
|
||||||
# do not import all apis into this module because that uses a lot of memory and stack frames
|
# do not import all apis into this module because that uses a lot of memory and stack frames
|
||||||
# if you need the ability to import all apis from one package, import them with
|
# if you need the ability to import all apis from one package, import them with
|
||||||
# from {{packageName}.apis import DefaultApi, PetApi
|
# from {{packageName}}.apis import {{classname}}
|
||||||
|
{{/-first}}
|
||||||
|
{{/apis}}
|
||||||
|
{{/apiInfo}}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
{{#apiInfo}}
|
||||||
|
{{#apis}}
|
||||||
|
{{#-first}}
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
# flake8: noqa
|
# flake8: noqa
|
||||||
@@ -7,7 +10,7 @@
|
|||||||
# raise a `RecursionError`.
|
# raise a `RecursionError`.
|
||||||
# In order to avoid this, import only the API that you directly need like:
|
# In order to avoid this, import only the API that you directly need like:
|
||||||
#
|
#
|
||||||
# from {{packagename}}.api.pet_api import PetApi
|
# from {{packagename}}.api.{{classVarName}} import {{classname}}
|
||||||
#
|
#
|
||||||
# or import this package, but before doing it, use:
|
# or import this package, but before doing it, use:
|
||||||
#
|
#
|
||||||
@@ -15,8 +18,7 @@
|
|||||||
# sys.setrecursionlimit(n)
|
# sys.setrecursionlimit(n)
|
||||||
|
|
||||||
# Import APIs into API package:
|
# Import APIs into API package:
|
||||||
{{#apiInfo}}
|
{{/-first}}
|
||||||
{{#apis}}
|
|
||||||
from {{apiPackage}}.{{classVarName}} import {{classname}}
|
from {{apiPackage}}.{{classVarName}} import {{classname}}
|
||||||
{{/apis}}
|
{{/apis}}
|
||||||
{{/apiInfo}}
|
{{/apiInfo}}
|
||||||
|
|||||||
@@ -21,4 +21,8 @@ from {{packageName}}.exceptions import ApiAttributeError
|
|||||||
from {{packageName}}.exceptions import ApiTypeError
|
from {{packageName}}.exceptions import ApiTypeError
|
||||||
from {{packageName}}.exceptions import ApiValueError
|
from {{packageName}}.exceptions import ApiValueError
|
||||||
from {{packageName}}.exceptions import ApiKeyError
|
from {{packageName}}.exceptions import ApiKeyError
|
||||||
from {{packageName}}.exceptions import ApiException
|
from {{packageName}}.exceptions import ApiException
|
||||||
|
{{#recursionLimit}}
|
||||||
|
|
||||||
|
__import__('sys').setrecursionlimit({{{.}}})
|
||||||
|
{{/recursionLimit}}
|
||||||
|
|||||||
@@ -750,11 +750,13 @@ class Endpoint(object):
|
|||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
""" This method is invoked when endpoints are called
|
""" This method is invoked when endpoints are called
|
||||||
Example:
|
Example:
|
||||||
pet_api = PetApi()
|
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
|
||||||
pet_api.add_pet # this is an instance of the class Endpoint
|
api_instance = {{classname}}()
|
||||||
pet_api.add_pet() # this invokes pet_api.add_pet.__call__()
|
api_instance.{{operationId}} # this is an instance of the class Endpoint
|
||||||
|
api_instance.{{operationId}}() # this invokes api_instance.{{operationId}}.__call__()
|
||||||
which then invokes the callable functions stored in that endpoint at
|
which then invokes the callable functions stored in that endpoint at
|
||||||
pet_api.add_pet.callable or self.callable in this class
|
api_instance.{{operationId}}.callable or self.callable in this class
|
||||||
|
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||||
"""
|
"""
|
||||||
return self.callable(self, *args, **kwargs)
|
return self.callable(self, *args, **kwargs)
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ module {{moduleName}}
|
|||||||
auth_names = opts[:debug_auth_names] || [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}]
|
auth_names = opts[:debug_auth_names] || [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}]
|
||||||
|
|
||||||
new_options = opts.merge(
|
new_options = opts.merge(
|
||||||
|
:operation => :"{{classname}}.{{operationId}}",
|
||||||
:header_params => header_params,
|
:header_params => header_params,
|
||||||
:query_params => query_params,
|
:query_params => query_params,
|
||||||
:form_params => form_params,
|
:form_params => form_params,
|
||||||
|
|||||||
@@ -177,10 +177,10 @@ module {{moduleName}}
|
|||||||
filename.gsub(/.*[\/\\]/, '')
|
filename.gsub(/.*[\/\\]/, '')
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_request_url(path)
|
def build_request_url(path, opts = {})
|
||||||
# Add leading and trailing slashes to path
|
# Add leading and trailing slashes to path
|
||||||
path = "/#{path}".gsub(/\/+/, '/')
|
path = "/#{path}".gsub(/\/+/, '/')
|
||||||
@config.base_url + path
|
@config.base_url(opts[:operation]) + path
|
||||||
end
|
end
|
||||||
|
|
||||||
# Update hearder and query params based on authentication settings.
|
# Update hearder and query params based on authentication settings.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
# @option opts [Object] :body HTTP body (JSON/XML)
|
# @option opts [Object] :body HTTP body (JSON/XML)
|
||||||
# @return [Typhoeus::Request] A Typhoeus Request
|
# @return [Typhoeus::Request] A Typhoeus Request
|
||||||
def build_request(http_method, path, request, opts = {})
|
def build_request(http_method, path, request, opts = {})
|
||||||
url = build_request_url(path)
|
url = build_request_url(path, opts)
|
||||||
http_method = http_method.to_sym.downcase
|
http_method = http_method.to_sym.downcase
|
||||||
|
|
||||||
header_params = @default_headers.merge(opts[:header_params] || {})
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
# @option opts [Object] :body HTTP body (JSON/XML)
|
# @option opts [Object] :body HTTP body (JSON/XML)
|
||||||
# @return [Typhoeus::Request] A Typhoeus Request
|
# @return [Typhoeus::Request] A Typhoeus Request
|
||||||
def build_request(http_method, path, opts = {})
|
def build_request(http_method, path, opts = {})
|
||||||
url = build_request_url(path)
|
url = build_request_url(path, opts)
|
||||||
http_method = http_method.to_sym.downcase
|
http_method = http_method.to_sym.downcase
|
||||||
|
|
||||||
header_params = @default_headers.merge(opts[:header_params] || {})
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
||||||
|
|||||||
@@ -13,6 +13,18 @@ module {{moduleName}}
|
|||||||
# Defines url base path
|
# Defines url base path
|
||||||
attr_accessor :base_path
|
attr_accessor :base_path
|
||||||
|
|
||||||
|
# Define server configuration index
|
||||||
|
attr_accessor :server_index
|
||||||
|
|
||||||
|
# Define server operation configuration index
|
||||||
|
attr_accessor :server_operation_index
|
||||||
|
|
||||||
|
# Default server variables
|
||||||
|
attr_accessor :server_variables
|
||||||
|
|
||||||
|
# Default server operation variables
|
||||||
|
attr_accessor :server_operation_variables
|
||||||
|
|
||||||
# Defines API keys used with API Key authentications.
|
# Defines API keys used with API Key authentications.
|
||||||
#
|
#
|
||||||
# @return [Hash] key: parameter name, value: parameter value (API key)
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
||||||
@@ -92,6 +104,10 @@ module {{moduleName}}
|
|||||||
@scheme = '{{scheme}}'
|
@scheme = '{{scheme}}'
|
||||||
@host = '{{host}}{{#port}}:{{{.}}}{{/port}}'
|
@host = '{{host}}{{#port}}:{{{.}}}{{/port}}'
|
||||||
@base_path = '{{contextPath}}'
|
@base_path = '{{contextPath}}'
|
||||||
|
@server_index = 0
|
||||||
|
@server_operation_index = {}
|
||||||
|
@server_variables = {}
|
||||||
|
@server_operation_variables = {}
|
||||||
@api_key = {}
|
@api_key = {}
|
||||||
@api_key_prefix = {}
|
@api_key_prefix = {}
|
||||||
@timeout = 0
|
@timeout = 0
|
||||||
@@ -143,8 +159,12 @@ module {{moduleName}}
|
|||||||
@base_path = '' if @base_path == '/'
|
@base_path = '' if @base_path == '/'
|
||||||
end
|
end
|
||||||
|
|
||||||
def base_url
|
# Returns base URL for specified operation based on server settings
|
||||||
"#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
def base_url(operation = nil)
|
||||||
|
index = server_operation_index.fetch(operation, server_index)
|
||||||
|
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
||||||
|
|
||||||
|
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
||||||
end
|
end
|
||||||
|
|
||||||
# Gets API key (with prefix if set).
|
# Gets API key (with prefix if set).
|
||||||
@@ -244,12 +264,58 @@ module {{moduleName}}
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def operation_server_settings
|
||||||
|
{
|
||||||
|
{{#apiInfo}}
|
||||||
|
{{#apis}}
|
||||||
|
{{#operations}}
|
||||||
|
{{#operation}}
|
||||||
|
{{#servers}}
|
||||||
|
{{#-first}}
|
||||||
|
"{{{classname}}}.{{{nickname}}}": [
|
||||||
|
{{/-first}}
|
||||||
|
{
|
||||||
|
url: "{{{url}}}",
|
||||||
|
description: "{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
|
{{#variables}}
|
||||||
|
{{#-first}}
|
||||||
|
variables: {
|
||||||
|
{{/-first}}
|
||||||
|
{{{name}}}: {
|
||||||
|
description: "{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
|
default_value: "{{{defaultValue}}}",
|
||||||
|
{{#enumValues}}
|
||||||
|
{{#-first}}
|
||||||
|
enum_values: [
|
||||||
|
{{/-first}}
|
||||||
|
"{{{.}}}"{{^-last}},{{/-last}}
|
||||||
|
{{#-last}}
|
||||||
|
]
|
||||||
|
{{/-last}}
|
||||||
|
{{/enumValues}}
|
||||||
|
}{{^-last}},{{/-last}}
|
||||||
|
{{#-last}}
|
||||||
|
}
|
||||||
|
{{/-last}}
|
||||||
|
{{/variables}}
|
||||||
|
}{{^-last}},{{/-last}}
|
||||||
|
{{#-last}}
|
||||||
|
],
|
||||||
|
{{/-last}}
|
||||||
|
{{/servers}}
|
||||||
|
{{/operation}}
|
||||||
|
{{/operations}}
|
||||||
|
{{/apis}}
|
||||||
|
{{/apiInfo}}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
# Returns URL based on server settings
|
# Returns URL based on server settings
|
||||||
#
|
#
|
||||||
# @param index array index of the server settings
|
# @param index array index of the server settings
|
||||||
# @param variables hash of variable and the corresponding value
|
# @param variables hash of variable and the corresponding value
|
||||||
def server_url(index, variables = {})
|
def server_url(index, variables = {}, servers = nil)
|
||||||
servers = server_settings
|
servers = server_settings if servers == nil
|
||||||
|
|
||||||
# check array index out of bound
|
# check array index out of bound
|
||||||
if (index < 0 || index >= servers.size)
|
if (index < 0 || index >= servers.size)
|
||||||
@@ -259,10 +325,12 @@ module {{moduleName}}
|
|||||||
server = servers[index]
|
server = servers[index]
|
||||||
url = server[:url]
|
url = server[:url]
|
||||||
|
|
||||||
|
return url unless server.key? :variables
|
||||||
|
|
||||||
# go through variable and assign a value
|
# go through variable and assign a value
|
||||||
server[:variables].each do |name, variable|
|
server[:variables].each do |name, variable|
|
||||||
if variables.key?(name)
|
if variables.key?(name)
|
||||||
if (server[:variables][name][:enum_values].include? variables[name])
|
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
||||||
url.gsub! "{" + name.to_s + "}", variables[name]
|
url.gsub! "{" + name.to_s + "}", variables[name]
|
||||||
else
|
else
|
||||||
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
||||||
|
|||||||
@@ -146,19 +146,19 @@ extension {{projectName}}API {
|
|||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue) -> AnyPublisher<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> {
|
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue) -> AnyPublisher<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> {
|
||||||
return Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>.init { promisse in
|
return Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>.init { promise in
|
||||||
{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in
|
{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in
|
||||||
switch result {
|
switch result {
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
case let .success(response):
|
case let .success(response):
|
||||||
promisse(.success(response.body!))
|
promise(.success(response.body!))
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
{{^returnType}}
|
{{^returnType}}
|
||||||
case .success:
|
case .success:
|
||||||
promisse(.success(()))
|
promise(.success(()))
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
case let .failure(error):
|
case let .failure(error):
|
||||||
promisse(.failure(error))
|
promise(.failure(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.eraseToAnyPublisher()
|
}.eraseToAnyPublisher()
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
|||||||
const localVarRequestOptions = { method: '{{httpMethod}}', ...baseOptions, ...options};
|
const localVarRequestOptions = { method: '{{httpMethod}}', ...baseOptions, ...options};
|
||||||
const localVarHeaderParameter = {} as any;
|
const localVarHeaderParameter = {} as any;
|
||||||
const localVarQueryParameter = {} as any;{{#vendorExtensions}}{{#hasFormParams}}
|
const localVarQueryParameter = {} as any;{{#vendorExtensions}}{{#hasFormParams}}
|
||||||
const localVarFormParams = new {{^multipartFormData}}URLSearchParams(){{/multipartFormData}}{{#multipartFormData}}(configuration?.formDataCtor || FormData)(){{/multipartFormData}};{{/hasFormParams}}{{/vendorExtensions}}
|
const localVarFormParams = new {{^multipartFormData}}URLSearchParams(){{/multipartFormData}}{{#multipartFormData}}((configuration && configuration.formDataCtor) || FormData)(){{/multipartFormData}};{{/hasFormParams}}{{/vendorExtensions}}
|
||||||
|
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
// authentication {{name}} required
|
// authentication {{name}} required
|
||||||
@@ -189,14 +189,14 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
|||||||
{{/consumes.0}}
|
{{/consumes.0}}
|
||||||
|
|
||||||
{{/bodyParam}}
|
{{/bodyParam}}
|
||||||
const query = new URLSearchParams(localVarUrlObj.search);
|
const queryParameters = new URLSearchParams(localVarUrlObj.search);
|
||||||
for (const key in localVarQueryParameter) {
|
for (const key in localVarQueryParameter) {
|
||||||
query.set(key, localVarQueryParameter[key]);
|
queryParameters.set(key, localVarQueryParameter[key]);
|
||||||
}
|
}
|
||||||
for (const key in options.query) {
|
for (const key in options.query) {
|
||||||
query.set(key, options.query[key]);
|
queryParameters.set(key, options.query[key]);
|
||||||
}
|
}
|
||||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
localVarUrlObj.search = (new URLSearchParams(queryParameters)).toString();
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
{{#hasFormParams}}
|
{{#hasFormParams}}
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
export enum {{classname}} {
|
export enum {{classname}} {
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
|
{{#enumDescription}}
|
||||||
|
/**
|
||||||
|
* {{enumDescription}}
|
||||||
|
*/
|
||||||
|
{{/enumDescription}}
|
||||||
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
|
|||||||
export enum {{enumName}} {
|
export enum {{enumName}} {
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
|
{{#enumDescription}}
|
||||||
|
/**
|
||||||
|
* {{enumDescription}}
|
||||||
|
*/
|
||||||
|
{{/enumDescription}}
|
||||||
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
|
|||||||
@@ -42,27 +42,27 @@ public class AbstractJavaCodegenTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void toEnumVarNameShouldNotShortenUnderScore() throws Exception {
|
public void toEnumVarNameShouldNotShortenUnderScore() throws Exception {
|
||||||
Assert.assertEquals("UNDERSCORE", fakeJavaCodegen.toEnumVarName("_", "String"));
|
Assert.assertEquals(fakeJavaCodegen.toEnumVarName("_", "String"), "UNDERSCORE");
|
||||||
Assert.assertEquals("__", fakeJavaCodegen.toEnumVarName("__", "String"));
|
Assert.assertEquals(fakeJavaCodegen.toEnumVarName("__", "String"), "__");
|
||||||
Assert.assertEquals("__", fakeJavaCodegen.toEnumVarName("_,.", "String"));
|
Assert.assertEquals(fakeJavaCodegen.toEnumVarName("_,.", "String"), "__");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void toVarNameShouldAvoidOverloadingGetClassMethod() throws Exception {
|
public void toVarNameShouldAvoidOverloadingGetClassMethod() throws Exception {
|
||||||
Assert.assertEquals("propertyClass", fakeJavaCodegen.toVarName("class"));
|
Assert.assertEquals(fakeJavaCodegen.toVarName("class"), "propertyClass");
|
||||||
Assert.assertEquals("propertyClass", fakeJavaCodegen.toVarName("_class"));
|
Assert.assertEquals(fakeJavaCodegen.toVarName("_class"), "propertyClass");
|
||||||
Assert.assertEquals("propertyClass", fakeJavaCodegen.toVarName("__class"));
|
Assert.assertEquals(fakeJavaCodegen.toVarName("__class"), "propertyClass");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void toModelNameShouldUseProvidedMapping() throws Exception {
|
public void toModelNameShouldUseProvidedMapping() throws Exception {
|
||||||
fakeJavaCodegen.importMapping().put("json_myclass", "com.test.MyClass");
|
fakeJavaCodegen.importMapping().put("json_myclass", "com.test.MyClass");
|
||||||
Assert.assertEquals("com.test.MyClass", fakeJavaCodegen.toModelName("json_myclass"));
|
Assert.assertEquals(fakeJavaCodegen.toModelName("json_myclass"), "com.test.MyClass");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void toModelNameUsesPascalCase() throws Exception {
|
public void toModelNameUsesPascalCase() throws Exception {
|
||||||
Assert.assertEquals("JsonAnotherclass", fakeJavaCodegen.toModelName("json_anotherclass"));
|
Assert.assertEquals(fakeJavaCodegen.toModelName("json_anotherclass"), "JsonAnotherclass");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -602,6 +602,20 @@ public class AbstractJavaCodegenTest {
|
|||||||
Assert.assertEquals(defaultValue, "new HashMap<String, ComplexModel>()", "Expected string-ref map aliased model to default to new HashMap<String, ComplexModel>()");
|
Assert.assertEquals(defaultValue, "new HashMap<String, ComplexModel>()", "Expected string-ref map aliased model to default to new HashMap<String, ComplexModel>()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void srcMainFolderShouldNotBeOperatingSystemSpecificPaths() {
|
||||||
|
// it's not responsibility of the generator to fix OS-specific paths. This is left to template manager.
|
||||||
|
// This path must be non-OS-specific for expectations in source outputs (e.g. gradle build files)
|
||||||
|
Assert.assertEquals(fakeJavaCodegen.getSourceFolder(), "src/main/java");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void srcTestFolderShouldNotBeOperatingSystemSpecificPaths() {
|
||||||
|
// it's not responsibility of the generator to fix OS-specific paths. This is left to template manager.
|
||||||
|
// This path must be non-OS-specific for expectations in source outputs (e.g. gradle build files)
|
||||||
|
Assert.assertEquals(fakeJavaCodegen.getTestFolder(), "src/test/java");
|
||||||
|
}
|
||||||
|
|
||||||
private static Schema<?> createObjectSchemaWithMinItems() {
|
private static Schema<?> createObjectSchemaWithMinItems() {
|
||||||
return new ObjectSchema()
|
return new ObjectSchema()
|
||||||
.addProperties("id", new IntegerSchema().format("int32"))
|
.addProperties("id", new IntegerSchema().format("int32"))
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class PythonClientOptionsProvider implements OptionsProvider {
|
|||||||
public static final String PACKAGE_VERSION_VALUE = "1.0.0-SNAPSHOT";
|
public static final String PACKAGE_VERSION_VALUE = "1.0.0-SNAPSHOT";
|
||||||
public static final String PACKAGE_URL_VALUE = "";
|
public static final String PACKAGE_URL_VALUE = "";
|
||||||
public static final String USE_NOSE_VALUE = "false";
|
public static final String USE_NOSE_VALUE = "false";
|
||||||
|
public static final String RECURSION_LIMIT = "1200";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getLanguage() {
|
public String getLanguage() {
|
||||||
@@ -47,6 +48,7 @@ public class PythonClientOptionsProvider implements OptionsProvider {
|
|||||||
.put(CodegenConstants.SOURCECODEONLY_GENERATION, "false")
|
.put(CodegenConstants.SOURCECODEONLY_GENERATION, "false")
|
||||||
.put(CodegenConstants.LIBRARY, "urllib3")
|
.put(CodegenConstants.LIBRARY, "urllib3")
|
||||||
.put(PythonClientCodegen.USE_NOSE, USE_NOSE_VALUE)
|
.put(PythonClientCodegen.USE_NOSE, USE_NOSE_VALUE)
|
||||||
|
.put(PythonClientCodegen.RECURSION_LIMIT, RECURSION_LIMIT)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
openapi: 3.0.0
|
||||||
|
info:
|
||||||
|
description: This specification shows how to generate aliases to maps and arrays as models.
|
||||||
|
version: 1.0.0
|
||||||
|
title: OpenAPI Extension generating aliases to maps and arrays as models
|
||||||
|
license:
|
||||||
|
name: Apache-2.0
|
||||||
|
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
|
||||||
|
tags:
|
||||||
|
- name: usage
|
||||||
|
description: Show usage of x-generate-alias-as-model extension
|
||||||
|
servers:
|
||||||
|
- url: 'http://petstore.swagger.io/v2'
|
||||||
|
description: petstore server
|
||||||
|
paths:
|
||||||
|
/map:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- usage
|
||||||
|
summary: Use alias to map
|
||||||
|
description: Use alias to map
|
||||||
|
operationId: map
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
"application/json":
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/MapAlias"
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
/array:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- usage
|
||||||
|
summary: Use alias to array
|
||||||
|
description: Use alias to array
|
||||||
|
operationId: array
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
"application/json":
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/ArrayAlias"
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
ArrayAlias:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
|
||||||
|
MapAlias:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
@@ -183,7 +183,7 @@ public class OAS {
|
|||||||
|
|
||||||
@TestVisible
|
@TestVisible
|
||||||
protected virtual Object toReturnValue(String body, Type returnType, String contentType) {
|
protected virtual Object toReturnValue(String body, Type returnType, String contentType) {
|
||||||
if (contentType == 'application/json') {
|
if (contentType.contains('application/json')) {
|
||||||
Object o = returnType.newInstance();
|
Object o = returnType.newInstance();
|
||||||
if (o instanceof MappedProperties) {
|
if (o instanceof MappedProperties) {
|
||||||
Map<String, String> propertyMappings = ((MappedProperties) o).getPropertyMappings();
|
Map<String, String> propertyMappings = ((MappedProperties) o).getPropertyMappings();
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ typedef struct apiClient_t {
|
|||||||
sslConfig_t *sslConfig;
|
sslConfig_t *sslConfig;
|
||||||
void *dataReceived;
|
void *dataReceived;
|
||||||
long dataReceivedLen;
|
long dataReceivedLen;
|
||||||
|
void (*data_callback_func)(void **, long *);
|
||||||
long response_code;
|
long response_code;
|
||||||
list_t *apiKeys_api_key;
|
list_t *apiKeys_api_key;
|
||||||
char *accessToken;
|
char *accessToken;
|
||||||
|
|||||||
@@ -38,4 +38,5 @@ void listEntry_printAsInt(listEntry_t* listEntry, void *additionalData);
|
|||||||
void listEntry_free(listEntry_t *listEntry, void *additionalData);
|
void listEntry_free(listEntry_t *listEntry, void *additionalData);
|
||||||
|
|
||||||
char* findStrInStrList(list_t* strList, const char* str);
|
char* findStrInStrList(list_t* strList, const char* str);
|
||||||
|
void clear_and_free_string_list(list_t * list);
|
||||||
#endif // INCLUDE_LIST_H
|
#endif // INCLUDE_LIST_H
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ apiClient_t *apiClient_create() {
|
|||||||
apiClient->sslConfig = NULL;
|
apiClient->sslConfig = NULL;
|
||||||
apiClient->dataReceived = NULL;
|
apiClient->dataReceived = NULL;
|
||||||
apiClient->dataReceivedLen = 0;
|
apiClient->dataReceivedLen = 0;
|
||||||
|
apiClient->data_callback_func = NULL;
|
||||||
apiClient->response_code = 0;
|
apiClient->response_code = 0;
|
||||||
apiClient->apiKeys_api_key = NULL;
|
apiClient->apiKeys_api_key = NULL;
|
||||||
apiClient->accessToken = NULL;
|
apiClient->accessToken = NULL;
|
||||||
@@ -40,6 +41,7 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath
|
|||||||
|
|
||||||
apiClient->dataReceived = NULL;
|
apiClient->dataReceived = NULL;
|
||||||
apiClient->dataReceivedLen = 0;
|
apiClient->dataReceivedLen = 0;
|
||||||
|
apiClient->data_callback_func = NULL;
|
||||||
apiClient->response_code = 0;
|
apiClient->response_code = 0;
|
||||||
if(apiKeys_api_key!= NULL) {
|
if(apiKeys_api_key!= NULL) {
|
||||||
apiClient->apiKeys_api_key = list_create();
|
apiClient->apiKeys_api_key = list_create();
|
||||||
@@ -61,6 +63,7 @@ void apiClient_free(apiClient_t *apiClient) {
|
|||||||
if(apiClient->basePath) {
|
if(apiClient->basePath) {
|
||||||
free(apiClient->basePath);
|
free(apiClient->basePath);
|
||||||
}
|
}
|
||||||
|
apiClient->data_callback_func = NULL;
|
||||||
if(apiClient->apiKeys_api_key) {
|
if(apiClient->apiKeys_api_key) {
|
||||||
listEntry_t *listEntry = NULL;
|
listEntry_t *listEntry = NULL;
|
||||||
list_ForEach(listEntry, apiClient->apiKeys_api_key) {
|
list_ForEach(listEntry, apiClient->apiKeys_api_key) {
|
||||||
@@ -464,6 +467,10 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) {
|
|||||||
apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
|
apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
|
||||||
memcpy(apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
|
memcpy(apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
|
||||||
apiClient->dataReceivedLen += size_this_time;
|
apiClient->dataReceivedLen += size_this_time;
|
||||||
|
((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1
|
||||||
|
if (apiClient->data_callback_func) {
|
||||||
|
apiClient->data_callback_func(&apiClient->dataReceived, &apiClient->dataReceivedLen);
|
||||||
|
}
|
||||||
return size_this_time;
|
return size_this_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,3 +183,18 @@ char* findStrInStrList(list_t *strList, const char *str)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear_and_free_string_list(list_t *list)
|
||||||
|
{
|
||||||
|
if (!list) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
listEntry_t *listEntry = NULL;
|
||||||
|
list_ForEach(listEntry, list) {
|
||||||
|
char *list_item = listEntry->data;
|
||||||
|
free(list_item);
|
||||||
|
list_item = NULL;
|
||||||
|
}
|
||||||
|
list_free(list);
|
||||||
|
}
|
||||||
@@ -6,26 +6,41 @@ docs/AdditionalPropertiesClass.md
|
|||||||
docs/Animal.md
|
docs/Animal.md
|
||||||
docs/AnotherFakeApi.md
|
docs/AnotherFakeApi.md
|
||||||
docs/ApiResponse.md
|
docs/ApiResponse.md
|
||||||
|
docs/Apple.md
|
||||||
|
docs/AppleReq.md
|
||||||
docs/ArrayOfArrayOfNumberOnly.md
|
docs/ArrayOfArrayOfNumberOnly.md
|
||||||
docs/ArrayOfNumberOnly.md
|
docs/ArrayOfNumberOnly.md
|
||||||
docs/ArrayTest.md
|
docs/ArrayTest.md
|
||||||
|
docs/Banana.md
|
||||||
|
docs/BananaReq.md
|
||||||
|
docs/BasquePig.md
|
||||||
docs/Capitalization.md
|
docs/Capitalization.md
|
||||||
docs/Cat.md
|
docs/Cat.md
|
||||||
docs/CatAllOf.md
|
docs/CatAllOf.md
|
||||||
docs/Category.md
|
docs/Category.md
|
||||||
|
docs/ChildCat.md
|
||||||
|
docs/ChildCatAllOf.md
|
||||||
docs/ClassModel.md
|
docs/ClassModel.md
|
||||||
|
docs/ComplexQuadrilateral.md
|
||||||
|
docs/DanishPig.md
|
||||||
docs/DefaultApi.md
|
docs/DefaultApi.md
|
||||||
docs/Dog.md
|
docs/Dog.md
|
||||||
docs/DogAllOf.md
|
docs/DogAllOf.md
|
||||||
|
docs/Drawing.md
|
||||||
docs/EnumArrays.md
|
docs/EnumArrays.md
|
||||||
docs/EnumClass.md
|
docs/EnumClass.md
|
||||||
docs/EnumTest.md
|
docs/EnumTest.md
|
||||||
|
docs/EquilateralTriangle.md
|
||||||
docs/FakeApi.md
|
docs/FakeApi.md
|
||||||
docs/FakeClassnameTags123Api.md
|
docs/FakeClassnameTags123Api.md
|
||||||
docs/File.md
|
docs/File.md
|
||||||
docs/FileSchemaTestClass.md
|
docs/FileSchemaTestClass.md
|
||||||
docs/Foo.md
|
docs/Foo.md
|
||||||
docs/FormatTest.md
|
docs/FormatTest.md
|
||||||
|
docs/Fruit.md
|
||||||
|
docs/FruitReq.md
|
||||||
|
docs/GmFruit.md
|
||||||
|
docs/GrandparentAnimal.md
|
||||||
docs/HasOnlyReadOnly.md
|
docs/HasOnlyReadOnly.md
|
||||||
docs/HealthCheckResult.md
|
docs/HealthCheckResult.md
|
||||||
docs/InlineObject.md
|
docs/InlineObject.md
|
||||||
@@ -35,13 +50,16 @@ docs/InlineObject3.md
|
|||||||
docs/InlineObject4.md
|
docs/InlineObject4.md
|
||||||
docs/InlineObject5.md
|
docs/InlineObject5.md
|
||||||
docs/InlineResponseDefault.md
|
docs/InlineResponseDefault.md
|
||||||
|
docs/IsoscelesTriangle.md
|
||||||
docs/List.md
|
docs/List.md
|
||||||
|
docs/Mammal.md
|
||||||
docs/MapTest.md
|
docs/MapTest.md
|
||||||
docs/MixedPropertiesAndAdditionalPropertiesClass.md
|
docs/MixedPropertiesAndAdditionalPropertiesClass.md
|
||||||
docs/Model200Response.md
|
docs/Model200Response.md
|
||||||
docs/ModelClient.md
|
docs/ModelClient.md
|
||||||
docs/Name.md
|
docs/Name.md
|
||||||
docs/NullableClass.md
|
docs/NullableClass.md
|
||||||
|
docs/NullableShape.md
|
||||||
docs/NumberOnly.md
|
docs/NumberOnly.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
docs/OuterComposite.md
|
docs/OuterComposite.md
|
||||||
@@ -49,15 +67,28 @@ docs/OuterEnum.md
|
|||||||
docs/OuterEnumDefaultValue.md
|
docs/OuterEnumDefaultValue.md
|
||||||
docs/OuterEnumInteger.md
|
docs/OuterEnumInteger.md
|
||||||
docs/OuterEnumIntegerDefaultValue.md
|
docs/OuterEnumIntegerDefaultValue.md
|
||||||
|
docs/ParentPet.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
|
docs/Pig.md
|
||||||
|
docs/Quadrilateral.md
|
||||||
|
docs/QuadrilateralInterface.md
|
||||||
docs/ReadOnlyFirst.md
|
docs/ReadOnlyFirst.md
|
||||||
docs/Return.md
|
docs/Return.md
|
||||||
|
docs/ScaleneTriangle.md
|
||||||
|
docs/Shape.md
|
||||||
|
docs/ShapeInterface.md
|
||||||
|
docs/ShapeOrNull.md
|
||||||
|
docs/SimpleQuadrilateral.md
|
||||||
docs/SpecialModelName.md
|
docs/SpecialModelName.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/Triangle.md
|
||||||
|
docs/TriangleInterface.md
|
||||||
docs/User.md
|
docs/User.md
|
||||||
docs/UserApi.md
|
docs/UserApi.md
|
||||||
|
docs/Whale.md
|
||||||
|
docs/Zebra.md
|
||||||
git_push.sh
|
git_push.sh
|
||||||
src/Org.OpenAPITools/Api/AnotherFakeApi.cs
|
src/Org.OpenAPITools/Api/AnotherFakeApi.cs
|
||||||
src/Org.OpenAPITools/Api/DefaultApi.cs
|
src/Org.OpenAPITools/Api/DefaultApi.cs
|
||||||
@@ -86,23 +117,38 @@ src/Org.OpenAPITools/Client/RetryConfiguration.cs
|
|||||||
src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
|
src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
|
||||||
src/Org.OpenAPITools/Model/Animal.cs
|
src/Org.OpenAPITools/Model/Animal.cs
|
||||||
src/Org.OpenAPITools/Model/ApiResponse.cs
|
src/Org.OpenAPITools/Model/ApiResponse.cs
|
||||||
|
src/Org.OpenAPITools/Model/Apple.cs
|
||||||
|
src/Org.OpenAPITools/Model/AppleReq.cs
|
||||||
src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
|
src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
|
||||||
src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
|
src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
|
||||||
src/Org.OpenAPITools/Model/ArrayTest.cs
|
src/Org.OpenAPITools/Model/ArrayTest.cs
|
||||||
|
src/Org.OpenAPITools/Model/Banana.cs
|
||||||
|
src/Org.OpenAPITools/Model/BananaReq.cs
|
||||||
|
src/Org.OpenAPITools/Model/BasquePig.cs
|
||||||
src/Org.OpenAPITools/Model/Capitalization.cs
|
src/Org.OpenAPITools/Model/Capitalization.cs
|
||||||
src/Org.OpenAPITools/Model/Cat.cs
|
src/Org.OpenAPITools/Model/Cat.cs
|
||||||
src/Org.OpenAPITools/Model/CatAllOf.cs
|
src/Org.OpenAPITools/Model/CatAllOf.cs
|
||||||
src/Org.OpenAPITools/Model/Category.cs
|
src/Org.OpenAPITools/Model/Category.cs
|
||||||
|
src/Org.OpenAPITools/Model/ChildCat.cs
|
||||||
|
src/Org.OpenAPITools/Model/ChildCatAllOf.cs
|
||||||
src/Org.OpenAPITools/Model/ClassModel.cs
|
src/Org.OpenAPITools/Model/ClassModel.cs
|
||||||
|
src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs
|
||||||
|
src/Org.OpenAPITools/Model/DanishPig.cs
|
||||||
src/Org.OpenAPITools/Model/Dog.cs
|
src/Org.OpenAPITools/Model/Dog.cs
|
||||||
src/Org.OpenAPITools/Model/DogAllOf.cs
|
src/Org.OpenAPITools/Model/DogAllOf.cs
|
||||||
|
src/Org.OpenAPITools/Model/Drawing.cs
|
||||||
src/Org.OpenAPITools/Model/EnumArrays.cs
|
src/Org.OpenAPITools/Model/EnumArrays.cs
|
||||||
src/Org.OpenAPITools/Model/EnumClass.cs
|
src/Org.OpenAPITools/Model/EnumClass.cs
|
||||||
src/Org.OpenAPITools/Model/EnumTest.cs
|
src/Org.OpenAPITools/Model/EnumTest.cs
|
||||||
|
src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||||
src/Org.OpenAPITools/Model/File.cs
|
src/Org.OpenAPITools/Model/File.cs
|
||||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||||
src/Org.OpenAPITools/Model/Foo.cs
|
src/Org.OpenAPITools/Model/Foo.cs
|
||||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||||
|
src/Org.OpenAPITools/Model/Fruit.cs
|
||||||
|
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||||
|
src/Org.OpenAPITools/Model/GmFruit.cs
|
||||||
|
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||||
src/Org.OpenAPITools/Model/InlineObject.cs
|
src/Org.OpenAPITools/Model/InlineObject.cs
|
||||||
@@ -112,13 +158,16 @@ src/Org.OpenAPITools/Model/InlineObject3.cs
|
|||||||
src/Org.OpenAPITools/Model/InlineObject4.cs
|
src/Org.OpenAPITools/Model/InlineObject4.cs
|
||||||
src/Org.OpenAPITools/Model/InlineObject5.cs
|
src/Org.OpenAPITools/Model/InlineObject5.cs
|
||||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||||
|
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||||
src/Org.OpenAPITools/Model/List.cs
|
src/Org.OpenAPITools/Model/List.cs
|
||||||
|
src/Org.OpenAPITools/Model/Mammal.cs
|
||||||
src/Org.OpenAPITools/Model/MapTest.cs
|
src/Org.OpenAPITools/Model/MapTest.cs
|
||||||
src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
|
src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
|
||||||
src/Org.OpenAPITools/Model/Model200Response.cs
|
src/Org.OpenAPITools/Model/Model200Response.cs
|
||||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||||
src/Org.OpenAPITools/Model/Name.cs
|
src/Org.OpenAPITools/Model/Name.cs
|
||||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||||
|
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||||
src/Org.OpenAPITools/Model/Order.cs
|
src/Org.OpenAPITools/Model/Order.cs
|
||||||
src/Org.OpenAPITools/Model/OuterComposite.cs
|
src/Org.OpenAPITools/Model/OuterComposite.cs
|
||||||
@@ -126,10 +175,23 @@ src/Org.OpenAPITools/Model/OuterEnum.cs
|
|||||||
src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs
|
src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs
|
||||||
src/Org.OpenAPITools/Model/OuterEnumInteger.cs
|
src/Org.OpenAPITools/Model/OuterEnumInteger.cs
|
||||||
src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs
|
src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs
|
||||||
|
src/Org.OpenAPITools/Model/ParentPet.cs
|
||||||
src/Org.OpenAPITools/Model/Pet.cs
|
src/Org.OpenAPITools/Model/Pet.cs
|
||||||
|
src/Org.OpenAPITools/Model/Pig.cs
|
||||||
|
src/Org.OpenAPITools/Model/Quadrilateral.cs
|
||||||
|
src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
|
||||||
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
|
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
|
||||||
src/Org.OpenAPITools/Model/Return.cs
|
src/Org.OpenAPITools/Model/Return.cs
|
||||||
|
src/Org.OpenAPITools/Model/ScaleneTriangle.cs
|
||||||
|
src/Org.OpenAPITools/Model/Shape.cs
|
||||||
|
src/Org.OpenAPITools/Model/ShapeInterface.cs
|
||||||
|
src/Org.OpenAPITools/Model/ShapeOrNull.cs
|
||||||
|
src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs
|
||||||
src/Org.OpenAPITools/Model/SpecialModelName.cs
|
src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||||
src/Org.OpenAPITools/Model/Tag.cs
|
src/Org.OpenAPITools/Model/Tag.cs
|
||||||
|
src/Org.OpenAPITools/Model/Triangle.cs
|
||||||
|
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||||
src/Org.OpenAPITools/Model/User.cs
|
src/Org.OpenAPITools/Model/User.cs
|
||||||
|
src/Org.OpenAPITools/Model/Whale.cs
|
||||||
|
src/Org.OpenAPITools/Model/Zebra.cs
|
||||||
src/Org.OpenAPITools/Org.OpenAPITools.csproj
|
src/Org.OpenAPITools/Org.OpenAPITools.csproj
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ Class | Method | HTTP request | Description
|
|||||||
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
|
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
|
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
|
||||||
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
|
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
|
||||||
*FakeApi* | [**FakeHttpSignatureTest**](docs/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
|
|
||||||
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
|
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
@@ -138,23 +138,38 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
- [Model.Animal](docs/Animal.md)
|
- [Model.Animal](docs/Animal.md)
|
||||||
- [Model.ApiResponse](docs/ApiResponse.md)
|
- [Model.ApiResponse](docs/ApiResponse.md)
|
||||||
|
- [Model.Apple](docs/Apple.md)
|
||||||
|
- [Model.AppleReq](docs/AppleReq.md)
|
||||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Model.Banana](docs/Banana.md)
|
||||||
|
- [Model.BananaReq](docs/BananaReq.md)
|
||||||
|
- [Model.BasquePig](docs/BasquePig.md)
|
||||||
- [Model.Capitalization](docs/Capitalization.md)
|
- [Model.Capitalization](docs/Capitalization.md)
|
||||||
- [Model.Cat](docs/Cat.md)
|
- [Model.Cat](docs/Cat.md)
|
||||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||||
- [Model.Category](docs/Category.md)
|
- [Model.Category](docs/Category.md)
|
||||||
|
- [Model.ChildCat](docs/ChildCat.md)
|
||||||
|
- [Model.ChildCatAllOf](docs/ChildCatAllOf.md)
|
||||||
- [Model.ClassModel](docs/ClassModel.md)
|
- [Model.ClassModel](docs/ClassModel.md)
|
||||||
|
- [Model.ComplexQuadrilateral](docs/ComplexQuadrilateral.md)
|
||||||
|
- [Model.DanishPig](docs/DanishPig.md)
|
||||||
- [Model.Dog](docs/Dog.md)
|
- [Model.Dog](docs/Dog.md)
|
||||||
- [Model.DogAllOf](docs/DogAllOf.md)
|
- [Model.DogAllOf](docs/DogAllOf.md)
|
||||||
|
- [Model.Drawing](docs/Drawing.md)
|
||||||
- [Model.EnumArrays](docs/EnumArrays.md)
|
- [Model.EnumArrays](docs/EnumArrays.md)
|
||||||
- [Model.EnumClass](docs/EnumClass.md)
|
- [Model.EnumClass](docs/EnumClass.md)
|
||||||
- [Model.EnumTest](docs/EnumTest.md)
|
- [Model.EnumTest](docs/EnumTest.md)
|
||||||
|
- [Model.EquilateralTriangle](docs/EquilateralTriangle.md)
|
||||||
- [Model.File](docs/File.md)
|
- [Model.File](docs/File.md)
|
||||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||||
- [Model.Foo](docs/Foo.md)
|
- [Model.Foo](docs/Foo.md)
|
||||||
- [Model.FormatTest](docs/FormatTest.md)
|
- [Model.FormatTest](docs/FormatTest.md)
|
||||||
|
- [Model.Fruit](docs/Fruit.md)
|
||||||
|
- [Model.FruitReq](docs/FruitReq.md)
|
||||||
|
- [Model.GmFruit](docs/GmFruit.md)
|
||||||
|
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||||
- [Model.InlineObject](docs/InlineObject.md)
|
- [Model.InlineObject](docs/InlineObject.md)
|
||||||
@@ -164,13 +179,16 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.InlineObject4](docs/InlineObject4.md)
|
- [Model.InlineObject4](docs/InlineObject4.md)
|
||||||
- [Model.InlineObject5](docs/InlineObject5.md)
|
- [Model.InlineObject5](docs/InlineObject5.md)
|
||||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||||
|
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||||
- [Model.List](docs/List.md)
|
- [Model.List](docs/List.md)
|
||||||
|
- [Model.Mammal](docs/Mammal.md)
|
||||||
- [Model.MapTest](docs/MapTest.md)
|
- [Model.MapTest](docs/MapTest.md)
|
||||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||||
- [Model.Model200Response](docs/Model200Response.md)
|
- [Model.Model200Response](docs/Model200Response.md)
|
||||||
- [Model.ModelClient](docs/ModelClient.md)
|
- [Model.ModelClient](docs/ModelClient.md)
|
||||||
- [Model.Name](docs/Name.md)
|
- [Model.Name](docs/Name.md)
|
||||||
- [Model.NullableClass](docs/NullableClass.md)
|
- [Model.NullableClass](docs/NullableClass.md)
|
||||||
|
- [Model.NullableShape](docs/NullableShape.md)
|
||||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||||
- [Model.Order](docs/Order.md)
|
- [Model.Order](docs/Order.md)
|
||||||
- [Model.OuterComposite](docs/OuterComposite.md)
|
- [Model.OuterComposite](docs/OuterComposite.md)
|
||||||
@@ -178,12 +196,25 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
|
- [Model.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
|
||||||
- [Model.OuterEnumInteger](docs/OuterEnumInteger.md)
|
- [Model.OuterEnumInteger](docs/OuterEnumInteger.md)
|
||||||
- [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
|
- [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
|
||||||
|
- [Model.ParentPet](docs/ParentPet.md)
|
||||||
- [Model.Pet](docs/Pet.md)
|
- [Model.Pet](docs/Pet.md)
|
||||||
|
- [Model.Pig](docs/Pig.md)
|
||||||
|
- [Model.Quadrilateral](docs/Quadrilateral.md)
|
||||||
|
- [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
|
||||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Model.Return](docs/Return.md)
|
- [Model.Return](docs/Return.md)
|
||||||
|
- [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
|
||||||
|
- [Model.Shape](docs/Shape.md)
|
||||||
|
- [Model.ShapeInterface](docs/ShapeInterface.md)
|
||||||
|
- [Model.ShapeOrNull](docs/ShapeOrNull.md)
|
||||||
|
- [Model.SimpleQuadrilateral](docs/SimpleQuadrilateral.md)
|
||||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||||
- [Model.Tag](docs/Tag.md)
|
- [Model.Tag](docs/Tag.md)
|
||||||
|
- [Model.Triangle](docs/Triangle.md)
|
||||||
|
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||||
- [Model.User](docs/User.md)
|
- [Model.User](docs/User.md)
|
||||||
|
- [Model.Whale](docs/Whale.md)
|
||||||
|
- [Model.Zebra](docs/Zebra.md)
|
||||||
|
|
||||||
|
|
||||||
<a name="documentation-for-authorization"></a>
|
<a name="documentation-for-authorization"></a>
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**MapProperty** | **Dictionary<string, string>** | | [optional]
|
**MapProperty** | **Dictionary<string, string>** | | [optional]
|
||||||
**MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
**MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||||
|
**Anytype1** | **Object** | | [optional]
|
||||||
|
**MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional]
|
||||||
|
**MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional]
|
||||||
|
**MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional]
|
||||||
|
**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional]
|
||||||
|
**MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [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)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Org.OpenAPITools.Model.Apple
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Cultivar** | **string** | | [optional]
|
||||||
|
**Origin** | **string** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Org.OpenAPITools.Model.AppleReq
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Cultivar** | **string** | |
|
||||||
|
**Mealy** | **bool** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Org.OpenAPITools.Model.Banana
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**LengthCm** | **decimal** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Org.OpenAPITools.Model.BananaReq
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**LengthCm** | **decimal** | |
|
||||||
|
**Sweet** | **bool** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Org.OpenAPITools.Model.BasquePig
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ClassName** | **string** | |
|
||||||
|
|
||||||
|
[[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 @@
|
|||||||
|
# Org.OpenAPITools.Model.ChildCat
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Name** | **string** | | [optional]
|
||||||
|
**PetType** | **string** | | [default to PetTypeEnum.ChildCat]
|
||||||
|
|
||||||
|
[[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 @@
|
|||||||
|
# Org.OpenAPITools.Model.ChildCatAllOf
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Name** | **string** | | [optional]
|
||||||
|
**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat]
|
||||||
|
|
||||||
|
[[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 @@
|
|||||||
|
# Org.OpenAPITools.Model.ComplexQuadrilateral
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ShapeType** | **string** | |
|
||||||
|
**QuadrilateralType** | **string** | |
|
||||||
|
|
||||||
|
[[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,9 @@
|
|||||||
|
# Org.OpenAPITools.Model.DanishPig
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ClassName** | **string** | |
|
||||||
|
|
||||||
|
[[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,12 @@
|
|||||||
|
# Org.OpenAPITools.Model.Drawing
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MainShape** | [**Shape**](Shape.md) | | [optional]
|
||||||
|
**ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional]
|
||||||
|
**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional]
|
||||||
|
**Shapes** | [**List<Shape>**](Shape.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)
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Org.OpenAPITools.Model.EquilateralTriangle
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ShapeType** | **string** | |
|
||||||
|
**TriangleType** | **string** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -5,11 +5,11 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
|
[**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
|
||||||
[**FakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
|
|
||||||
[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
|
[**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||||
[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||||
[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
@@ -85,78 +85,6 @@ 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)
|
||||||
|
|
||||||
<a name="fakehttpsignaturetest"></a>
|
|
||||||
# **FakeHttpSignatureTest**
|
|
||||||
> void FakeHttpSignatureTest (Pet pet, string query1 = null, string header1 = null)
|
|
||||||
|
|
||||||
test http signature authentication
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```csharp
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using Org.OpenAPITools.Api;
|
|
||||||
using Org.OpenAPITools.Client;
|
|
||||||
using Org.OpenAPITools.Model;
|
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
|
||||||
public class FakeHttpSignatureTestExample
|
|
||||||
{
|
|
||||||
public static void Main()
|
|
||||||
{
|
|
||||||
Configuration config = new Configuration();
|
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
|
||||||
|
|
||||||
var apiInstance = new FakeApi(config);
|
|
||||||
var pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
|
||||||
var query1 = query1_example; // string | query parameter (optional)
|
|
||||||
var header1 = header1_example; // string | header parameter (optional)
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// test http signature authentication
|
|
||||||
apiInstance.FakeHttpSignatureTest(pet, query1, header1);
|
|
||||||
}
|
|
||||||
catch (ApiException e)
|
|
||||||
{
|
|
||||||
Debug.Print("Exception when calling FakeApi.FakeHttpSignatureTest: " + e.Message );
|
|
||||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
|
||||||
Debug.Print(e.StackTrace);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
|
||||||
**query1** | **string**| query parameter | [optional]
|
|
||||||
**header1** | **string**| header parameter | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
void (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[http_signature_test](../README.md#http_signature_test)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
|
||||||
- **Accept**: Not defined
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
| **200** | The instance started successfully | - |
|
|
||||||
|
|
||||||
[[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)
|
|
||||||
|
|
||||||
<a name="fakeouterbooleanserialize"></a>
|
<a name="fakeouterbooleanserialize"></a>
|
||||||
# **FakeOuterBooleanSerialize**
|
# **FakeOuterBooleanSerialize**
|
||||||
> bool FakeOuterBooleanSerialize (bool? body = null)
|
> bool FakeOuterBooleanSerialize (bool? body = null)
|
||||||
@@ -433,6 +361,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)
|
||||||
|
|
||||||
|
<a name="getarrayofenums"></a>
|
||||||
|
# **GetArrayOfEnums**
|
||||||
|
> List<OuterEnum> GetArrayOfEnums ()
|
||||||
|
|
||||||
|
Array of Enums
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```csharp
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class GetArrayOfEnumsExample
|
||||||
|
{
|
||||||
|
public static void Main()
|
||||||
|
{
|
||||||
|
Configuration config = new Configuration();
|
||||||
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
|
var apiInstance = new FakeApi(config);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Array of Enums
|
||||||
|
List<OuterEnum> result = apiInstance.GetArrayOfEnums();
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (ApiException e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling FakeApi.GetArrayOfEnums: " + e.Message );
|
||||||
|
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||||
|
Debug.Print(e.StackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**List<OuterEnum>**](OuterEnum.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)
|
||||||
|
|
||||||
<a name="testbodywithfileschema"></a>
|
<a name="testbodywithfileschema"></a>
|
||||||
# **TestBodyWithFileSchema**
|
# **TestBodyWithFileSchema**
|
||||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||||
@@ -679,7 +671,7 @@ namespace Example
|
|||||||
var _string = _string_example; // string | None (optional)
|
var _string = _string_example; // string | None (optional)
|
||||||
var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional)
|
var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional)
|
||||||
var date = 2013-10-20; // DateTime? | None (optional)
|
var date = 2013-10-20; // DateTime? | None (optional)
|
||||||
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
|
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00")
|
||||||
var password = password_example; // string | None (optional)
|
var password = password_example; // string | None (optional)
|
||||||
var callback = callback_example; // string | None (optional)
|
var callback = callback_example; // string | None (optional)
|
||||||
|
|
||||||
@@ -714,7 +706,7 @@ Name | Type | Description | Notes
|
|||||||
**_string** | **string**| None | [optional]
|
**_string** | **string**| None | [optional]
|
||||||
**binary** | **System.IO.Stream****System.IO.Stream**| None | [optional]
|
**binary** | **System.IO.Stream****System.IO.Stream**| None | [optional]
|
||||||
**date** | **DateTime?**| None | [optional]
|
**date** | **DateTime?**| None | [optional]
|
||||||
**dateTime** | **DateTime?**| None | [optional]
|
**dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"]
|
||||||
**password** | **string**| None | [optional]
|
**password** | **string**| None | [optional]
|
||||||
**callback** | **string**| None | [optional]
|
**callback** | **string**| None | [optional]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Org.OpenAPITools.Model.Fruit
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Color** | **string** | | [optional]
|
||||||
|
**Cultivar** | **string** | | [optional]
|
||||||
|
**Origin** | **string** | | [optional]
|
||||||
|
**LengthCm** | **decimal** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Org.OpenAPITools.Model.FruitReq
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Cultivar** | **string** | |
|
||||||
|
**Mealy** | **bool** | | [optional]
|
||||||
|
**LengthCm** | **decimal** | |
|
||||||
|
**Sweet** | **bool** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Org.OpenAPITools.Model.GmFruit
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Color** | **string** | | [optional]
|
||||||
|
**Cultivar** | **string** | | [optional]
|
||||||
|
**Origin** | **string** | | [optional]
|
||||||
|
**LengthCm** | **decimal** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Org.OpenAPITools.Model.GrandparentAnimal
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**PetType** | **string** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
|
|||||||
**Byte** | **byte[]** | None |
|
**Byte** | **byte[]** | None |
|
||||||
**Binary** | **System.IO.Stream** | None | [optional]
|
**Binary** | **System.IO.Stream** | None | [optional]
|
||||||
**Date** | **DateTime** | None | [optional]
|
**Date** | **DateTime** | None | [optional]
|
||||||
**DateTime** | **DateTime** | None | [optional]
|
**DateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"]
|
||||||
**Password** | **string** | None | [optional]
|
**Password** | **string** | None | [optional]
|
||||||
**Callback** | **string** | None | [optional]
|
**Callback** | **string** | None | [optional]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Org.OpenAPITools.Model.IsoscelesTriangle
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ShapeType** | **string** | |
|
||||||
|
**TriangleType** | **string** | |
|
||||||
|
|
||||||
|
[[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,12 @@
|
|||||||
|
# Org.OpenAPITools.Model.Mammal
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**HasBaleen** | **bool** | | [optional]
|
||||||
|
**HasTeeth** | **bool** | | [optional]
|
||||||
|
**ClassName** | **string** | |
|
||||||
|
**Type** | **string** | | [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)
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Org.OpenAPITools.Model.NullableShape
|
||||||
|
The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1.
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ShapeType** | **string** | |
|
||||||
|
**QuadrilateralType** | **string** | |
|
||||||
|
|
||||||
|
[[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,9 @@
|
|||||||
|
# Org.OpenAPITools.Model.ParentPet
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**PetType** | **string** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ void (empty response body)
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ void (empty response body)
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user