pierrejeambrun commented on code in PR #47192:
URL: https://github.com/apache/airflow/pull/47192#discussion_r1977324152


##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -4061,12 +4061,16 @@ paths:
       summary: Delete Pool
       description: Delete a pool entry.
       operationId: delete_pool
+      security:
+      - OAuth2PasswordBearer: []
       parameters:
       - name: pool_name
         in: path
         required: true
         schema:
-          type: string
+          anyOf:
+          - type: string
+          - type: 'null'

Review Comment:
   For instance retrieving directly from the `Request` object. (path params and 
query_params), so this will not update the openapi spec.
   
   ```python
   def requires_access_pool(method: ResourceMethod) -> Callable:
       def inner(
           user: Annotated[BaseUser | None, Depends(get_user)] = None,
           request: Request,
       ) -> None:
           pool_name_path_param = request.path_params....
           pool_name_query_param = request.query_params...
           
           pool_name = ...
           
           def callback():
               return get_auth_manager().is_authorized_pool(
                   method=method, details=PoolDetails(name=pool_name), user=user
               )
   
           _requires_access(
               is_authorized_callback=callback,
           )
   
       return inner
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to