Add version to REST API url

This commit is contained in:
Ashwin Bharambe 2024-11-18 18:53:06 -08:00
parent 7693786322
commit c73fe390ad
18 changed files with 32837 additions and 6032 deletions

View file

@ -202,7 +202,9 @@ class ContentBuilder:
) -> MediaType:
schema = self.schema_builder.classdef_to_ref(item_type)
if self.schema_transformer:
schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = self.schema_transformer # type: ignore
schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = (
self.schema_transformer
) # type: ignore
schema = schema_transformer(schema)
if not examples:
@ -630,6 +632,7 @@ class Generator:
raise NotImplementedError(f"unknown HTTP method: {op.http_method}")
route = op.get_route()
print(f"route: {route}")
if route in paths:
paths[route].update(pathItem)
else: