Sync fastapi docs from 11614be9 on 2026-03-11
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
file_path = Path("./openapi.json")
|
||||
openapi_content = json.loads(file_path.read_text())
|
||||
|
||||
for path_data in openapi_content["paths"].values():
|
||||
for operation in path_data.values():
|
||||
tag = operation["tags"][0]
|
||||
operation_id = operation["operationId"]
|
||||
to_remove = f"{tag}-"
|
||||
new_operation_id = operation_id[len(to_remove) :]
|
||||
operation["operationId"] = new_operation_id
|
||||
|
||||
file_path.write_text(json.dumps(openapi_content))
|
||||
Reference in New Issue
Block a user