@@ -276,6 +276,21 @@ def create_specification() -> Specification:
276276 {"Basic" : []}
277277 ]
278278
279+ uuid_parameters = [
280+ Parameter (
281+ name = "uuid" ,
282+ location = ParameterLocation .PATH ,
283+ description = "User unique id" ,
284+ required = True ,
285+ explode = False ,
286+ style = PathParameterStyle .SIMPLE ,
287+ schema = String (
288+ type = DataType .STRING ,
289+ format = StringFormat .UUID ,
290+ ),
291+ ),
292+ ]
293+
279294 path_list : list [Path ] = [
280295 Path (
281296 url = "/users" ,
@@ -356,27 +371,15 @@ def create_specification() -> Specification:
356371 ),
357372 Path (
358373 url = "/users/{uuid}" ,
359- parameters = [
360- Parameter (
361- name = "uuid" ,
362- location = ParameterLocation .PATH ,
363- description = "User unique id" ,
364- required = True ,
365- explode = False ,
366- style = PathParameterStyle .SIMPLE ,
367- schema = String (
368- type = DataType .STRING ,
369- format = StringFormat .UUID ,
370- ),
371- ),
372- ],
374+ parameters = uuid_parameters ,
373375 operations = [
374376 Operation (
375377 method = OperationMethod .GET ,
376378 summary = "Get user model" ,
377379 description = "Method to get user details" ,
378380 operation_id = "GetUser" ,
379381 tags = ["Users" ],
382+ parameters = uuid_parameters ,
380383 responses = [
381384 Response (
382385 code = 200 ,
@@ -407,6 +410,7 @@ def create_specification() -> Specification:
407410 summary = "Update existed user model" ,
408411 operation_id = "UpdateUser" ,
409412 tags = ["Users" ],
413+ parameters = uuid_parameters ,
410414 responses = [
411415 Response (code = None , description = "Empty successful response" , is_default = True ),
412416 Response (code = 200 , description = "Empty successful response" , is_default = False ),
0 commit comments