Skip to content

Commit dfd3b67

Browse files
committed
add comment on endpoint functions nesting
1 parent 86007af commit dfd3b67

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ogc_api_processes_fastapi/endpoints.py

+5
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ def get_conformance(request: fastapi.Request) -> models.ConfClass:
147147
return get_conformance
148148

149149

150+
# The nesting of endpoint functions inside generator functions is needed
151+
# to be able to pass the client to the endpoint function.
152+
# Client is passed as a dependency to the endpoint function so that all its
153+
# arguments are resolved as endpoints parameters and correctly inserted in the
154+
# automatic documentation.
150155
def create_get_processes_endpoint(
151156
client: clients.BaseClient,
152157
) -> Callable[[fastapi.Request], models.ProcessList]:

0 commit comments

Comments
 (0)