why in python function takes self as arguments but 1 was given code example
Example: TypeError: custom_openapi() takes 0 positional arguments but 1 was given
Replace this in the docs:
def custom_openapi():
with this:
def custom_openapi(root_path):