Home / File/ tutorial004_py39.py — fastapi Source File

tutorial004_py39.py — fastapi Source File

Architecture documentation for tutorial004_py39.py, a python file in the fastapi codebase. 2 imports, 0 dependents.

File python FastAPI Applications 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  719a8956_d65d_ec95_0e8e_5d7dfa5ea257["tutorial004_py39.py"]
  c1ef60e8_e635_2e82_29e5_a79e03e975d6["json"]
  719a8956_d65d_ec95_0e8e_5d7dfa5ea257 --> c1ef60e8_e635_2e82_29e5_a79e03e975d6
  b3e303a2_3f2d_638d_930c_3a5dcc2f5a42["pathlib"]
  719a8956_d65d_ec95_0e8e_5d7dfa5ea257 --> b3e303a2_3f2d_638d_930c_3a5dcc2f5a42
  style 719a8956_d65d_ec95_0e8e_5d7dfa5ea257 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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))

Domain

Subdomains

Functions

Dependencies

  • json
  • pathlib

Frequently Asked Questions

What does tutorial004_py39.py do?
tutorial004_py39.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Applications subdomain.
What functions are defined in tutorial004_py39.py?
tutorial004_py39.py defines 1 function(s): operation.
What does tutorial004_py39.py depend on?
tutorial004_py39.py imports 2 module(s): json, pathlib.
Where is tutorial004_py39.py in the architecture?
tutorial004_py39.py is located at docs_src/generate_clients/tutorial004_py39.py (domain: FastAPI, subdomain: Applications, directory: docs_src/generate_clients).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free