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


##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -13,12 +13,16 @@ paths:
       - Asset
       summary: Next Run Assets
       operationId: next_run_assets
+      security:
+      - OAuth2PasswordBearer: []
       parameters:
       - name: dag_id
         in: path
         required: true
         schema:
-          type: string
+          anyOf:
+          - type: string
+          - type: 'null'

Review Comment:
   This schema update is not normal.
   
   That's because the permission decorator update the spec. The reason for that 
is because we to:
   ```
       def inner(
           user: Annotated[BaseUser, Depends(get_user)],
           dag_id: str | None = None,
       ) -> None:\
   ```
   
   Similarly to other access function (check pool for example), we should 
   ```
       dag_id = request.path_params.get("dag_id") # instead of having the 
`dag_id` declared as a parameter.
   ```
   
   It will solve the problem.



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