forked from loafle/openapi-generator-original
[Python] add float
to reserved word list (#16689)
* add float as reserved world * clean up * update samples * Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java Co-authored-by: Jonathan Ballet <jon@multani.info> * update doc * uncomment test --------- Co-authored-by: Jonathan Ballet <jon@multani.info>
This commit is contained in:
parent
3fcf5584c6
commit
ce4b2fe7bd
@ -1,6 +1,6 @@
|
|||||||
generatorName: python
|
generatorName: python
|
||||||
outputDir: samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true
|
outputDir: samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/echo_api.yaml
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||||
templateDir: modules/openapi-generator/src/main/resources/python
|
templateDir: modules/openapi-generator/src/main/resources/python
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
hideGenerationTimestamp: "true"
|
hideGenerationTimestamp: "true"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
generatorName: python
|
generatorName: python
|
||||||
outputDir: samples/client/echo_api/python
|
outputDir: samples/client/echo_api/python
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/echo_api.yaml
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||||
templateDir: modules/openapi-generator/src/main/resources/python
|
templateDir: modules/openapi-generator/src/main/resources/python
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
hideGenerationTimestamp: "true"
|
hideGenerationTimestamp: "true"
|
||||||
|
@ -78,10 +78,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>async</li>
|
<li>async</li>
|
||||||
<li>auth_settings</li>
|
<li>auth_settings</li>
|
||||||
<li>await</li>
|
<li>await</li>
|
||||||
|
<li>base64</li>
|
||||||
<li>body_params</li>
|
<li>body_params</li>
|
||||||
<li>break</li>
|
<li>break</li>
|
||||||
<li>class</li>
|
<li>class</li>
|
||||||
<li>continue</li>
|
<li>continue</li>
|
||||||
|
<li>date</li>
|
||||||
<li>def</li>
|
<li>def</li>
|
||||||
<li>del</li>
|
<li>del</li>
|
||||||
<li>elif</li>
|
<li>elif</li>
|
||||||
@ -90,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>exec</li>
|
<li>exec</li>
|
||||||
<li>false</li>
|
<li>false</li>
|
||||||
<li>finally</li>
|
<li>finally</li>
|
||||||
|
<li>float</li>
|
||||||
<li>for</li>
|
<li>for</li>
|
||||||
<li>form_params</li>
|
<li>form_params</li>
|
||||||
<li>from</li>
|
<li>from</li>
|
||||||
@ -99,6 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>import</li>
|
<li>import</li>
|
||||||
<li>in</li>
|
<li>in</li>
|
||||||
<li>is</li>
|
<li>is</li>
|
||||||
|
<li>json</li>
|
||||||
<li>lambda</li>
|
<li>lambda</li>
|
||||||
<li>local_var_files</li>
|
<li>local_var_files</li>
|
||||||
<li>none</li>
|
<li>none</li>
|
||||||
@ -113,6 +117,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>raise</li>
|
<li>raise</li>
|
||||||
<li>resource_path</li>
|
<li>resource_path</li>
|
||||||
<li>return</li>
|
<li>return</li>
|
||||||
|
<li>schema</li>
|
||||||
<li>self</li>
|
<li>self</li>
|
||||||
<li>true</li>
|
<li>true</li>
|
||||||
<li>try</li>
|
<li>try</li>
|
||||||
|
@ -78,10 +78,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>async</li>
|
<li>async</li>
|
||||||
<li>auth_settings</li>
|
<li>auth_settings</li>
|
||||||
<li>await</li>
|
<li>await</li>
|
||||||
|
<li>base64</li>
|
||||||
<li>body_params</li>
|
<li>body_params</li>
|
||||||
<li>break</li>
|
<li>break</li>
|
||||||
<li>class</li>
|
<li>class</li>
|
||||||
<li>continue</li>
|
<li>continue</li>
|
||||||
|
<li>date</li>
|
||||||
<li>def</li>
|
<li>def</li>
|
||||||
<li>del</li>
|
<li>del</li>
|
||||||
<li>elif</li>
|
<li>elif</li>
|
||||||
@ -90,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>exec</li>
|
<li>exec</li>
|
||||||
<li>false</li>
|
<li>false</li>
|
||||||
<li>finally</li>
|
<li>finally</li>
|
||||||
|
<li>float</li>
|
||||||
<li>for</li>
|
<li>for</li>
|
||||||
<li>form_params</li>
|
<li>form_params</li>
|
||||||
<li>from</li>
|
<li>from</li>
|
||||||
@ -99,6 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>import</li>
|
<li>import</li>
|
||||||
<li>in</li>
|
<li>in</li>
|
||||||
<li>is</li>
|
<li>is</li>
|
||||||
|
<li>json</li>
|
||||||
<li>lambda</li>
|
<li>lambda</li>
|
||||||
<li>local_var_files</li>
|
<li>local_var_files</li>
|
||||||
<li>none</li>
|
<li>none</li>
|
||||||
@ -113,6 +117,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>raise</li>
|
<li>raise</li>
|
||||||
<li>resource_path</li>
|
<li>resource_path</li>
|
||||||
<li>return</li>
|
<li>return</li>
|
||||||
|
<li>schema</li>
|
||||||
<li>self</li>
|
<li>self</li>
|
||||||
<li>true</li>
|
<li>true</li>
|
||||||
<li>try</li>
|
<li>try</li>
|
||||||
|
@ -73,10 +73,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>async</li>
|
<li>async</li>
|
||||||
<li>auth_settings</li>
|
<li>auth_settings</li>
|
||||||
<li>await</li>
|
<li>await</li>
|
||||||
|
<li>base64</li>
|
||||||
<li>body_params</li>
|
<li>body_params</li>
|
||||||
<li>break</li>
|
<li>break</li>
|
||||||
<li>class</li>
|
<li>class</li>
|
||||||
<li>continue</li>
|
<li>continue</li>
|
||||||
|
<li>date</li>
|
||||||
<li>def</li>
|
<li>def</li>
|
||||||
<li>del</li>
|
<li>del</li>
|
||||||
<li>elif</li>
|
<li>elif</li>
|
||||||
@ -85,6 +87,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>exec</li>
|
<li>exec</li>
|
||||||
<li>false</li>
|
<li>false</li>
|
||||||
<li>finally</li>
|
<li>finally</li>
|
||||||
|
<li>float</li>
|
||||||
<li>for</li>
|
<li>for</li>
|
||||||
<li>form_params</li>
|
<li>form_params</li>
|
||||||
<li>from</li>
|
<li>from</li>
|
||||||
@ -94,6 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>import</li>
|
<li>import</li>
|
||||||
<li>in</li>
|
<li>in</li>
|
||||||
<li>is</li>
|
<li>is</li>
|
||||||
|
<li>json</li>
|
||||||
<li>lambda</li>
|
<li>lambda</li>
|
||||||
<li>local_var_files</li>
|
<li>local_var_files</li>
|
||||||
<li>none</li>
|
<li>none</li>
|
||||||
@ -108,6 +112,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>raise</li>
|
<li>raise</li>
|
||||||
<li>resource_path</li>
|
<li>resource_path</li>
|
||||||
<li>return</li>
|
<li>return</li>
|
||||||
|
<li>schema</li>
|
||||||
<li>self</li>
|
<li>self</li>
|
||||||
<li>true</li>
|
<li>true</li>
|
||||||
<li>try</li>
|
<li>try</li>
|
||||||
|
@ -78,10 +78,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>async</li>
|
<li>async</li>
|
||||||
<li>auth_settings</li>
|
<li>auth_settings</li>
|
||||||
<li>await</li>
|
<li>await</li>
|
||||||
|
<li>base64</li>
|
||||||
<li>body_params</li>
|
<li>body_params</li>
|
||||||
<li>break</li>
|
<li>break</li>
|
||||||
<li>class</li>
|
<li>class</li>
|
||||||
<li>continue</li>
|
<li>continue</li>
|
||||||
|
<li>date</li>
|
||||||
<li>def</li>
|
<li>def</li>
|
||||||
<li>del</li>
|
<li>del</li>
|
||||||
<li>elif</li>
|
<li>elif</li>
|
||||||
@ -90,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>exec</li>
|
<li>exec</li>
|
||||||
<li>false</li>
|
<li>false</li>
|
||||||
<li>finally</li>
|
<li>finally</li>
|
||||||
|
<li>float</li>
|
||||||
<li>for</li>
|
<li>for</li>
|
||||||
<li>form_params</li>
|
<li>form_params</li>
|
||||||
<li>from</li>
|
<li>from</li>
|
||||||
@ -99,6 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>import</li>
|
<li>import</li>
|
||||||
<li>in</li>
|
<li>in</li>
|
||||||
<li>is</li>
|
<li>is</li>
|
||||||
|
<li>json</li>
|
||||||
<li>lambda</li>
|
<li>lambda</li>
|
||||||
<li>local_var_files</li>
|
<li>local_var_files</li>
|
||||||
<li>none</li>
|
<li>none</li>
|
||||||
@ -113,6 +117,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>raise</li>
|
<li>raise</li>
|
||||||
<li>resource_path</li>
|
<li>resource_path</li>
|
||||||
<li>return</li>
|
<li>return</li>
|
||||||
|
<li>schema</li>
|
||||||
<li>self</li>
|
<li>self</li>
|
||||||
<li>true</li>
|
<li>true</li>
|
||||||
<li>try</li>
|
<li>try</li>
|
||||||
|
@ -68,12 +68,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
## RESERVED WORDS
|
## RESERVED WORDS
|
||||||
|
|
||||||
<ul class="column-ul">
|
<ul class="column-ul">
|
||||||
|
<li>all_params</li>
|
||||||
<li>and</li>
|
<li>and</li>
|
||||||
<li>as</li>
|
<li>as</li>
|
||||||
<li>assert</li>
|
<li>assert</li>
|
||||||
<li>async</li>
|
<li>async</li>
|
||||||
|
<li>auth_settings</li>
|
||||||
<li>await</li>
|
<li>await</li>
|
||||||
<li>base64</li>
|
<li>base64</li>
|
||||||
|
<li>body_params</li>
|
||||||
<li>break</li>
|
<li>break</li>
|
||||||
<li>class</li>
|
<li>class</li>
|
||||||
<li>continue</li>
|
<li>continue</li>
|
||||||
@ -86,23 +89,30 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>exec</li>
|
<li>exec</li>
|
||||||
<li>false</li>
|
<li>false</li>
|
||||||
<li>finally</li>
|
<li>finally</li>
|
||||||
|
<li>float</li>
|
||||||
<li>for</li>
|
<li>for</li>
|
||||||
|
<li>form_params</li>
|
||||||
<li>from</li>
|
<li>from</li>
|
||||||
<li>global</li>
|
<li>global</li>
|
||||||
|
<li>header_params</li>
|
||||||
<li>if</li>
|
<li>if</li>
|
||||||
<li>import</li>
|
<li>import</li>
|
||||||
<li>in</li>
|
<li>in</li>
|
||||||
<li>is</li>
|
<li>is</li>
|
||||||
<li>json</li>
|
<li>json</li>
|
||||||
<li>lambda</li>
|
<li>lambda</li>
|
||||||
|
<li>local_var_files</li>
|
||||||
<li>none</li>
|
<li>none</li>
|
||||||
<li>nonlocal</li>
|
<li>nonlocal</li>
|
||||||
<li>not</li>
|
<li>not</li>
|
||||||
<li>or</li>
|
<li>or</li>
|
||||||
<li>pass</li>
|
<li>pass</li>
|
||||||
|
<li>path_params</li>
|
||||||
<li>print</li>
|
<li>print</li>
|
||||||
<li>property</li>
|
<li>property</li>
|
||||||
|
<li>query_params</li>
|
||||||
<li>raise</li>
|
<li>raise</li>
|
||||||
|
<li>resource_path</li>
|
||||||
<li>return</li>
|
<li>return</li>
|
||||||
<li>schema</li>
|
<li>schema</li>
|
||||||
<li>self</li>
|
<li>self</li>
|
||||||
|
@ -110,6 +110,9 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
|
|||||||
"header_params", "form_params", "local_var_files", "body_params", "auth_settings",
|
"header_params", "form_params", "local_var_files", "body_params", "auth_settings",
|
||||||
// @property
|
// @property
|
||||||
"property",
|
"property",
|
||||||
|
// typing keywords
|
||||||
|
"schema", "base64", "json",
|
||||||
|
"date", "float",
|
||||||
// python reserved words
|
// python reserved words
|
||||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
||||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
||||||
|
@ -130,21 +130,6 @@ public class PythonClientCodegen extends AbstractPythonCodegen implements Codege
|
|||||||
// default HIDE_GENERATION_TIMESTAMP to true
|
// default HIDE_GENERATION_TIMESTAMP to true
|
||||||
hideGenerationTimestamp = Boolean.TRUE;
|
hideGenerationTimestamp = Boolean.TRUE;
|
||||||
|
|
||||||
// from https://docs.python.org/3/reference/lexical_analysis.html#keywords
|
|
||||||
setReservedWordsLowerCase(
|
|
||||||
Arrays.asList(
|
|
||||||
// pydantic keyword
|
|
||||||
"schema", "base64", "json",
|
|
||||||
"date",
|
|
||||||
// @property
|
|
||||||
"property",
|
|
||||||
// python reserved words
|
|
||||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
|
||||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
|
||||||
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
|
||||||
"return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True",
|
|
||||||
"False", "async", "await"));
|
|
||||||
|
|
||||||
cliOptions.clear();
|
cliOptions.clear();
|
||||||
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).")
|
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).")
|
||||||
.defaultValue("openapi_client"));
|
.defaultValue("openapi_client"));
|
||||||
|
@ -1,700 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
openapi: 3.0.3
|
|
||||||
info:
|
|
||||||
title: Echo Server API
|
|
||||||
description: Echo Server API
|
|
||||||
contact:
|
|
||||||
email: team@openapitools.org
|
|
||||||
license:
|
|
||||||
name: Apache 2.0
|
|
||||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
version: 0.1.0
|
|
||||||
servers:
|
|
||||||
- url: http://localhost:3000/
|
|
||||||
paths:
|
|
||||||
# Path usually starts with parameter type such as path, query, header, form
|
|
||||||
# For body/form parameters, path starts with "/echo" so the the echo server
|
|
||||||
# will response with the same body in the HTTP request.
|
|
||||||
#
|
|
||||||
# path parameter tests
|
|
||||||
/path/string/{path_string}/integer/{path_integer}:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- path
|
|
||||||
summary: Test path parameter(s)
|
|
||||||
description: Test path parameter(s)
|
|
||||||
operationId: tests/path/string/{path_string}/integer/{path_integer}
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: path_string
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: path_integer
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
# form parameter tests
|
|
||||||
/form/integer/boolean/string:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- form
|
|
||||||
summary: Test form parameter(s)
|
|
||||||
description: Test form parameter(s)
|
|
||||||
operationId: test/form/integer/boolean/string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/x-www-form-urlencoded:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
integer_form:
|
|
||||||
type: integer
|
|
||||||
boolean_form:
|
|
||||||
type: boolean
|
|
||||||
string_form:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
# form parameter tests for oneOf schema
|
|
||||||
/form/oneof:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- form
|
|
||||||
summary: Test form parameter(s) for oneOf schema
|
|
||||||
description: Test form parameter(s) for oneOf schema
|
|
||||||
operationId: test/form/oneof
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/x-www-form-urlencoded:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
oneOf:
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
form1:
|
|
||||||
type: string
|
|
||||||
form2:
|
|
||||||
type: integer
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
form3:
|
|
||||||
type: string
|
|
||||||
form4:
|
|
||||||
type: boolean
|
|
||||||
- $ref: '#/components/schemas/Tag'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
# header parameter tests
|
|
||||||
/header/integer/boolean/string:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- header
|
|
||||||
summary: Test header parameter(s)
|
|
||||||
description: Test header parameter(s)
|
|
||||||
operationId: test/header/integer/boolean/string
|
|
||||||
parameters:
|
|
||||||
- in: header
|
|
||||||
name: integer_header
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- in: header
|
|
||||||
name: boolean_header
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
- in: header
|
|
||||||
name: string_header
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
# query parameter tests
|
|
||||||
/query/enum_ref_string:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/enum_ref_string
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: enum_ref_string_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/StringEnumRef'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/datetime/date/string:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/datetime/date/string
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: datetime_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
- in: query
|
|
||||||
name: date_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
- in: query
|
|
||||||
name: string_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/integer/boolean/string:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/integer/boolean/string
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: integer_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- in: query
|
|
||||||
name: boolean_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
- in: query
|
|
||||||
name: string_query
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/style_form/explode_true/array_string:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/style_form/explode_true/array_string
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: query_object
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
values:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/style_form/explode_true/object:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/style_form/explode_true/object
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: query_object
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Pet'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/style_form/explode_true/object/allOf:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/style_form/explode_true/object/allOf
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: query_object
|
|
||||||
style: form #default
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/DataQuery'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/style_deepObject/explode_true/object:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/style_deepObject/explode_true/object
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: query_object
|
|
||||||
style: deepObject
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Pet'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/query/style_deepObject/explode_true/object/allOf:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- query
|
|
||||||
summary: Test query parameter(s)
|
|
||||||
description: Test query parameter(s)
|
|
||||||
operationId: test/query/style_deepObject/explode_true/object/allOf
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: query_object
|
|
||||||
style: deepObject
|
|
||||||
explode: true #default
|
|
||||||
schema:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/Bird'
|
|
||||||
- $ref: '#/components/schemas/Category'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
# body parameter tests
|
|
||||||
/body/application/octetstream/binary:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test body parameter(s)
|
|
||||||
description: Test body parameter(s)
|
|
||||||
operationId: test/body/application/octetstream/binary
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/octet-stream:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/echo/body/Pet:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test body parameter(s)
|
|
||||||
description: Test body parameter(s)
|
|
||||||
operationId: test/echo/body/Pet
|
|
||||||
requestBody:
|
|
||||||
$ref: '#/components/requestBodies/Pet'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Pet'
|
|
||||||
/echo/body/Pet/response_string:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test empty response body
|
|
||||||
description: Test empty response body
|
|
||||||
operationId: test/echo/body/Pet/response_string
|
|
||||||
requestBody:
|
|
||||||
$ref: '#/components/requestBodies/Pet'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/echo/body/Tag/response_string:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test empty json (request body)
|
|
||||||
description: Test empty json (request body)
|
|
||||||
operationId: test/echo/body/Tag/response_string
|
|
||||||
requestBody:
|
|
||||||
$ref: '#/components/requestBodies/Tag'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/echo/body/FreeFormObject/response_string:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test free form object
|
|
||||||
description: Test free form object
|
|
||||||
operationId: test/echo/body/FreeFormObject/response_string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
description: Free form object
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
/binary/gif:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test binary (gif) response body
|
|
||||||
description: Test binary (gif) response body
|
|
||||||
operationId: test/binary/gif
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
image/gif:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
# Array of binary in multipart mime tests
|
|
||||||
/body/application/octetstream/array_of_binary:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- body
|
|
||||||
summary: Test array of binary in multipart mime
|
|
||||||
description: Test array of binary in multipart mime
|
|
||||||
operationId: test/body/multipart/formdata/array_of_binary
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
multipart/form-data:
|
|
||||||
schema:
|
|
||||||
required:
|
|
||||||
- files
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
files:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
# To test http basic auth
|
|
||||||
/auth/http/basic:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- auth
|
|
||||||
security:
|
|
||||||
- http_auth: []
|
|
||||||
summary: To test HTTP basic authentication
|
|
||||||
description: To test HTTP basic authentication
|
|
||||||
operationId: test/auth/http/basic
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Successful operation
|
|
||||||
content:
|
|
||||||
text/plain:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
components:
|
|
||||||
securitySchemes:
|
|
||||||
http_auth:
|
|
||||||
type: http
|
|
||||||
scheme: basic
|
|
||||||
requestBodies:
|
|
||||||
Pet:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Pet'
|
|
||||||
description: Pet object that needs to be added to the store
|
|
||||||
Tag:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Tag'
|
|
||||||
description: Tag object
|
|
||||||
schemas:
|
|
||||||
Category:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
example: 1
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
example: Dogs
|
|
||||||
xml:
|
|
||||||
name: category
|
|
||||||
Tag:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
xml:
|
|
||||||
name: tag
|
|
||||||
Pet:
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
- photoUrls
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
example: 10
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
example: doggie
|
|
||||||
category:
|
|
||||||
$ref: '#/components/schemas/Category'
|
|
||||||
photoUrls:
|
|
||||||
type: array
|
|
||||||
xml:
|
|
||||||
wrapped: true
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
xml:
|
|
||||||
name: photoUrl
|
|
||||||
tags:
|
|
||||||
type: array
|
|
||||||
xml:
|
|
||||||
wrapped: true
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/Tag'
|
|
||||||
status:
|
|
||||||
type: string
|
|
||||||
description: pet status in the store
|
|
||||||
enum:
|
|
||||||
- available
|
|
||||||
- pending
|
|
||||||
- sold
|
|
||||||
xml:
|
|
||||||
name: pet
|
|
||||||
StringEnumRef:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
- unclassified
|
|
||||||
DefaultValue:
|
|
||||||
type: object
|
|
||||||
description: to test the default value of properties
|
|
||||||
properties:
|
|
||||||
array_string_enum_ref_default:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/StringEnumRef'
|
|
||||||
default:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
array_string_enum_default:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
- unclassified
|
|
||||||
default:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
array_string_default:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
default:
|
|
||||||
- failure
|
|
||||||
- skipped
|
|
||||||
array_integer_default:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: integer
|
|
||||||
default:
|
|
||||||
- 1
|
|
||||||
- 3
|
|
||||||
array_string:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
array_string_nullable:
|
|
||||||
nullable: true
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
array_string_extension_nullable:
|
|
||||||
x-nullable: true
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
string_nullable:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
Bird:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
size:
|
|
||||||
type: string
|
|
||||||
color:
|
|
||||||
type: string
|
|
||||||
Query:
|
|
||||||
type: object
|
|
||||||
x-parent: true
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
description: Query
|
|
||||||
format: int64
|
|
||||||
outcomes:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- SUCCESS
|
|
||||||
- FAILURE
|
|
||||||
- SKIPPED
|
|
||||||
default:
|
|
||||||
- SUCCESS
|
|
||||||
- FAILURE
|
|
||||||
DataQuery:
|
|
||||||
allOf:
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
suffix:
|
|
||||||
type: string
|
|
||||||
description: test suffix
|
|
||||||
text:
|
|
||||||
type: string
|
|
||||||
description: Some text containing white spaces
|
|
||||||
example: "Some text"
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
description: A date
|
|
||||||
- $ref: '#/components/schemas/Query'
|
|
||||||
NumberPropertiesOnly:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
number:
|
|
||||||
type: number
|
|
||||||
# TODO: pydantic v2: this field name override the default `float` type
|
|
||||||
# If this property is uncommented, consider removing this file
|
|
||||||
# completely in favor of the parent echo_api.yaml file
|
|
||||||
#float:
|
|
||||||
#type: number
|
|
||||||
#format: float
|
|
||||||
double:
|
|
||||||
type: number
|
|
||||||
format: double
|
|
||||||
minimum: 0.8
|
|
||||||
maximum: 50.2
|
|
@ -1649,12 +1649,11 @@ components:
|
|||||||
maximum: 543.2
|
maximum: 543.2
|
||||||
minimum: 32.1
|
minimum: 32.1
|
||||||
type: number
|
type: number
|
||||||
# TODO: pydantic v2: this field name override the default `float` type
|
float:
|
||||||
#float:
|
type: number
|
||||||
#type: number
|
format: float
|
||||||
#format: float
|
maximum: 987.6
|
||||||
#maximum: 987.6
|
minimum: 54.3
|
||||||
#minimum: 54.3
|
|
||||||
double:
|
double:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**number** | **float** | | [optional]
|
**number** | **float** | | [optional]
|
||||||
|
**var_float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -29,8 +29,9 @@ class NumberPropertiesOnly(BaseModel):
|
|||||||
NumberPropertiesOnly
|
NumberPropertiesOnly
|
||||||
"""
|
"""
|
||||||
number: Optional[Union[StrictFloat, StrictInt]] = None
|
number: Optional[Union[StrictFloat, StrictInt]] = None
|
||||||
|
var_float: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="float")
|
||||||
double: Optional[Union[Annotated[float, Field(le=50.2, strict=True, ge=0.8)], Annotated[int, Field(le=50, strict=True, ge=1)]]] = None
|
double: Optional[Union[Annotated[float, Field(le=50.2, strict=True, ge=0.8)], Annotated[int, Field(le=50, strict=True, ge=1)]]] = None
|
||||||
__properties: ClassVar[List[str]] = ["number", "double"]
|
__properties: ClassVar[List[str]] = ["number", "float", "double"]
|
||||||
|
|
||||||
model_config = {
|
model_config = {
|
||||||
"populate_by_name": True,
|
"populate_by_name": True,
|
||||||
@ -76,6 +77,7 @@ class NumberPropertiesOnly(BaseModel):
|
|||||||
|
|
||||||
_obj = NumberPropertiesOnly.model_validate({
|
_obj = NumberPropertiesOnly.model_validate({
|
||||||
"number": obj.get("number"),
|
"number": obj.get("number"),
|
||||||
|
"float": obj.get("float"),
|
||||||
"double": obj.get("double")
|
"double": obj.get("double")
|
||||||
})
|
})
|
||||||
return _obj
|
return _obj
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**number** | **float** | | [optional]
|
**number** | **float** | | [optional]
|
||||||
|
**var_float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -29,8 +29,9 @@ class NumberPropertiesOnly(BaseModel):
|
|||||||
NumberPropertiesOnly
|
NumberPropertiesOnly
|
||||||
"""
|
"""
|
||||||
number: Optional[Union[StrictFloat, StrictInt]] = None
|
number: Optional[Union[StrictFloat, StrictInt]] = None
|
||||||
|
var_float: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="float")
|
||||||
double: Optional[Union[Annotated[float, Field(le=50.2, strict=True, ge=0.8)], Annotated[int, Field(le=50, strict=True, ge=1)]]] = None
|
double: Optional[Union[Annotated[float, Field(le=50.2, strict=True, ge=0.8)], Annotated[int, Field(le=50, strict=True, ge=1)]]] = None
|
||||||
__properties: ClassVar[List[str]] = ["number", "double"]
|
__properties: ClassVar[List[str]] = ["number", "float", "double"]
|
||||||
|
|
||||||
model_config = {
|
model_config = {
|
||||||
"populate_by_name": True,
|
"populate_by_name": True,
|
||||||
@ -71,6 +72,7 @@ class NumberPropertiesOnly(BaseModel):
|
|||||||
|
|
||||||
_obj = NumberPropertiesOnly.model_validate({
|
_obj = NumberPropertiesOnly.model_validate({
|
||||||
"number": obj.get("number"),
|
"number": obj.get("number"),
|
||||||
|
"float": obj.get("float"),
|
||||||
"double": obj.get("double")
|
"double": obj.get("double")
|
||||||
})
|
})
|
||||||
return _obj
|
return _obj
|
||||||
|
@ -1120,7 +1120,7 @@ No authorization required
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **test_endpoint_parameters**
|
# **test_endpoint_parameters**
|
||||||
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, var_float=var_float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
@ -1164,7 +1164,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
|
|||||||
integer = 56 # int | None (optional)
|
integer = 56 # int | None (optional)
|
||||||
int32 = 56 # int | None (optional)
|
int32 = 56 # int | None (optional)
|
||||||
int64 = 56 # int | None (optional)
|
int64 = 56 # int | None (optional)
|
||||||
float = 3.4 # float | None (optional)
|
var_float = 3.4 # float | None (optional)
|
||||||
string = 'string_example' # str | None (optional)
|
string = 'string_example' # str | None (optional)
|
||||||
binary = None # bytearray | None (optional)
|
binary = None # bytearray | None (optional)
|
||||||
byte_with_max_length = None # bytearray | None (optional)
|
byte_with_max_length = None # bytearray | None (optional)
|
||||||
@ -1175,7 +1175,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
await api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
await api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, var_float=var_float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
|
print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
|
||||||
```
|
```
|
||||||
@ -1193,7 +1193,7 @@ Name | Type | Description | Notes
|
|||||||
**integer** | **int**| None | [optional]
|
**integer** | **int**| None | [optional]
|
||||||
**int32** | **int**| None | [optional]
|
**int32** | **int**| None | [optional]
|
||||||
**int64** | **int**| None | [optional]
|
**int64** | **int**| None | [optional]
|
||||||
**float** | **float**| None | [optional]
|
**var_float** | **float**| None | [optional]
|
||||||
**string** | **str**| None | [optional]
|
**string** | **str**| None | [optional]
|
||||||
**binary** | **bytearray**| None | [optional]
|
**binary** | **bytearray**| None | [optional]
|
||||||
**byte_with_max_length** | **bytearray**| None | [optional]
|
**byte_with_max_length** | **bytearray**| None | [optional]
|
||||||
|
@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|||||||
**int32** | **int** | | [optional]
|
**int32** | **int** | | [optional]
|
||||||
**int64** | **int** | | [optional]
|
**int64** | **int** | | [optional]
|
||||||
**number** | **float** | |
|
**number** | **float** | |
|
||||||
|
**var_float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
**decimal** | **decimal.Decimal** | | [optional]
|
**decimal** | **decimal.Decimal** | | [optional]
|
||||||
**string** | **str** | | [optional]
|
**string** | **str** | | [optional]
|
||||||
|
@ -2079,7 +2079,7 @@ class FakeApi:
|
|||||||
_request_auth=_params.get('_request_auth'))
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
@validate_call
|
@validate_call
|
||||||
async def test_endpoint_parameters(self, number : Annotated[float, Field(le=543.2, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501
|
async def test_endpoint_parameters(self, number : Annotated[float, Field(le=543.2, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501
|
||||||
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
@ -2098,8 +2098,8 @@ class FakeApi:
|
|||||||
:type int32: int
|
:type int32: int
|
||||||
:param int64: None
|
:param int64: None
|
||||||
:type int64: int
|
:type int64: int
|
||||||
:param float: None
|
:param var_float: None
|
||||||
:type float: float
|
:type var_float: float
|
||||||
:param string: None
|
:param string: None
|
||||||
:type string: str
|
:type string: str
|
||||||
:param binary: None
|
:param binary: None
|
||||||
@ -2127,10 +2127,10 @@ class FakeApi:
|
|||||||
if '_preload_content' in kwargs:
|
if '_preload_content' in kwargs:
|
||||||
message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||||
raise ValueError(message)
|
raise ValueError(message)
|
||||||
return await self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501
|
return await self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, var_float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501
|
||||||
|
|
||||||
@validate_call
|
@validate_call
|
||||||
async def test_endpoint_parameters_with_http_info(self, number : Annotated[float, Field(le=543.2, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
async def test_endpoint_parameters_with_http_info(self, number : Annotated[float, Field(le=543.2, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
||||||
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
@ -2149,8 +2149,8 @@ class FakeApi:
|
|||||||
:type int32: int
|
:type int32: int
|
||||||
:param int64: None
|
:param int64: None
|
||||||
:type int64: int
|
:type int64: int
|
||||||
:param float: None
|
:param var_float: None
|
||||||
:type float: float
|
:type var_float: float
|
||||||
:param string: None
|
:param string: None
|
||||||
:type string: str
|
:type string: str
|
||||||
:param binary: None
|
:param binary: None
|
||||||
@ -2198,7 +2198,7 @@ class FakeApi:
|
|||||||
'integer',
|
'integer',
|
||||||
'int32',
|
'int32',
|
||||||
'int64',
|
'int64',
|
||||||
'float',
|
'var_float',
|
||||||
'string',
|
'string',
|
||||||
'binary',
|
'binary',
|
||||||
'byte_with_max_length',
|
'byte_with_max_length',
|
||||||
@ -2252,8 +2252,8 @@ class FakeApi:
|
|||||||
if _params['number'] is not None:
|
if _params['number'] is not None:
|
||||||
_form_params.append(('number', _params['number']))
|
_form_params.append(('number', _params['number']))
|
||||||
|
|
||||||
if _params['float'] is not None:
|
if _params['var_float'] is not None:
|
||||||
_form_params.append(('float', _params['float']))
|
_form_params.append(('float', _params['var_float']))
|
||||||
|
|
||||||
if _params['double'] is not None:
|
if _params['double'] is not None:
|
||||||
_form_params.append(('double', _params['double']))
|
_form_params.append(('double', _params['double']))
|
||||||
|
@ -32,6 +32,7 @@ class FormatTest(BaseModel):
|
|||||||
int32: Optional[Annotated[int, Field(le=200, strict=True, ge=20)]] = None
|
int32: Optional[Annotated[int, Field(le=200, strict=True, ge=20)]] = None
|
||||||
int64: Optional[StrictInt] = None
|
int64: Optional[StrictInt] = None
|
||||||
number: Annotated[float, Field(le=543.2, ge=32.1)]
|
number: Annotated[float, Field(le=543.2, ge=32.1)]
|
||||||
|
var_float: Optional[Annotated[float, Field(le=987.6, ge=54.3)]] = Field(default=None, alias="float")
|
||||||
double: Optional[Annotated[float, Field(le=123.4, ge=67.8)]] = None
|
double: Optional[Annotated[float, Field(le=123.4, ge=67.8)]] = None
|
||||||
decimal: Optional[Decimal] = None
|
decimal: Optional[Decimal] = None
|
||||||
string: Optional[Annotated[str, Field(strict=True)]] = None
|
string: Optional[Annotated[str, Field(strict=True)]] = None
|
||||||
@ -44,7 +45,7 @@ class FormatTest(BaseModel):
|
|||||||
password: Annotated[str, Field(min_length=10, strict=True, max_length=64)]
|
password: Annotated[str, Field(min_length=10, strict=True, max_length=64)]
|
||||||
pattern_with_digits: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string that is a 10 digit number. Can have leading zeros.")
|
pattern_with_digits: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string that is a 10 digit number. Can have leading zeros.")
|
||||||
pattern_with_digits_and_delimiter: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
pattern_with_digits_and_delimiter: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
||||||
__properties: ClassVar[List[str]] = ["integer", "int32", "int64", "number", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
__properties: ClassVar[List[str]] = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
||||||
|
|
||||||
@field_validator('string')
|
@field_validator('string')
|
||||||
def string_validate_regular_expression(cls, value):
|
def string_validate_regular_expression(cls, value):
|
||||||
@ -128,6 +129,7 @@ class FormatTest(BaseModel):
|
|||||||
"int32": obj.get("int32"),
|
"int32": obj.get("int32"),
|
||||||
"int64": obj.get("int64"),
|
"int64": obj.get("int64"),
|
||||||
"number": obj.get("number"),
|
"number": obj.get("number"),
|
||||||
|
"float": obj.get("float"),
|
||||||
"double": obj.get("double"),
|
"double": obj.get("double"),
|
||||||
"decimal": obj.get("decimal"),
|
"decimal": obj.get("decimal"),
|
||||||
"string": obj.get("string"),
|
"string": obj.get("string"),
|
||||||
|
@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|||||||
**int32** | **int** | | [optional]
|
**int32** | **int** | | [optional]
|
||||||
**int64** | **int** | | [optional]
|
**int64** | **int** | | [optional]
|
||||||
**number** | **float** | |
|
**number** | **float** | |
|
||||||
|
**float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
**decimal** | **decimal.Decimal** | | [optional]
|
**decimal** | **decimal.Decimal** | | [optional]
|
||||||
**string** | **str** | | [optional]
|
**string** | **str** | | [optional]
|
||||||
|
@ -29,6 +29,7 @@ class FormatTest(BaseModel):
|
|||||||
int32: Optional[conint(strict=True, le=200, ge=20)] = None
|
int32: Optional[conint(strict=True, le=200, ge=20)] = None
|
||||||
int64: Optional[StrictInt] = None
|
int64: Optional[StrictInt] = None
|
||||||
number: confloat(le=543.2, ge=32.1) = Field(...)
|
number: confloat(le=543.2, ge=32.1) = Field(...)
|
||||||
|
float: Optional[confloat(le=987.6, ge=54.3)] = None
|
||||||
double: Optional[confloat(le=123.4, ge=67.8)] = None
|
double: Optional[confloat(le=123.4, ge=67.8)] = None
|
||||||
decimal: Optional[condecimal()] = None
|
decimal: Optional[condecimal()] = None
|
||||||
string: Optional[constr(strict=True)] = None
|
string: Optional[constr(strict=True)] = None
|
||||||
@ -41,7 +42,7 @@ class FormatTest(BaseModel):
|
|||||||
password: constr(strict=True, max_length=64, min_length=10) = Field(...)
|
password: constr(strict=True, max_length=64, min_length=10) = Field(...)
|
||||||
pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.")
|
pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.")
|
||||||
pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
||||||
__properties = ["integer", "int32", "int64", "number", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
__properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
||||||
|
|
||||||
@validator('string')
|
@validator('string')
|
||||||
def string_validate_regular_expression(cls, value):
|
def string_validate_regular_expression(cls, value):
|
||||||
@ -123,6 +124,7 @@ class FormatTest(BaseModel):
|
|||||||
"int32": obj.get("int32"),
|
"int32": obj.get("int32"),
|
||||||
"int64": obj.get("int64"),
|
"int64": obj.get("int64"),
|
||||||
"number": obj.get("number"),
|
"number": obj.get("number"),
|
||||||
|
"float": obj.get("float"),
|
||||||
"double": obj.get("double"),
|
"double": obj.get("double"),
|
||||||
"decimal": obj.get("decimal"),
|
"decimal": obj.get("decimal"),
|
||||||
"string": obj.get("string"),
|
"string": obj.get("string"),
|
||||||
|
@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|||||||
**int32** | **int** | | [optional]
|
**int32** | **int** | | [optional]
|
||||||
**int64** | **int** | | [optional]
|
**int64** | **int** | | [optional]
|
||||||
**number** | **float** | |
|
**number** | **float** | |
|
||||||
|
**float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
**decimal** | **decimal.Decimal** | | [optional]
|
**decimal** | **decimal.Decimal** | | [optional]
|
||||||
**string** | **str** | | [optional]
|
**string** | **str** | | [optional]
|
||||||
|
@ -29,6 +29,7 @@ class FormatTest(BaseModel):
|
|||||||
int32: Optional[conint(strict=True, le=200, ge=20)] = None
|
int32: Optional[conint(strict=True, le=200, ge=20)] = None
|
||||||
int64: Optional[StrictInt] = None
|
int64: Optional[StrictInt] = None
|
||||||
number: confloat(le=543.2, ge=32.1, strict=True) = Field(...)
|
number: confloat(le=543.2, ge=32.1, strict=True) = Field(...)
|
||||||
|
float: Optional[confloat(le=987.6, ge=54.3, strict=True)] = None
|
||||||
double: Optional[confloat(le=123.4, ge=67.8, strict=True)] = None
|
double: Optional[confloat(le=123.4, ge=67.8, strict=True)] = None
|
||||||
decimal: Optional[condecimal()] = None
|
decimal: Optional[condecimal()] = None
|
||||||
string: Optional[constr(strict=True)] = None
|
string: Optional[constr(strict=True)] = None
|
||||||
@ -42,7 +43,7 @@ class FormatTest(BaseModel):
|
|||||||
pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.")
|
pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.")
|
||||||
pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
||||||
additional_properties: Dict[str, Any] = {}
|
additional_properties: Dict[str, Any] = {}
|
||||||
__properties = ["integer", "int32", "int64", "number", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
__properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
||||||
|
|
||||||
@validator('string')
|
@validator('string')
|
||||||
def string_validate_regular_expression(cls, value):
|
def string_validate_regular_expression(cls, value):
|
||||||
@ -130,6 +131,7 @@ class FormatTest(BaseModel):
|
|||||||
"int32": obj.get("int32"),
|
"int32": obj.get("int32"),
|
||||||
"int64": obj.get("int64"),
|
"int64": obj.get("int64"),
|
||||||
"number": obj.get("number"),
|
"number": obj.get("number"),
|
||||||
|
"float": obj.get("float"),
|
||||||
"double": obj.get("double"),
|
"double": obj.get("double"),
|
||||||
"decimal": obj.get("decimal"),
|
"decimal": obj.get("decimal"),
|
||||||
"string": obj.get("string"),
|
"string": obj.get("string"),
|
||||||
|
@ -1120,7 +1120,7 @@ No authorization required
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **test_endpoint_parameters**
|
# **test_endpoint_parameters**
|
||||||
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, var_float=var_float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
@ -1164,7 +1164,7 @@ with petstore_api.ApiClient(configuration) as api_client:
|
|||||||
integer = 56 # int | None (optional)
|
integer = 56 # int | None (optional)
|
||||||
int32 = 56 # int | None (optional)
|
int32 = 56 # int | None (optional)
|
||||||
int64 = 56 # int | None (optional)
|
int64 = 56 # int | None (optional)
|
||||||
float = 3.4 # float | None (optional)
|
var_float = 3.4 # float | None (optional)
|
||||||
string = 'string_example' # str | None (optional)
|
string = 'string_example' # str | None (optional)
|
||||||
binary = None # bytearray | None (optional)
|
binary = None # bytearray | None (optional)
|
||||||
byte_with_max_length = None # bytearray | None (optional)
|
byte_with_max_length = None # bytearray | None (optional)
|
||||||
@ -1175,7 +1175,7 @@ with petstore_api.ApiClient(configuration) as api_client:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, var_float=var_float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
|
print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
|
||||||
```
|
```
|
||||||
@ -1193,7 +1193,7 @@ Name | Type | Description | Notes
|
|||||||
**integer** | **int**| None | [optional]
|
**integer** | **int**| None | [optional]
|
||||||
**int32** | **int**| None | [optional]
|
**int32** | **int**| None | [optional]
|
||||||
**int64** | **int**| None | [optional]
|
**int64** | **int**| None | [optional]
|
||||||
**float** | **float**| None | [optional]
|
**var_float** | **float**| None | [optional]
|
||||||
**string** | **str**| None | [optional]
|
**string** | **str**| None | [optional]
|
||||||
**binary** | **bytearray**| None | [optional]
|
**binary** | **bytearray**| None | [optional]
|
||||||
**byte_with_max_length** | **bytearray**| None | [optional]
|
**byte_with_max_length** | **bytearray**| None | [optional]
|
||||||
|
@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|||||||
**int32** | **int** | | [optional]
|
**int32** | **int** | | [optional]
|
||||||
**int64** | **int** | | [optional]
|
**int64** | **int** | | [optional]
|
||||||
**number** | **float** | |
|
**number** | **float** | |
|
||||||
|
**var_float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
**decimal** | **decimal.Decimal** | | [optional]
|
**decimal** | **decimal.Decimal** | | [optional]
|
||||||
**string** | **str** | | [optional]
|
**string** | **str** | | [optional]
|
||||||
|
@ -2335,14 +2335,14 @@ class FakeApi:
|
|||||||
_request_auth=_params.get('_request_auth'))
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
@validate_call
|
@validate_call
|
||||||
def test_endpoint_parameters(self, number : Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501
|
def test_endpoint_parameters(self, number : Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501
|
||||||
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
asynchronous HTTP request, please pass async_req=True
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, async_req=True)
|
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer, int32, int64, var_float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, async_req=True)
|
||||||
>>> result = thread.get()
|
>>> result = thread.get()
|
||||||
|
|
||||||
:param number: None (required)
|
:param number: None (required)
|
||||||
@ -2359,8 +2359,8 @@ class FakeApi:
|
|||||||
:type int32: int
|
:type int32: int
|
||||||
:param int64: None
|
:param int64: None
|
||||||
:type int64: int
|
:type int64: int
|
||||||
:param float: None
|
:param var_float: None
|
||||||
:type float: float
|
:type var_float: float
|
||||||
:param string: None
|
:param string: None
|
||||||
:type string: str
|
:type string: str
|
||||||
:param binary: None
|
:param binary: None
|
||||||
@ -2390,17 +2390,17 @@ class FakeApi:
|
|||||||
if '_preload_content' in kwargs:
|
if '_preload_content' in kwargs:
|
||||||
message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||||
raise ValueError(message)
|
raise ValueError(message)
|
||||||
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501
|
return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, var_float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501
|
||||||
|
|
||||||
@validate_call
|
@validate_call
|
||||||
def test_endpoint_parameters_with_http_info(self, number : Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
def test_endpoint_parameters_with_http_info(self, number : Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], double : Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], pattern_without_delimiter : Annotated[str, Field(strict=True, description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(description="None")], integer : Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, int32 : Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, var_float : Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, string : Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
||||||
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
"""Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
asynchronous HTTP request, please pass async_req=True
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
>>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, async_req=True)
|
>>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, var_float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, async_req=True)
|
||||||
>>> result = thread.get()
|
>>> result = thread.get()
|
||||||
|
|
||||||
:param number: None (required)
|
:param number: None (required)
|
||||||
@ -2417,8 +2417,8 @@ class FakeApi:
|
|||||||
:type int32: int
|
:type int32: int
|
||||||
:param int64: None
|
:param int64: None
|
||||||
:type int64: int
|
:type int64: int
|
||||||
:param float: None
|
:param var_float: None
|
||||||
:type float: float
|
:type var_float: float
|
||||||
:param string: None
|
:param string: None
|
||||||
:type string: str
|
:type string: str
|
||||||
:param binary: None
|
:param binary: None
|
||||||
@ -2468,7 +2468,7 @@ class FakeApi:
|
|||||||
'integer',
|
'integer',
|
||||||
'int32',
|
'int32',
|
||||||
'int64',
|
'int64',
|
||||||
'float',
|
'var_float',
|
||||||
'string',
|
'string',
|
||||||
'binary',
|
'binary',
|
||||||
'byte_with_max_length',
|
'byte_with_max_length',
|
||||||
@ -2523,8 +2523,8 @@ class FakeApi:
|
|||||||
if _params['number'] is not None:
|
if _params['number'] is not None:
|
||||||
_form_params.append(('number', _params['number']))
|
_form_params.append(('number', _params['number']))
|
||||||
|
|
||||||
if _params['float'] is not None:
|
if _params['var_float'] is not None:
|
||||||
_form_params.append(('float', _params['float']))
|
_form_params.append(('float', _params['var_float']))
|
||||||
|
|
||||||
if _params['double'] is not None:
|
if _params['double'] is not None:
|
||||||
_form_params.append(('double', _params['double']))
|
_form_params.append(('double', _params['double']))
|
||||||
|
@ -32,6 +32,7 @@ class FormatTest(BaseModel):
|
|||||||
int32: Optional[Annotated[int, Field(le=200, strict=True, ge=20)]] = None
|
int32: Optional[Annotated[int, Field(le=200, strict=True, ge=20)]] = None
|
||||||
int64: Optional[StrictInt] = None
|
int64: Optional[StrictInt] = None
|
||||||
number: Annotated[float, Field(le=543.2, strict=True, ge=32.1)]
|
number: Annotated[float, Field(le=543.2, strict=True, ge=32.1)]
|
||||||
|
var_float: Optional[Annotated[float, Field(le=987.6, strict=True, ge=54.3)]] = Field(default=None, alias="float")
|
||||||
double: Optional[Annotated[float, Field(le=123.4, strict=True, ge=67.8)]] = None
|
double: Optional[Annotated[float, Field(le=123.4, strict=True, ge=67.8)]] = None
|
||||||
decimal: Optional[Decimal] = None
|
decimal: Optional[Decimal] = None
|
||||||
string: Optional[Annotated[str, Field(strict=True)]] = None
|
string: Optional[Annotated[str, Field(strict=True)]] = None
|
||||||
@ -45,7 +46,7 @@ class FormatTest(BaseModel):
|
|||||||
pattern_with_digits: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string that is a 10 digit number. Can have leading zeros.")
|
pattern_with_digits: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string that is a 10 digit number. Can have leading zeros.")
|
||||||
pattern_with_digits_and_delimiter: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
pattern_with_digits_and_delimiter: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
|
||||||
additional_properties: Dict[str, Any] = {}
|
additional_properties: Dict[str, Any] = {}
|
||||||
__properties: ClassVar[List[str]] = ["integer", "int32", "int64", "number", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
__properties: ClassVar[List[str]] = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]
|
||||||
|
|
||||||
@field_validator('string')
|
@field_validator('string')
|
||||||
def string_validate_regular_expression(cls, value):
|
def string_validate_regular_expression(cls, value):
|
||||||
@ -135,6 +136,7 @@ class FormatTest(BaseModel):
|
|||||||
"int32": obj.get("int32"),
|
"int32": obj.get("int32"),
|
||||||
"int64": obj.get("int64"),
|
"int64": obj.get("int64"),
|
||||||
"number": obj.get("number"),
|
"number": obj.get("number"),
|
||||||
|
"float": obj.get("float"),
|
||||||
"double": obj.get("double"),
|
"double": obj.get("double"),
|
||||||
"decimal": obj.get("decimal"),
|
"decimal": obj.get("decimal"),
|
||||||
"string": obj.get("string"),
|
"string": obj.get("string"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user