Skip to content

Commit 62b93fc

Browse files
aykutakinwing328
authored andcommitted
[Python][Flask] Handles UUID format - Fixes #7469 (#7507)
1 parent 62a9302 commit 62b93fc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/swagger-codegen/src/main/resources/flaskConnexion/controller.mustache

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@ def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{
1919
{{#isPrimitiveType}}
2020
:type {{paramName}}: {{>param_type}}
2121
{{/isPrimitiveType}}
22+
{{#isUuid}}
23+
:type {{paramName}}: {{>param_type}}
24+
{{/isUuid}}
2225
{{^isPrimitiveType}}
2326
{{#isFile}}
2427
:type {{paramName}}: werkzeug.datastructures.FileStorage
2528
{{/isFile}}
2629
{{^isFile}}
30+
{{^isUuid}}
2731
:type {{paramName}}: dict | bytes
32+
{{/isUuid}}
2833
{{/isFile}}
2934
{{/isPrimitiveType}}
3035
{{/isContainer}}
@@ -62,8 +67,10 @@ def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{
6267
{{/isDateTime}}
6368
{{^isPrimitiveType}}
6469
{{^isFile}}
70+
{{^isUuid}}
6571
if connexion.request.is_json:
6672
{{paramName}} = {{baseType}}.from_dict(connexion.request.get_json()) # noqa: E501
73+
{{/isUuid}}
6774
{{/isFile}}
6875
{{/isPrimitiveType}}
6976
{{/isContainer}}

0 commit comments

Comments
 (0)