Compare commits

..

18 Commits

Author SHA1 Message Date
William Cheng
f7d3bc826d update ts template 2025-11-08 23:40:32 +08:00
William Cheng
2c9a3a0e6c update templates 2025-11-08 23:25:30 +08:00
William Cheng
8e17d728df remove deprecated methods in codegen property 2025-11-08 23:17:21 +08:00
William Cheng
c596bb7d8a add check for optionl to show null in doc (php) (#22307) 2025-11-08 23:12:27 +08:00
Enric Pou
ce338a4a23 Added UUID support in python docs (#22301) 2025-11-08 22:29:12 +08:00
Achton Smidt Winther
fb444bf15e [php] Fix PHP generator validation for nullable required properties (#22292)
* [php] Fix null+required properties to accept null values in generated models. Also fix PHP annotations related to same.

* [php] Update samples.
2025-11-08 22:28:37 +08:00
macmanad
a144678459 [csharp][generichost] Fix format string parameter (#22282) (#22283)
* [csharp][generichost] Fix format string parameter (#22282)

* Update samples
2025-11-08 21:54:42 +08:00
William Cheng
95b9438fd9 add tests for api key name in ccp rest sdk (#22306) 2025-11-08 21:38:06 +08:00
Devon
7beb8a6102 [cpp-rest] Fixing Incorrect Header Name Used (#22298) 2025-11-08 21:19:07 +08:00
Devon
2107686d3d [Rust Reqwest] Fixes Enums in Query Parameters via Causing Compilation Failure (#22281)
* [Rust Reqwest] Fixes Enums in Query Parameters via  Causing Compilation Failure

* regen
2025-11-08 20:56:07 +08:00
Mattias Sehlstedt
7486f12e62 Correct unsafe pistache documentation link (#22296)
* Replace outdated/incorrect documentation link with correct https version

* Generate samples
2025-11-08 15:04:52 +08:00
Enric Pou
600c051fa5 Dart Dio: fix typo in markdown files (#22293) 2025-11-08 15:04:06 +08:00
Enric Pou
f37b8cce58 Add UUID examples and documentation (#22303) 2025-11-08 14:56:46 +08:00
William Cheng
64c8711356 [python] Fix pyproject (poetry 2.x) for httpx (#22289)
* fix poetry 2 httpx dependencies

* use poetry 2 for tests
2025-11-06 14:09:54 +08:00
Michael Munch
65359d8050 [Java] Use new location for hibernate validator (#22287)
* Use new location for hibernate validator
org.hibernate:hibernate-validator -> org.hibernate.validator:hibernate-validator

* Update samples

* Update samples

---------

Co-authored-by: Michael Munch <mmu@bankdata.dk>
2025-11-06 01:42:18 +08:00
Linh Tran Tuan
7ce0096e73 [Rust-Axum] Fix Regex (#22277) 2025-11-04 13:35:51 +08:00
Aman Rao
0ae50f5a10 Fixes #22146. Fixed the code to call the correct method to prevent duplication of Prefix added to the model when using --model-name-prefix (#22188)
* Fixes #22146

* Added handling for when super.getSchemaType method
returns null
2025-11-03 15:26:22 +08:00
William Cheng
3347204425 [java][microprofile] Using incorrect @Multipart instead of @FormParam (#22266)
* fix: #10618 Using incorrect @Multipart instead of @FormParam in microprofile java client

[BUG][JAVA] Using incorrect @Multipart instead of @FormParam when generated Microprofile java client #10618
https://github.com/OpenAPITools/openapi-generator/issues/10618

* fix: #10618 put updated samples under sourcecontrol

* fix: #10618 delete configoption disableMultipart for microprofile

* fix: #10618 put updated samples after cleanup of "disableMultipart"

* fix: #10618 make samples compile and switch jandex-maven-plugin

* fix: #10618 sync my fork with upstream & clean pom

* fix: #10618 regenerate samples

* fix: #10618 microprofile-rest-client-with-useSingleRequestParameter

* update

* update

---------

Co-authored-by: Riedlinger, Jochen (IT 480) <jochen.riedlinger@l-bank.de>
Co-authored-by: Jochen Riedlinger <j_ri@gmx.de>
Co-authored-by: Jochen Riedlinger <14962274+jochenr@users.noreply.github.com>
2025-11-02 16:56:10 +08:00
303 changed files with 2137 additions and 1077 deletions

View File

@@ -1182,6 +1182,7 @@ Here is a list of template creators:
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Scala Lagom: @gmkumar2005
* Scala Play: @adigerber
* TypeScript NestJS: @aryobenholzner
* Documentation
* AsciiDoc: @man-at-home
* HTML Doc 2: @jhitchcock

View File

@@ -6,7 +6,7 @@ library: httpx
additionalProperties:
packageName: petstore_api
mapNumberTo: float
poetry1: true
poetry1: false
nameMappings:
_type: underscore_type
type_: type_with_underscore

View File

@@ -0,0 +1,8 @@
generatorName: rust
outputDir: samples/client/others/rust/reqwest/enum-query-params
library: reqwest
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/enum-query-params.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: true
packageName: enum-query-params-reqwest

View File

@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -150,7 +151,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -53,6 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytearray</li>
<li>bytes</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -307,29 +307,11 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
return complexType;
}
/**
* @return dataType
* @deprecated since version 3.0.0, use {@link #getDataType()} instead.<br>
* May be removed with the next major release (4.0)
*/
@Deprecated
public String getDatatype() {
return getDataType();
}
@Override
public String getDataType() {
return dataType;
}
/**
* @deprecated use {@link #setDataType(String)} instead.
*/
@Deprecated
public void setDatatype(String datatype) {
this.dataType = datatype;
}
@Override
public void setDataType(String dataType) {
this.dataType = dataType;

View File

@@ -25,6 +25,7 @@ import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.features.SecurityFeature;
import org.openapitools.codegen.meta.features.DataTypeFeature;
import org.openapitools.codegen.model.ModelMap;
import org.openapitools.codegen.model.ModelsMap;
import org.openapitools.codegen.model.OperationMap;
@@ -71,7 +72,9 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
SecurityFeature.BearerToken,
SecurityFeature.ApiKey,
SecurityFeature.OAuth2_Implicit
)));
)).includeDataTypeFeatures(
DataTypeFeature.Uuid
));
// from https://docs.python.org/3/reference/lexical_analysis.html#keywords
setReservedWordsLowerCase(
@@ -108,6 +111,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
// TODO file and binary is mapped as `file`
languageSpecificPrimitives.add("file");
languageSpecificPrimitives.add("bytes");
languageSpecificPrimitives.add("UUID");
typeMapping.clear();
typeMapping.put("integer", "int");
@@ -129,8 +133,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
// mapped to String as a workaround
typeMapping.put("binary", "str");
typeMapping.put("ByteArray", "str");
// map uuid to string for the time being
typeMapping.put("UUID", "str");
typeMapping.put("UUID", "UUID");
typeMapping.put("URI", "str");
typeMapping.put("null", "none_type");
@@ -571,7 +574,12 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
type = p.dataType;
}
if ("String".equalsIgnoreCase(type) || "str".equalsIgnoreCase(type)) {
if (Boolean.TRUE.equals(p.isUuid)) {
if (example == null) {
example = "38400000-8cf0-11bd-b23e-10b96e4ef00d";
}
example = "UUID('" + escapeTextInSingleQuotes(example) + "')";
} else if ("String".equalsIgnoreCase(type) || "str".equalsIgnoreCase(type)) {
if (example == null) {
example = p.paramName + "_example";
}
@@ -671,7 +679,13 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
return getSchemaType(p) + "[str, " + getCollectionItemTypeDeclaration(inner) + "]";
}
String openAPIType = getSchemaType(p);
String openAPIType = super.getSchemaType(p);
if (openAPIType == null) {
LOGGER.error("OpenAPI Type for {} is null. Default to UNKNOWN_OPENAPI_TYPE instead.", p.getName());
openAPIType = "UNKNOWN_OPENAPI_TYPE";
}
if (typeMapping.containsKey(openAPIType)) {
return typeMapping.get(openAPIType);
}

View File

@@ -128,13 +128,13 @@ static {{classname}}_t *{{classname}}_create_internal(
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{^isEnum}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{/isModel}}
{{^isModel}}
{{^isFreeFormObject}}
{{^isEnum}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{#isEnum}}
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
@@ -142,21 +142,21 @@ static {{classname}}_t *{{classname}}_create_internal(
{{/isFreeFormObject}}
{{/isModel}}
{{#isUuid}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isUuid}}
{{#isEmail}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isEmail}}
{{#isFreeFormObject}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isFreeFormObject}}
{{/isPrimitiveType}}
{{#isPrimitiveType}}
{{#isNumeric}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isNumeric}}
{{#isBoolean}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isBoolean}}
{{#isEnum}}
{{#isString}}
@@ -165,34 +165,34 @@ static {{classname}}_t *{{classname}}_create_internal(
{{/isEnum}}
{{^isEnum}}
{{#isString}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isString}}
{{/isEnum}}
{{#isByteArray}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isByteArray}}
{{#isBinary}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isBinary}}
{{#isDate}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isDate}}
{{#isDateTime}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isDateTime}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isContainer}}
{{#isArray}}
{{#isPrimitiveType}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}}
{{/isArray}}
{{#isMap}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isMap}}
{{/isContainer}}
{{/vars}}
@@ -218,13 +218,13 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{^isEnum}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{/isModel}}
{{^isModel}}
{{^isFreeFormObject}}
{{^isEnum}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{#isEnum}}
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
@@ -232,21 +232,21 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{/isFreeFormObject}}
{{/isModel}}
{{#isUuid}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isUuid}}
{{#isEmail}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isEmail}}
{{#isFreeFormObject}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isFreeFormObject}}
{{/isPrimitiveType}}
{{#isPrimitiveType}}
{{#isNumeric}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isNumeric}}
{{#isBoolean}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isBoolean}}
{{#isEnum}}
{{#isString}}
@@ -255,34 +255,34 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{/isEnum}}
{{^isEnum}}
{{#isString}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isString}}
{{/isEnum}}
{{#isByteArray}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isByteArray}}
{{#isBinary}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isBinary}}
{{#isDate}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isDate}}
{{#isDateTime}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isDateTime}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isContainer}}
{{#isArray}}
{{#isPrimitiveType}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}}
{{/isArray}}
{{#isMap}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isMap}}
{{/isContainer}}
{{/vars}}

View File

@@ -85,13 +85,13 @@ typedef struct {{classname}}_t {
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}; //enum model
{{/isEnum}}
{{^isEnum}}
struct {{datatype}}_t *{{name}}; //model
struct {{dataType}}_t *{{name}}; //model
{{/isEnum}}
{{/isModel}}
{{^isModel}}
{{^isFreeFormObject}}
{{^isEnum}}
{{datatype}}_t *{{name}}; // custom
{{dataType}}_t *{{name}}; // custom
{{/isEnum}}
{{#isEnum}}
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}; //referenced enum
@@ -99,21 +99,21 @@ typedef struct {{classname}}_t {
{{/isFreeFormObject}}
{{/isModel}}
{{#isUuid}}
{{datatype}} *{{name}}; // uuid
{{dataType}} *{{name}}; // uuid
{{/isUuid}}
{{#isEmail}}
{{datatype}} *{{name}}; // email
{{dataType}} *{{name}}; // email
{{/isEmail}}
{{#isFreeFormObject}}
{{datatype}}_t *{{name}}; //object
{{dataType}}_t *{{name}}; //object
{{/isFreeFormObject}}
{{/isPrimitiveType}}
{{#isPrimitiveType}}
{{#isNumeric}}
{{datatype}} {{name}}; //numeric
{{dataType}} {{name}}; //numeric
{{/isNumeric}}
{{#isBoolean}}
{{datatype}} {{name}}; //boolean
{{dataType}} {{name}}; //boolean
{{/isBoolean}}
{{#isEnum}}
{{#isString}}
@@ -122,34 +122,34 @@ typedef struct {{classname}}_t {
{{/isEnum}}
{{^isEnum}}
{{#isString}}
{{datatype}} *{{name}}; // string
{{dataType}} *{{name}}; // string
{{/isString}}
{{/isEnum}}
{{#isByteArray}}
{{datatype}} *{{name}}; //ByteArray
{{dataType}} *{{name}}; //ByteArray
{{/isByteArray}}
{{#isBinary}}
{{datatype}} {{name}}; //binary
{{dataType}} {{name}}; //binary
{{/isBinary}}
{{#isDate}}
{{datatype}} *{{name}}; //date
{{dataType}} *{{name}}; //date
{{/isDate}}
{{#isDateTime}}
{{datatype}} *{{name}}; //date time
{{dataType}} *{{name}}; //date time
{{/isDateTime}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isContainer}}
{{#isArray}}
{{#isPrimitiveType}}
{{datatype}}_t *{{name}}; //primitive container
{{dataType}}_t *{{name}}; //primitive container
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{datatype}}_t *{{name}}; //nonprimitive container
{{dataType}}_t *{{name}}; //nonprimitive container
{{/isPrimitiveType}}
{{/isArray}}
{{#isMap}}
{{datatype}} {{name}}; //map
{{dataType}} {{name}}; //map
{{/isMap}}
{{/isContainer}}
{{/vars}}
@@ -166,13 +166,13 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{^isEnum}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{/isModel}}
{{^isModel}}
{{^isFreeFormObject}}
{{^isEnum}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}}
{{#isEnum}}
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
@@ -180,21 +180,21 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{/isFreeFormObject}}
{{/isModel}}
{{#isUuid}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isUuid}}
{{#isEmail}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isEmail}}
{{#isFreeFormObject}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isFreeFormObject}}
{{/isPrimitiveType}}
{{#isPrimitiveType}}
{{#isNumeric}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isNumeric}}
{{#isBoolean}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isBoolean}}
{{#isEnum}}
{{#isString}}
@@ -203,34 +203,34 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{/isEnum}}
{{^isEnum}}
{{#isString}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isString}}
{{/isEnum}}
{{#isByteArray}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isByteArray}}
{{#isBinary}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isBinary}}
{{#isDate}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isDate}}
{{#isDateTime}}
{{datatype}} *{{name}}{{^-last}},{{/-last}}
{{dataType}} *{{name}}{{^-last}},{{/-last}}
{{/isDateTime}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isContainer}}
{{#isArray}}
{{#isPrimitiveType}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}}
{{/isArray}}
{{#isMap}}
{{datatype}} {{name}}{{^-last}},{{/-last}}
{{dataType}} {{name}}{{^-last}},{{/-last}}
{{/isMap}}
{{/isContainer}}
{{/vars}}

View File

@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}
**{{name}}** | {{^isContainer}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isEnum}}{{^isEnum}}[**{{datatype}}_t**]({{complexType}}.md) \*{{/isEnum}}{{/isModel}}{{^isModel}}{{^isFreeFormObject}}**{{datatype}}_t \***{{/isFreeFormObject}}{{/isModel}}{{#isUuid}}**{{datatype}} \***{{/isUuid}}{{#isEmail}}**{{datatype}} \***{{/isEmail}}{{#isFreeFormObject}}[**{{datatype}}_t**]({{complexType}}.md) \*{{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isNumeric}}**{{datatype}}**{{/isNumeric}}{{#isBoolean}}**{{datatype}}**{{/isBoolean}}{{#isEnum}}{{#isString}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}**{{datatype}} \***{{/isString}}{{/isEnum}}{{#isByteArray}}**{{datatype}} \***{{/isByteArray}}{{#isBinary}}**{{datatype}}**{{/isBinary}}{{#isDate}}**{{datatype}} \***{{/isDate}}{{#isDateTime}}**{{datatype}} \***{{/isDateTime}}{{/isPrimitiveType}}{{/isContainer}}{{#isContainer}}{{#isArray}}{{#isPrimitiveType}}**{{datatype}}_t \***{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}_t**]({{complexType}}.md) \*{{/isPrimitiveType}}{{/isArray}}{{#isMap}}**{{datatype}}**{{/isMap}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
**{{name}}** | {{^isContainer}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isEnum}}{{^isEnum}}[**{{dataType}}_t**]({{complexType}}.md) \*{{/isEnum}}{{/isModel}}{{^isModel}}{{^isFreeFormObject}}**{{dataType}}_t \***{{/isFreeFormObject}}{{/isModel}}{{#isUuid}}**{{dataType}} \***{{/isUuid}}{{#isEmail}}**{{dataType}} \***{{/isEmail}}{{#isFreeFormObject}}[**{{dataType}}_t**]({{complexType}}.md) \*{{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isNumeric}}**{{dataType}}**{{/isNumeric}}{{#isBoolean}}**{{dataType}}**{{/isBoolean}}{{#isEnum}}{{#isString}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}**{{dataType}} \***{{/isString}}{{/isEnum}}{{#isByteArray}}**{{dataType}} \***{{/isByteArray}}{{#isBinary}}**{{dataType}}**{{/isBinary}}{{#isDate}}**{{dataType}} \***{{/isDate}}{{#isDateTime}}**{{dataType}} \***{{/isDateTime}}{{/isPrimitiveType}}{{/isContainer}}{{#isContainer}}{{#isArray}}{{#isPrimitiveType}}**{{dataType}}_t \***{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}_t**]({{complexType}}.md) \*{{/isPrimitiveType}}{{/isArray}}{{#isMap}}**{{dataType}}**{{/isMap}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -172,7 +172,7 @@
</dependency>
{{#useBeanValidationFeature}}
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate.validator.version}</version>
</dependency>
@@ -238,7 +238,7 @@
<cxf.rt.rs.extension.providers.version>3.5.1</cxf.rt.rs.extension.providers.version>
<jaxb.core.version>3.0.2</jaxb.core.version>
<jaxb.impl.version>3.0.2</jaxb.impl.version>
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
<hibernate.validator.version>8.0.3.Final</hibernate.validator.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>

View File

@@ -343,9 +343,9 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.3.Final</version>
<version>8.0.3.Final</version>
</dependency>
<dependency>
<groupId>jakarta.el</groupId>

View File

@@ -324,9 +324,9 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.2.0.Final</version>
<version>8.0.3.Final</version>
</dependency>
{{/performBeanValidation}}
<!-- test dependencies -->

View File

@@ -318,7 +318,7 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator-version}</version>
</dependency>
@@ -358,7 +358,7 @@
{{/joda}}
<beanvalidation-version>3.0.2</beanvalidation-version>
{{#performBeanValidation}}
<hibernate-validator-version>5.4.3.Final</hibernate-validator-version>
<hibernate-validator-version>8.0.3.Final</hibernate-validator-version>
{{/performBeanValidation}}
<junit-version>5.10.2</junit-version>
</properties>

View File

@@ -333,7 +333,7 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator-version}</version>
</dependency>
@@ -380,7 +380,7 @@
<jodatime-version>2.9.9</jodatime-version>
{{/joda}}
{{#performBeanValidation}}
<hibernate-validator-version>5.4.3.Final</hibernate-validator-version>
<hibernate-validator-version>8.0.3.Final</hibernate-validator-version>
{{/performBeanValidation}}
<junit-version>5.10.2</junit-version>
</properties>

View File

@@ -18,9 +18,9 @@ export type {{classname}} = {
{{#vars}}
/**
* {{{description}}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
* @memberof {{classname}}
*/
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}};
{{/vars}}
}{{#parent}} & {{.}}{{/parent}}

View File

@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}}
{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}}
{{/vars}}
{{#vars}}{{#isEnum}}

View File

@@ -39,7 +39,7 @@ cd build
```
## Libraries required
- [pistache](http://pistache.io/quickstart)
- [pistache](https://pistacheio.github.io/pistache/docs/)
- [JSON for Modern C++](https://github.com/nlohmann/json/#integration): Please download the `json.hpp` file and
put it under the model/nlohmann folder

View File

@@ -239,7 +239,7 @@ pplx::task<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{classname}}::{{
{{#isApiKey}}
{{#isKeyInHeader}}
{
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("{{keyParamName}}"));
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("{{name}}"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("{{keyParamName}}")] = localVarApiKey;
@@ -248,7 +248,7 @@ pplx::task<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{classname}}::{{
{{/isKeyInHeader}}
{{#isKeyInQuery}}
{
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("{{keyParamName}}"));
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("{{name}}"));
if ( localVarApiKey.size() > 0 )
{
localVarQueryParams[utility::conversions::to_string_t("{{keyParamName}}")] = localVarApiKey;

View File

@@ -62,7 +62,7 @@ public:
{{/isEnum}}
{{^isEnum}}
{{#description}}/* {{{.}}} */
{{/description}}{{^required}}TOptional<{{/required}}{{{datatype}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}};
{{/description}}{{^required}}TOptional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}};
{{/isEnum}}
{{/vars}}
};

View File

@@ -1,2 +1,2 @@
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);

View File

@@ -74,7 +74,7 @@ try {
{{#returnType}}
print(response);
{{/returnType}}
} catch on DioException (e) {
} on DioException catch (e) {
print("Exception when calling {{classname}}->{{operationId}}: $e\n");
}
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}

View File

@@ -55,7 +55,7 @@ try {
{{#returnType}}
print(response);
{{/returnType}}
} catch on DioException (e) {
} on DioException catch (e) {
print('Exception when calling {{classname}}->{{operationId}}: $e\n');
}
```

View File

@@ -11,7 +11,7 @@
]
@type t :: %__MODULE__{
{{#vars}}{{#atom}}{{&baseName}}{{/atom}} => {{{datatype}}}{{#isNullable}} | nil{{/isNullable}}{{^isNullable}}{{^required}} | nil{{/required}}{{/isNullable}}{{^-last}},
{{#vars}}{{#atom}}{{&baseName}}{{/atom}} => {{{dataType}}}{{#isNullable}} | nil{{/isNullable}}{{^isNullable}}{{^required}} | nil{{/required}}{{/isNullable}}{{^-last}},
{{/-last}}{{/vars}}
}

View File

@@ -15,7 +15,7 @@ module {{classname}} =
{{#vars}}
{{#isEnum}}
//#region enums
type {{datatypeWithEnum}} = {{#allowableValues}}{{#enumVars}}{{name}} of {{datatype}} {{^-last}} | {{/-last}} {{/enumVars}}{{/allowableValues}}
type {{datatypeWithEnum}} = {{#allowableValues}}{{#enumVars}}{{name}} of {{dataType}} {{^-last}} | {{/-last}} {{/enumVars}}{{/allowableValues}}
//#endregion
{{/isEnum}}
{{/vars}}

View File

@@ -8,12 +8,12 @@
)
{{#allVars}}
- {{{name}}}::{{datatype}}{{#description}} : {{description}}{{/description}}
- {{{name}}}::{{dataType}}{{#description}} : {{description}}{{/description}}
{{/allVars}}
"""
Base.@kwdef mutable struct {{classname}} <: OpenAPI.APIModel
{{#allVars}}
{{{name}}}{{#isPrimitiveType}}::Union{Nothing, {{{datatype}}}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isContainer}}::Union{Nothing, {{#isMap}}Dict{{/isMap}}{{^isMap}}Vector{{/isMap}}}{{/isContainer}}{{/isPrimitiveType}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}nothing{{/defaultValue}}{{^isPrimitiveType}} # spec type: Union{ Nothing, {{datatype}} }{{/isPrimitiveType}}
{{{name}}}{{#isPrimitiveType}}::Union{Nothing, {{{dataType}}}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isContainer}}::Union{Nothing, {{#isMap}}Dict{{/isMap}}{{^isMap}}Vector{{/isMap}}}{{/isContainer}}{{/isPrimitiveType}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}nothing{{/defaultValue}}{{^isPrimitiveType}} # spec type: Union{ Nothing, {{dataType}} }{{/isPrimitiveType}}
{{/allVars}}
function {{classname}}({{#allVars}}{{{name}}}, {{/allVars}})
@@ -23,7 +23,7 @@ Base.@kwdef mutable struct {{classname}} <: OpenAPI.APIModel
end
end # type {{classname}}
const _property_types_{{classname}} = Dict{Symbol,String}({{#allVars}}Symbol("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}")=>"{{datatype}}", {{/allVars}})
const _property_types_{{classname}} = Dict{Symbol,String}({{#allVars}}Symbol("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}")=>"{{dataType}}", {{/allVars}})
OpenAPI.property_type(::Type{ {{classname}} }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_{{classname}}[name]))}
function OpenAPI.check_required(o::{{classname}})

View File

@@ -8,12 +8,12 @@
)
{{#allVars}}
- {{{name}}}::{{datatype}}{{#description}} : {{description}}{{/description}}
- {{{name}}}::{{dataType}}{{#description}} : {{description}}{{/description}}
{{/allVars}}
"""
Base.@kwdef mutable struct {{classname}} <: OpenAPI.APIModel
{{#allVars}}
{{{name}}}{{#isPrimitiveType}}::Union{Nothing, {{{datatype}}}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isContainer}}::Union{Nothing, {{#isMap}}Dict{{/isMap}}{{^isMap}}Vector{{/isMap}}}{{/isContainer}}{{/isPrimitiveType}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}nothing{{/defaultValue}}{{^isPrimitiveType}} # spec type: Union{ Nothing, {{datatype}} }{{/isPrimitiveType}}
{{{name}}}{{#isPrimitiveType}}::Union{Nothing, {{{dataType}}}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isContainer}}::Union{Nothing, {{#isMap}}Dict{{/isMap}}{{^isMap}}Vector{{/isMap}}}{{/isContainer}}{{/isPrimitiveType}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}nothing{{/defaultValue}}{{^isPrimitiveType}} # spec type: Union{ Nothing, {{dataType}} }{{/isPrimitiveType}}
{{/allVars}}
function {{classname}}({{#allVars}}{{{name}}}, {{/allVars}})
@@ -23,7 +23,7 @@ Base.@kwdef mutable struct {{classname}} <: OpenAPI.APIModel
end
end # type {{classname}}
const _property_types_{{classname}} = Dict{Symbol,String}({{#allVars}}Symbol("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}")=>"{{datatype}}", {{/allVars}})
const _property_types_{{classname}} = Dict{Symbol,String}({{#allVars}}Symbol("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}")=>"{{dataType}}", {{/allVars}})
OpenAPI.property_type(::Type{ {{classname}} }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_{{classname}}[name]))}
function OpenAPI.check_required(o::{{classname}})

View File

@@ -284,7 +284,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par
{{#vars}}
{{#required}}
if ($this->container['{{name}}'] === null) {
if ($this->container['{{name}}'] === null{{#isNullable}} && !$this->isNullableSetToNull('{{name}}'){{/isNullable}}) {
$invalidProperties[] = "'{{name}}' can't be null";
}
{{/required}}
@@ -365,7 +365,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par
/**
* Gets {{name}}
*
* @return {{{dataType}}}{{^required}}|null{{/required}}
* @return {{{dataType}}}{{^required}}|null{{/required}}{{#required}}{{#isNullable}}|null{{/isNullable}}{{/required}}
{{#deprecated}}
* @deprecated
{{/deprecated}}
@@ -378,7 +378,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par
/**
* Sets {{name}}
*
* @param {{{dataType}}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}}
* @param {{{dataType}}}{{^required}}|null{{/required}}{{#required}}{{#isNullable}}|null{{/isNullable}}{{/required}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}}
*
* @return self
{{#deprecated}}

View File

@@ -27,17 +27,17 @@ class {{classname}}(Model):
{{/-last}}
{{/enumVars}}{{/allowableValues}}
def __init__(self{{#vars}}, {{name}}: {{datatype}}={{{defaultValue}}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
def __init__(self{{#vars}}, {{name}}: {{dataType}}={{{defaultValue}}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
"""{{classname}} - a model defined in Swagger
{{#vars}}
:param {{name}}: The {{name}} of this {{classname}}. # noqa: E501
:type {{name}}: {{datatype}}
:type {{name}}: {{dataType}}
{{/vars}}
"""
self.swagger_types = {
{{#vars}}
'{{name}}': {{{datatype}}}{{^-last}},{{/-last}}
'{{name}}': {{{dataType}}}{{^-last}},{{/-last}}
{{/vars}}
}
@@ -64,7 +64,7 @@ class {{classname}}(Model):
{{/-first}}
@property
def {{name}}(self) -> {{datatype}}:
def {{name}}(self) -> {{dataType}}:
"""Gets the {{name}} of this {{classname}}.
{{#description}}
@@ -72,12 +72,12 @@ class {{classname}}(Model):
{{/description}}
:return: The {{name}} of this {{classname}}.
:rtype: {{datatype}}
:rtype: {{dataType}}
"""
return self._{{name}}
@{{name}}.setter
def {{name}}(self, {{name}}: {{datatype}}):
def {{name}}(self, {{name}}: {{dataType}}):
"""Sets the {{name}} of this {{classname}}.
{{#description}}
@@ -85,7 +85,7 @@ class {{classname}}(Model):
{{/description}}
:param {{name}}: The {{name}} of this {{classname}}.
:type {{name}}: {{datatype}}
:type {{name}}: {{dataType}}
"""
{{#isEnum}}
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501

View File

@@ -27,7 +27,7 @@ resourceTypes {
type = {{>prop_type}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
type = {{datatype}}
type = {{dataType}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isArray}}
@@ -37,7 +37,7 @@ resourceTypes {
items.type = {{>prop_type}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
items.type = {{datatype}}
items.type = {{dataType}}
{{/isPrimitiveType}}
{{/items}}
{{/isArray}}

View File

@@ -61,10 +61,13 @@ requires-python = ">=3.9"
dependencies = [
"urllib3 (>=2.1.0,<3.0.0)",
"python-dateutil (>=2.8.2)",
{{#async}}
{{#httpx}}
"httpx (>=0.28.1)",
{{/httpx}}
{{#asyncio}}
"aiohttp (>=3.8.4)",
"aiohttp-retry (>=2.8.3)",
{{/async}}
{{/asyncio}}
{{#tornado}}
"tornado (>=4.2,<5)",
{{/tornado}}

View File

@@ -42,7 +42,7 @@ conversion = [
ammonia = "4"
async-trait = "0.1"
axum = { version = "0.8", features = ["multipart"] }
axum-extra = { version = "0.10", features = ["cookie", "query"] }
axum-extra = { version = "0.12", features = ["cookie", "query"] }
base64 = "0.22"
bytes = "1"
chrono = { version = "0.4", features = ["serde"] }

View File

@@ -182,12 +182,12 @@ pub fn check_xss_map<T>(v: &std::collections::HashMap<String, T>) -> std::result
{{#pattern}}
{{^isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new("{{ pattern }}").unwrap();
}
{{/isByteArray}}
{{#isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new("{{ pattern }}").unwrap();
}
fn validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.lowercase}}(
b: &ByteArray
@@ -332,12 +332,12 @@ pub fn check_xss_map<T>(v: &std::collections::HashMap<String, T>) -> std::result
{{#pattern}}
{{^isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new("{{ pattern }}").unwrap();
}
{{/isByteArray}}
{{#isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new("{{ pattern }}").unwrap();
}
fn validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.lowercase}}(
b: &ByteArray
@@ -494,12 +494,12 @@ pub fn check_xss_map<T>(v: &std::collections::HashMap<String, T>) -> std::result
{{#pattern}}
{{^isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new("{{ pattern }}").unwrap();
}
{{/isByteArray}}
{{#isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new("{{ pattern }}").unwrap();
}
fn validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.lowercase}}(
b: &ByteArray
@@ -1096,12 +1096,12 @@ impl {{{classname}}} {
{{#pattern}}
{{^isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}: regex::Regex = regex::Regex::new("{{ pattern }}").unwrap();
}
{{/isByteArray}}
{{#isByteArray}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new("{{ pattern }}").unwrap();
}
fn validate_byte_{{#lambda.lowercase}}{{{classname}}}_{{{name}}}{{/lambda.lowercase}}(
b: &ByteArray

View File

@@ -119,12 +119,12 @@
{{#pattern}}
{{#isString}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}: regex::Regex = regex::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}: regex::Regex = regex::Regex::new("{{ pattern }}").unwrap();
}
{{/isString}}
{{^isString}}
lazy_static::lazy_static! {
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new(r"{{ pattern }}").unwrap();
static ref RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}: regex::bytes::Regex = regex::bytes::Regex::new("{{ pattern }}").unwrap();
}
fn validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}(
b: &[u8]

View File

@@ -203,9 +203,18 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{/isDeepObject}}
{{^isObject}}
{{^isModel}}
{{^isEnum}}
{{#isPrimitiveType}}
if let Some(ref param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
req_builder = req_builder.query(&[("{{{baseName}}}", &param_value.to_string())]);
};
{{/isPrimitiveType}}
{{^isPrimitiveType}}
if let Some(ref param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
req_builder = req_builder.query(&[("{{{baseName}}}", &serde_json::to_string(param_value)?)]);
};
{{/isPrimitiveType}}
{{/isEnum}}
{{/isModel}}
{{/isObject}}
{{/isNullable}}
@@ -245,9 +254,19 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{#isModel}}
req_builder = req_builder.query(&[("{{{baseName}}}", &serde_json::to_string(param_value)?)]);
{{/isModel}}
{{#isEnum}}
req_builder = req_builder.query(&[("{{{baseName}}}", &serde_json::to_string(param_value)?)]);
{{/isEnum}}
{{^isObject}}
{{^isModel}}
{{^isEnum}}
{{#isPrimitiveType}}
req_builder = req_builder.query(&[("{{{baseName}}}", &param_value.to_string())]);
{{/isPrimitiveType}}
{{^isPrimitiveType}}
req_builder = req_builder.query(&[("{{{baseName}}}", &serde_json::to_string(param_value)?)]);
{{/isPrimitiveType}}
{{/isEnum}}
{{/isModel}}
{{/isObject}}
{{/isDeepObject}}

View File

@@ -19,7 +19,7 @@ import {{import}}
*/
final case class {{classname}} (
{{#vars}}
{{{name}}}: {{^required}}Option[{{/required}}{{datatype}}{{^required}}] = None{{/required}}{{^-last}},{{/-last}}
{{{name}}}: {{^required}}Option[{{/required}}{{dataType}}{{^required}}] = None{{/required}}{{^-last}},{{/-last}}
{{/vars}}
)

View File

@@ -15,7 +15,7 @@ public struct {{{classname}}}: Codable {
{{/isEnum}}
{{^isEnum}}
{{#description}}/// {{{.}}}
{{/description}}public var {{{name}}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}
{{/description}}public var {{{name}}}: {{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}
{{/isEnum}}
{{/allVars}}
{{#hasVars}}

View File

@@ -15,7 +15,7 @@ public struct {{{classname}}}: Codable {
{{/isEnum}}
{{^isEnum}}
{{#description}}/// {{{.}}}
{{/description}}public var {{{name}}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}
{{/description}}public var {{{name}}}: {{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}
{{/isEnum}}
{{/allVars}}
{{#hasVars}}

View File

@@ -32,7 +32,7 @@
{{^isEnum}}
{{#description}}/** {{{.}}} */
{{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.")
{{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{datatype}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}}
{{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{dataType}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}}
{{#objcCompatible}}
{{#vendorExtensions.x-swift-optional-scalar}}
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{{name}}}Num: NSNumber? {

View File

@@ -32,7 +32,7 @@
{{^isEnum}}
{{#description}}/** {{{.}}} */
{{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.")
{{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{datatype}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}}
{{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{#vendorExtensions.x-null-encodable}}NullEncodable<{{{dataType}}}>{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{/vendorExtensions.x-null-encodable}}{{#defaultValue}} = {{#vendorExtensions.x-null-encodable}}{{{vendorExtensions.x-null-encodable-default-value}}}{{/vendorExtensions.x-null-encodable}}{{^vendorExtensions.x-null-encodable}}{{{.}}}{{/vendorExtensions.x-null-encodable}}{{/defaultValue}}
{{#objcCompatible}}
{{#vendorExtensions.x-swift-optional-scalar}}
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{{name}}}Num: NSNumber? {

View File

@@ -323,7 +323,7 @@ export class {{classname}} extends runtime.BaseAPI {
{{#bodyParam}}
{{#isContainer}}
{{^withoutRuntimeChecks}}
body: requestParameters['{{paramName}}']{{#isArray}}{{#items}}{{^isPrimitiveType}}!.map({{datatype}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isArray}},
body: requestParameters['{{paramName}}']{{#isArray}}{{#items}}{{^isPrimitiveType}}!.map({{dataType}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isArray}},
{{/withoutRuntimeChecks}}
{{#withoutRuntimeChecks}}
body: requestParameters['{{paramName}}'],

View File

@@ -87,19 +87,19 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
{{^isPrimitiveType}}
{{#isArray}}
{{#uniqueItems}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Set((json['{{baseName}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}FromJSON))),
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Set((json['{{baseName}}'] as Array<any>).map({{#items}}{{dataType}}{{/items}}FromJSON))),
{{/uniqueItems}}
{{^uniqueItems}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}(json['{{baseName}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}FromJSON)),
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}(json['{{baseName}}'] as Array<any>).map({{#items}}{{dataType}}{{/items}}FromJSON)),
{{/uniqueItems}}
{{/isArray}}
{{#isMap}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}mapValues(json['{{baseName}}'], {{#items}}{{datatype}}{{/items}}FromJSON)),
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}mapValues(json['{{baseName}}'], {{#items}}{{dataType}}{{/items}}FromJSON)),
{{/isMap}}
{{^isArray}}
{{^isMap}}
{{^isFreeFormObject}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}{{datatype}}FromJSON(json['{{baseName}}']),
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}{{dataType}}FromJSON(json['{{baseName}}']),
{{/isFreeFormObject}}
{{#isFreeFormObject}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}json['{{baseName}}'],
@@ -166,19 +166,19 @@ export function {{classname}}ToJSONTyped(value?: {{#hasReadOnly}}Omit<{{classnam
{{^isPrimitiveType}}
{{#isArray}}
{{#uniqueItems}}
'{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}Array.from(value['{{name}}'] as Set<any>).map({{#items}}{{datatype}}{{/items}}ToJSON)),
'{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}Array.from(value['{{name}}'] as Set<any>).map({{#items}}{{dataType}}{{/items}}ToJSON)),
{{/uniqueItems}}
{{^uniqueItems}}
'{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}(value['{{name}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}ToJSON)),
'{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}(value['{{name}}'] as Array<any>).map({{#items}}{{dataType}}{{/items}}ToJSON)),
{{/uniqueItems}}
{{/isArray}}
{{#isMap}}
'{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}mapValues(value['{{name}}'], {{#items}}{{datatype}}{{/items}}ToJSON)),
'{{baseName}}': {{^required}}value['{{name}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}value['{{name}}'] == null ? null : {{/isNullable}}{{/required}}mapValues(value['{{name}}'], {{#items}}{{dataType}}{{/items}}ToJSON)),
{{/isMap}}
{{^isArray}}
{{^isMap}}
{{^isFreeFormObject}}
'{{baseName}}': {{datatype}}ToJSON(value['{{name}}']),
'{{baseName}}': {{dataType}}ToJSON(value['{{name}}']),
{{/isFreeFormObject}}
{{#isFreeFormObject}}
'{{baseName}}': value['{{name}}'],

View File

@@ -10,13 +10,13 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
{{#vars}}
/**
* {{#lambda.indented_star_4}}{{{unescapedDescription}}}{{/lambda.indented_star_4}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
* @memberof {{classname}}
{{#deprecated}}
* @deprecated
{{/deprecated}}
*/
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{/vars}}
}{{#hasEnums}}

View File

@@ -171,7 +171,7 @@ function {{nickname}}Raw<T>({{#allParams.0}}requestParameters: {{operationIdCame
{{#hasBodyParam}}
{{#bodyParam}}
{{#isContainer}}
body: queryParameters || requestParameters.{{paramName}}{{#isArray}}{{#items}}{{^isPrimitiveType}}?.map({{datatype}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isArray}},
body: queryParameters || requestParameters.{{paramName}}{{#isArray}}{{#items}}{{^isPrimitiveType}}?.map({{dataType}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isArray}},
{{/isContainer}}
{{^isContainer}}
{{^isPrimitiveType}}

View File

@@ -21,10 +21,10 @@ export interface {{classname}} {{#allParents.0}}extends{{#allParents}} {{{.}}}{{
{{#vars}}
/**
* {{{description}}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
* @memberof {{classname}}
*/
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}};
{{/vars}}
}
@@ -53,15 +53,15 @@ export function {{classname}}FromJSON(json: any): {{classname}} {
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{#isArray}}
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}(json['{{baseName}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}FromJSON),
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}(json['{{baseName}}'] as Array<any>).map({{#items}}{{dataType}}{{/items}}FromJSON),
{{/isArray}}
{{#isMap}}
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}mapValues(json['{{baseName}}'], {{#items}}{{datatype}}{{/items}}FromJSON),
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}mapValues(json['{{baseName}}'], {{#items}}{{dataType}}{{/items}}FromJSON),
{{/isMap}}
{{^isArray}}
{{^isMap}}
{{^isFreeFormObject}}
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}{{datatype}}FromJSON(json['{{baseName}}']),
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}{{dataType}}FromJSON(json['{{baseName}}']),
{{/isFreeFormObject}}
{{#isFreeFormObject}}
'{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}json['{{baseName}}'],
@@ -96,15 +96,15 @@ export function {{classname}}ToJSON(value?: {{classname}}): any {
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{#isArray}}
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}(value.{{name}} as Array<any>).map({{#items}}{{datatype}}{{/items}}ToJSON),
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}(value.{{name}} as Array<any>).map({{#items}}{{dataType}}{{/items}}ToJSON),
{{/isArray}}
{{#isMap}}
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}mapValues(value.{{name}}, {{#items}}{{datatype}}{{/items}}ToJSON),
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}mapValues(value.{{name}}, {{#items}}{{dataType}}{{/items}}ToJSON),
{{/isMap}}
{{^isArray}}
{{^isMap}}
{{^isFreeFormObject}}
'{{baseName}}': {{datatype}}ToJSON(value.{{name}}),
'{{baseName}}': {{dataType}}ToJSON(value.{{name}}),
{{/isFreeFormObject}}
{{#isFreeFormObject}}
'{{baseName}}': value.{{name}},

View File

@@ -18,10 +18,10 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
{{#vars}}
/**{{#description}}
* {{{.}}}{{/description}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
* @memberof {{classname}}
*/
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{/vars}}
}{{#hasEnums}}

View File

@@ -65,7 +65,7 @@ Protected Class {{classname}}
Visible=false
Group="Behavior"
InitialValue=""
Type="{{{datatype}}}"
Type="{{{dataType}}}"
EditorType="{{#isStringSchema}}MultiLineEditor{{/isStringSchema}}"
#tag EndViewProperty{{/isByteArray}}{{/isEnum}}{{/allVars}}
#tag EndViewBehavior

View File

@@ -80,7 +80,7 @@ Protected Class {{classname}}
Visible=false
Group="Behavior"
InitialValue=""
Type="{{{datatype}}}"
Type="{{{dataType}}}"
EditorType="{{#isStringSchema}}MultiLineEditor{{/isStringSchema}}"
#tag EndViewProperty{{/isByteArray}}{{/isEnum}}{{/allVars}}
#tag EndViewBehavior

View File

@@ -677,7 +677,7 @@ components:
'read:pets': read your pets
api_key:
type: apiKey
name: api_key
name: api_key_name
in: header
schemas:
Order:

View File

@@ -0,0 +1,123 @@
openapi: 3.0.3
info:
title: Enum Query Parameter Test
description: Test spec for enum and non-primitive query parameters
version: 1.0.0
paths:
/aggregate:
get:
operationId: getAggregateData
summary: Get aggregated data
description: Test endpoint with enum query parameters referenced via $ref
parameters:
- name: timeBucket
in: query
description: Time aggregation bucket
required: false
schema:
$ref: '#/components/schemas/TimeBucket'
- name: sortDirection
in: query
description: Sort direction
required: false
schema:
$ref: '#/components/schemas/SortDirection'
- name: status
in: query
description: Status filter
required: true
schema:
$ref: '#/components/schemas/Status'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/AggregateResponse'
'400':
description: Bad request
/items:
get:
operationId: getItems
summary: Get items with filters
parameters:
- name: category
in: query
description: Item category (inline enum)
required: false
schema:
type: string
enum:
- electronics
- clothing
- food
- name: priority
in: query
description: Priority level (enum via ref)
required: false
schema:
$ref: '#/components/schemas/Priority'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Item'
components:
schemas:
TimeBucket:
type: string
description: Time aggregation bucket options
enum:
- hour
- day
- week
- month
- year
SortDirection:
type: string
description: Sort direction options
enum:
- asc
- desc
default: asc
Status:
type: string
description: Status filter options
enum:
- active
- inactive
- pending
- completed
Priority:
type: string
description: Priority level
enum:
- low
- medium
- high
- critical
AggregateResponse:
type: object
properties:
count:
type: integer
format: int64
data:
type: array
items:
type: object
additionalProperties: true
Item:
type: object
properties:
id:
type: string
name:
type: string
category:
type: string

View File

@@ -193,6 +193,17 @@ dependencies = [
"url",
]
[[package]]
name = "enum-query-params-reqwest"
version = "1.0.0"
dependencies = [
"reqwest",
"serde",
"serde_json",
"serde_repr",
"url",
]
[[package]]
name = "equivalent"
version = "1.0.1"

View File

@@ -0,0 +1,3 @@
/target/
**/*.rs.bk
Cargo.lock

View File

@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -0,0 +1,23 @@
.gitignore
.travis.yml
Cargo.toml
README.md
docs/AggregateResponse.md
docs/DefaultApi.md
docs/Item.md
docs/Priority.md
docs/SortDirection.md
docs/Status.md
docs/TimeBucket.md
git_push.sh
src/apis/configuration.rs
src/apis/default_api.rs
src/apis/mod.rs
src/lib.rs
src/models/aggregate_response.rs
src/models/item.rs
src/models/mod.rs
src/models/priority.rs
src/models/sort_direction.rs
src/models/status.rs
src/models/time_bucket.rs

View File

@@ -0,0 +1 @@
7.18.0-SNAPSHOT

View File

@@ -0,0 +1 @@
language: rust

View File

@@ -0,0 +1,20 @@
[package]
name = "enum-query-params-reqwest"
version = "1.0.0"
authors = ["OpenAPI Generator team and contributors"]
description = "Test spec for enum and non-primitive query parameters"
# Override this license by providing a License Object in the OpenAPI.
license = "Unlicense"
edition = "2021"
[dependencies]
serde = { version = "^1.0", features = ["derive"] }
serde_json = "^1.0"
serde_repr = "^0.1"
url = "^2.5"
reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] }
[features]
default = ["native-tls"]
native-tls = ["reqwest/native-tls"]
rustls-tls = ["reqwest/rustls-tls"]

View File

@@ -0,0 +1,52 @@
# Rust API client for enum-query-params-reqwest
Test spec for enum and non-primitive query parameters
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.18.0-SNAPSHOT
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
## Installation
Put the package under your project folder in a directory named `enum-query-params-reqwest` and add the following to `Cargo.toml` under `[dependencies]`:
```
enum-query-params-reqwest = { path = "./enum-query-params-reqwest" }
```
## Documentation for API Endpoints
All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**get_aggregate_data**](docs/DefaultApi.md#get_aggregate_data) | **GET** /aggregate | Get aggregated data
*DefaultApi* | [**get_items**](docs/DefaultApi.md#get_items) | **GET** /items | Get items with filters
## Documentation For Models
- [AggregateResponse](docs/AggregateResponse.md)
- [Item](docs/Item.md)
- [Priority](docs/Priority.md)
- [SortDirection](docs/SortDirection.md)
- [Status](docs/Status.md)
- [TimeBucket](docs/TimeBucket.md)
To get access to the crate's generated documentation, use:
```
cargo doc --open
```
## Author

View File

@@ -0,0 +1,12 @@
# AggregateResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | Option<**i64**> | | [optional]
**data** | Option<[**Vec<std::collections::HashMap<String, serde_json::Value>>**](std::collections::HashMap.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)

View File

@@ -0,0 +1,71 @@
# \DefaultApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_aggregate_data**](DefaultApi.md#get_aggregate_data) | **GET** /aggregate | Get aggregated data
[**get_items**](DefaultApi.md#get_items) | **GET** /items | Get items with filters
## get_aggregate_data
> models::AggregateResponse get_aggregate_data(status, time_bucket, sort_direction)
Get aggregated data
Test endpoint with enum query parameters referenced via $ref
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**status** | [**Status**](.md) | Status filter | [required] |
**time_bucket** | Option<[**TimeBucket**](.md)> | Time aggregation bucket | |
**sort_direction** | Option<[**SortDirection**](.md)> | Sort direction | |
### Return type
[**models::AggregateResponse**](AggregateResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_items
> Vec<models::Item> get_items(category, priority)
Get items with filters
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**category** | Option<**String**> | Item category (inline enum) | |
**priority** | Option<[**Priority**](.md)> | Priority level (enum via ref) | |
### Return type
[**Vec<models::Item>**](Item.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# Item
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | Option<**String**> | | [optional]
**name** | Option<**String**> | | [optional]
**category** | Option<**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)

View File

@@ -0,0 +1,15 @@
# Priority
## Enum Variants
| Name | Value |
|---- | -----|
| Low | low |
| Medium | medium |
| High | high |
| Critical | critical |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,13 @@
# SortDirection
## Enum Variants
| Name | Value |
|---- | -----|
| Asc | asc |
| Desc | desc |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,15 @@
# Status
## Enum Variants
| Name | Value |
|---- | -----|
| Active | active |
| Inactive | inactive |
| Pending | pending |
| Completed | completed |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,16 @@
# TimeBucket
## Enum Variants
| Name | Value |
|---- | -----|
| Hour | hour |
| Day | day |
| Week | week |
| Month | month |
| Year | year |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

@@ -0,0 +1,51 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Debug, Clone)]
pub struct Configuration {
pub base_path: String,
pub user_agent: Option<String>,
pub client: reqwest::Client,
pub basic_auth: Option<BasicAuth>,
pub oauth_access_token: Option<String>,
pub bearer_access_token: Option<String>,
pub api_key: Option<ApiKey>,
}
pub type BasicAuth = (String, Option<String>);
#[derive(Debug, Clone)]
pub struct ApiKey {
pub prefix: Option<String>,
pub key: String,
}
impl Configuration {
pub fn new() -> Configuration {
Configuration::default()
}
}
impl Default for Configuration {
fn default() -> Self {
Configuration {
base_path: "http://localhost".to_owned(),
user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()),
client: reqwest::Client::new(),
basic_auth: None,
oauth_access_token: None,
bearer_access_token: None,
api_key: None,
}
}
}

View File

@@ -0,0 +1,122 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use reqwest;
use serde::{Deserialize, Serialize, de::Error as _};
use crate::{apis::ResponseContent, models};
use super::{Error, configuration, ContentType};
/// struct for typed errors of method [`get_aggregate_data`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetAggregateDataError {
Status400(),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_items`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetItemsError {
UnknownValue(serde_json::Value),
}
/// Test endpoint with enum query parameters referenced via $ref
pub async fn get_aggregate_data(configuration: &configuration::Configuration, status: models::Status, time_bucket: Option<models::TimeBucket>, sort_direction: Option<models::SortDirection>) -> Result<models::AggregateResponse, Error<GetAggregateDataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_query_status = status;
let p_query_time_bucket = time_bucket;
let p_query_sort_direction = sort_direction;
let uri_str = format!("{}/aggregate", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_query_time_bucket {
req_builder = req_builder.query(&[("timeBucket", &serde_json::to_string(param_value)?)]);
}
if let Some(ref param_value) = p_query_sort_direction {
req_builder = req_builder.query(&[("sortDirection", &serde_json::to_string(param_value)?)]);
}
req_builder = req_builder.query(&[("status", &p_query_status.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AggregateResponse`"))),
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AggregateResponse`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetAggregateDataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
pub async fn get_items(configuration: &configuration::Configuration, category: Option<&str>, priority: Option<models::Priority>) -> Result<Vec<models::Item>, Error<GetItemsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_query_category = category;
let p_query_priority = priority;
let uri_str = format!("{}/items", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_query_category {
req_builder = req_builder.query(&[("category", &serde_json::to_string(param_value)?)]);
}
if let Some(ref param_value) = p_query_priority {
req_builder = req_builder.query(&[("priority", &serde_json::to_string(param_value)?)]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::Item&gt;`"))),
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::Item&gt;`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetItemsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}

View File

@@ -0,0 +1,116 @@
use std::error;
use std::fmt;
#[derive(Debug, Clone)]
pub struct ResponseContent<T> {
pub status: reqwest::StatusCode,
pub content: String,
pub entity: Option<T>,
}
#[derive(Debug)]
pub enum Error<T> {
Reqwest(reqwest::Error),
Serde(serde_json::Error),
Io(std::io::Error),
ResponseError(ResponseContent<T>),
}
impl <T> fmt::Display for Error<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let (module, e) = match self {
Error::Reqwest(e) => ("reqwest", e.to_string()),
Error::Serde(e) => ("serde", e.to_string()),
Error::Io(e) => ("IO", e.to_string()),
Error::ResponseError(e) => ("response", format!("status code {}", e.status)),
};
write!(f, "error in {}: {}", module, e)
}
}
impl <T: fmt::Debug> error::Error for Error<T> {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
Some(match self {
Error::Reqwest(e) => e,
Error::Serde(e) => e,
Error::Io(e) => e,
Error::ResponseError(_) => return None,
})
}
}
impl <T> From<reqwest::Error> for Error<T> {
fn from(e: reqwest::Error) -> Self {
Error::Reqwest(e)
}
}
impl <T> From<serde_json::Error> for Error<T> {
fn from(e: serde_json::Error) -> Self {
Error::Serde(e)
}
}
impl <T> From<std::io::Error> for Error<T> {
fn from(e: std::io::Error) -> Self {
Error::Io(e)
}
}
pub fn urlencode<T: AsRef<str>>(s: T) -> String {
::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
}
pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> {
if let serde_json::Value::Object(object) = value {
let mut params = vec![];
for (key, value) in object {
match value {
serde_json::Value::Object(_) => params.append(&mut parse_deep_object(
&format!("{}[{}]", prefix, key),
value,
)),
serde_json::Value::Array(array) => {
for (i, value) in array.iter().enumerate() {
params.append(&mut parse_deep_object(
&format!("{}[{}][{}]", prefix, key, i),
value,
));
}
},
serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())),
_ => params.push((format!("{}[{}]", prefix, key), value.to_string())),
}
}
return params;
}
unimplemented!("Only objects are supported with style=deepObject")
}
/// Internal use only
/// A content type supported by this client.
#[allow(dead_code)]
enum ContentType {
Json,
Text,
Unsupported(String)
}
impl From<&str> for ContentType {
fn from(content_type: &str) -> Self {
if content_type.starts_with("application") && content_type.contains("json") {
return Self::Json;
} else if content_type.starts_with("text/plain") {
return Self::Text;
} else {
return Self::Unsupported(content_type.to_string());
}
}
}
pub mod default_api;
pub mod configuration;

View File

@@ -0,0 +1,11 @@
#![allow(unused_imports)]
#![allow(clippy::too_many_arguments)]
extern crate serde_repr;
extern crate serde;
extern crate serde_json;
extern crate url;
extern crate reqwest;
pub mod apis;
pub mod models;

View File

@@ -0,0 +1,30 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AggregateResponse {
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "data", skip_serializing_if = "Option::is_none")]
pub data: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
}
impl AggregateResponse {
pub fn new() -> AggregateResponse {
AggregateResponse {
count: None,
data: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Item {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "category", skip_serializing_if = "Option::is_none")]
pub category: Option<String>,
}
impl Item {
pub fn new() -> Item {
Item {
id: None,
name: None,
category: None,
}
}
}

View File

@@ -0,0 +1,12 @@
pub mod aggregate_response;
pub use self::aggregate_response::AggregateResponse;
pub mod item;
pub use self::item::Item;
pub mod priority;
pub use self::priority::Priority;
pub mod sort_direction;
pub use self::sort_direction::SortDirection;
pub mod status;
pub use self::status::Status;
pub mod time_bucket;
pub use self::time_bucket::TimeBucket;

View File

@@ -0,0 +1,45 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Priority : Priority level
/// Priority level
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Priority {
#[serde(rename = "low")]
Low,
#[serde(rename = "medium")]
Medium,
#[serde(rename = "high")]
High,
#[serde(rename = "critical")]
Critical,
}
impl std::fmt::Display for Priority {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Low => write!(f, "low"),
Self::Medium => write!(f, "medium"),
Self::High => write!(f, "high"),
Self::Critical => write!(f, "critical"),
}
}
}
impl Default for Priority {
fn default() -> Priority {
Self::Low
}
}

View File

@@ -0,0 +1,39 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// SortDirection : Sort direction options
/// Sort direction options
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SortDirection {
#[serde(rename = "asc")]
Asc,
#[serde(rename = "desc")]
Desc,
}
impl std::fmt::Display for SortDirection {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Asc => write!(f, "asc"),
Self::Desc => write!(f, "desc"),
}
}
}
impl Default for SortDirection {
fn default() -> SortDirection {
Self::Asc
}
}

View File

@@ -0,0 +1,45 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Status : Status filter options
/// Status filter options
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "active")]
Active,
#[serde(rename = "inactive")]
Inactive,
#[serde(rename = "pending")]
Pending,
#[serde(rename = "completed")]
Completed,
}
impl std::fmt::Display for Status {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Active => write!(f, "active"),
Self::Inactive => write!(f, "inactive"),
Self::Pending => write!(f, "pending"),
Self::Completed => write!(f, "completed"),
}
}
}
impl Default for Status {
fn default() -> Status {
Self::Active
}
}

View File

@@ -0,0 +1,48 @@
/*
* Enum Query Parameter Test
*
* Test spec for enum and non-primitive query parameters
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// TimeBucket : Time aggregation bucket options
/// Time aggregation bucket options
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TimeBucket {
#[serde(rename = "hour")]
Hour,
#[serde(rename = "day")]
Day,
#[serde(rename = "week")]
Week,
#[serde(rename = "month")]
Month,
#[serde(rename = "year")]
Year,
}
impl std::fmt::Display for TimeBucket {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Hour => write!(f, "hour"),
Self::Day => write!(f, "day"),
Self::Week => write!(f, "week"),
Self::Month => write!(f, "month"),
Self::Year => write!(f, "year"),
}
}
}
impl Default for TimeBucket {
fn default() -> TimeBucket {
Self::Hour
}
}

View File

@@ -761,7 +761,7 @@ pplx::task<std::shared_ptr<Pet>> PetApi::getPetById(int64_t petId) const
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}

View File

@@ -208,7 +208,7 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory() const
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}

View File

@@ -126,7 +126,7 @@ pplx::task<void> UserApi::createUser(std::shared_ptr<User> user) const
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}
@@ -265,7 +265,7 @@ pplx::task<void> UserApi::createUsersWithArrayInput(std::vector<std::shared_ptr<
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}
@@ -404,7 +404,7 @@ pplx::task<void> UserApi::createUsersWithListInput(std::vector<std::shared_ptr<U
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}
@@ -516,7 +516,7 @@ pplx::task<void> UserApi::deleteUser(utility::string_t username) const
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}
@@ -889,7 +889,7 @@ pplx::task<void> UserApi::logoutUser() const
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}
@@ -1024,7 +1024,7 @@ pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}

View File

@@ -126,7 +126,7 @@ pplx::task<void> UserOrPetApi::createUserOrPet(std::shared_ptr<CreateUserOrPet_r
utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("api_key"));
if ( localVarApiKey.size() > 0 )
{
localVarHeaderParams[utility::conversions::to_string_t("api_key")] = localVarApiKey;
localVarHeaderParams[utility::conversions::to_string_t("api_key_name")] = localVarApiKey;
}
}

View File

@@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterHelloWorldPost(ref suppressDefaultLog, apiResponseLocalVar, helloWorldPostRequest);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -160,7 +160,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterIcons(ref suppressDefaultLog, apiResponseLocalVar, size);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -149,7 +149,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterOneOfArray(ref suppressDefaultLog, apiResponseLocalVar, oneOfArrayRequest);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -156,7 +156,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetApiKeysId(ref suppressDefaultLog, apiResponseLocalVar, id);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -144,7 +144,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetApiKeysId(ref suppressDefaultLog, apiResponseLocalVar, id);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -144,7 +144,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetApiKeysId(ref suppressDefaultLog, apiResponseLocalVar, id);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -158,7 +158,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterList(ref suppressDefaultLog, apiResponseLocalVar, personId);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterRootGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterRootGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterCall123TestSpecialTags(ref suppressDefaultLog, apiResponseLocalVar, modelClient);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -450,7 +450,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFooGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -681,7 +681,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetCountry(ref suppressDefaultLog, apiResponseLocalVar, country);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -886,7 +886,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterHello(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1103,7 +1103,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterRedirectOrDefault(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1326,7 +1326,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterRolesReportGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1543,7 +1543,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTest(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -1300,7 +1300,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFakeHealthGet(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1520,7 +1520,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFakeOuterBooleanSerialize(ref suppressDefaultLog, apiResponseLocalVar, body);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1772,7 +1772,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFakeOuterCompositeSerialize(ref suppressDefaultLog, apiResponseLocalVar, outerComposite);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2015,7 +2015,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFakeOuterNumberSerialize(ref suppressDefaultLog, apiResponseLocalVar, body);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2268,7 +2268,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFakeOuterStringSerialize(ref suppressDefaultLog, apiResponseLocalVar, requiredStringUuid, body);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2519,7 +2519,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetArrayOfEnums(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2736,7 +2736,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetMixedAnyOf(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2953,7 +2953,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetMixedOneOf(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -3184,7 +3184,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestAdditionalPropertiesReference(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -3397,7 +3397,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestBodyWithFileSchema(ref suppressDefaultLog, apiResponseLocalVar, fileSchemaTestClass);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -3615,7 +3615,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestBodyWithQueryParams(ref suppressDefaultLog, apiResponseLocalVar, query, user);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -3839,7 +3839,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestClientModel(ref suppressDefaultLog, apiResponseLocalVar, modelClient);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -4125,7 +4125,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -4477,7 +4477,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -4755,7 +4755,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -5006,7 +5006,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestInlineAdditionalProperties(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -5219,7 +5219,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -5437,7 +5437,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestJsonFormData(ref suppressDefaultLog, apiResponseLocalVar, param, param2);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -5695,7 +5695,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -5952,7 +5952,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestStringMapReference(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterTestClassname(ref suppressDefaultLog, apiResponseLocalVar, modelClient);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterAddPet(ref suppressDefaultLog, apiResponseLocalVar, pet);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -931,7 +931,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterDeletePet(ref suppressDefaultLog, apiResponseLocalVar, petId, apiKey);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1150,7 +1150,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFindPetsByStatus(ref suppressDefaultLog, apiResponseLocalVar, status);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1450,7 +1450,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterFindPetsByTags(ref suppressDefaultLog, apiResponseLocalVar, tags);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1713,7 +1713,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetPetById(ref suppressDefaultLog, apiResponseLocalVar, petId);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1982,7 +1982,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterUpdatePet(ref suppressDefaultLog, apiResponseLocalVar, pet);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2233,7 +2233,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterUpdatePetWithForm(ref suppressDefaultLog, apiResponseLocalVar, petId, name, status);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2482,7 +2482,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterUploadFile(ref suppressDefaultLog, apiResponseLocalVar, petId, additionalMetadata, file);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2771,7 +2771,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterUploadFileWithRequiredFile(ref suppressDefaultLog, apiResponseLocalVar, petId, requiredFile, additionalMetadata);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -380,7 +380,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterDeleteOrder(ref suppressDefaultLog, apiResponseLocalVar, orderId);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -572,7 +572,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetInventory(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -801,7 +801,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetOrderById(ref suppressDefaultLog, apiResponseLocalVar, orderId);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1053,7 +1053,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterPlaceOrder(ref suppressDefaultLog, apiResponseLocalVar, order);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

View File

@@ -622,7 +622,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterCreateUser(ref suppressDefaultLog, apiResponseLocalVar, user);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -835,7 +835,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterCreateUsersWithArrayInput(ref suppressDefaultLog, apiResponseLocalVar, user);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1048,7 +1048,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterCreateUsersWithListInput(ref suppressDefaultLog, apiResponseLocalVar, user);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1261,7 +1261,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterDeleteUser(ref suppressDefaultLog, apiResponseLocalVar, username);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1467,7 +1467,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterGetUserByName(ref suppressDefaultLog, apiResponseLocalVar, username);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -1770,7 +1770,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2015,7 +2015,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterLogoutUser(ref suppressDefaultLog, apiResponseLocalVar);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>
@@ -2210,7 +2210,7 @@ namespace Org.OpenAPITools.Api
bool suppressDefaultLog = false;
AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username);
if (!suppressDefaultLog)
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
Logger.LogInformation("{0,-9} | {1} | {2}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
}
/// <summary>

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