Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove "/" at end from FastAPI endpoints routes #44218

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/backfills/:
/public/backfills:
get:
tags:
- Backfill
Expand Down Expand Up @@ -1219,7 +1219,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/connections/:
/public/connections:
get:
tags:
- Connection
Expand Down Expand Up @@ -1736,7 +1736,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/dagStats/:
/public/dagStats:
get:
tags:
- DagStats
Expand Down Expand Up @@ -2018,7 +2018,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/dags/:
/public/dags:
get:
tags:
- DAG
Expand Down Expand Up @@ -2577,7 +2577,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/eventLogs/:
/public/eventLogs:
get:
tags:
- Event Log
Expand Down Expand Up @@ -2772,7 +2772,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/importErrors/:
/public/importErrors:
get:
tags:
- Import Error
Expand Down Expand Up @@ -2828,7 +2828,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/plugins/:
/public/plugins:
get:
tags:
- Plugin
Expand Down Expand Up @@ -3033,7 +3033,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/pools/:
/public/pools:
get:
tags:
- Pool
Expand Down Expand Up @@ -3095,19 +3095,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/pools:
post:
tags:
- Pool
summary: Post Pool
description: Create a Pool.
operationId: post_pool
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PoolPostBody'
required: true
responses:
'201':
description: Successful Response
Expand All @@ -3116,24 +3115,24 @@ paths:
schema:
$ref: '#/components/schemas/PoolResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPExceptionResponse'
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPExceptionResponse'
description: Forbidden
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/providers/:
/public/providers:
get:
tags:
- Provider
Expand Down Expand Up @@ -4030,7 +4029,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/dags/{dag_id}/tasks/:
/public/dags/{dag_id}/tasks:
get:
tags:
- Task
Expand Down Expand Up @@ -4295,7 +4294,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/variables/:
/public/variables:
get:
tags:
- Variable
Expand Down Expand Up @@ -4495,7 +4494,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HealthInfoSchema'
/public/version/:
/public/version:
get:
tags:
- Version
Expand Down
4 changes: 2 additions & 2 deletions airflow/api_fastapi/core_api/routes/public/backfills.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


@backfills_router.get(
path="/",
path="",
)
def list_backfills(
dag_id: str,
Expand Down Expand Up @@ -176,7 +176,7 @@ def cancel_backfill(backfill_id, session: Annotated[Session, Depends(get_session


@backfills_router.post(
path="/",
path="",
responses=create_openapi_http_exception_doc(
[
status.HTTP_404_NOT_FOUND,
Expand Down
4 changes: 2 additions & 2 deletions airflow/api_fastapi/core_api/routes/public/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_connection(


@connections_router.get(
"/",
"",
responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]),
)
def get_connections(
Expand Down Expand Up @@ -119,7 +119,7 @@ def get_connections(


@connections_router.post(
"/",
"",
status_code=status.HTTP_201_CREATED,
responses=create_openapi_http_exception_doc([status.HTTP_409_CONFLICT]),
)
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/dag_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


@dag_stats_router.get(
"/",
"",
responses=create_openapi_http_exception_doc(
[
status.HTTP_400_BAD_REQUEST,
Expand Down
4 changes: 2 additions & 2 deletions airflow/api_fastapi/core_api/routes/public/dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
dags_router = AirflowRouter(tags=["DAG"], prefix="/dags")


@dags_router.get("/")
@dags_router.get("")
def get_dags(
limit: QueryLimit,
offset: QueryOffset,
Expand Down Expand Up @@ -223,7 +223,7 @@ def patch_dag(


@dags_router.patch(
"/",
"",
responses=create_openapi_http_exception_doc(
[
status.HTTP_400_BAD_REQUEST,
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/event_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get_event_log(


@event_logs_router.get(
"/",
"",
)
def get_event_logs(
limit: QueryLimit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_import_error(


@import_error_router.get(
"/",
"",
)
def get_import_errors(
limit: QueryLimit,
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
plugins_router = AirflowRouter(tags=["Plugin"], prefix="/plugins")


@plugins_router.get("/")
@plugins_router.get("")
def get_plugins(
limit: QueryLimit,
offset: QueryOffset,
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_pool(


@pools_router.get(
"/",
"",
responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]),
)
def get_pools(
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _provider_mapper(provider: ProviderInfo) -> ProviderResponse:
)


@providers_router.get("/")
@providers_router.get("")
def get_providers(
limit: QueryLimit,
offset: QueryOffset,
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


@tasks_router.get(
"/",
"",
responses=create_openapi_http_exception_doc(
[
status.HTTP_400_BAD_REQUEST,
Expand Down
4 changes: 2 additions & 2 deletions airflow/api_fastapi/core_api/routes/public/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_variable(


@variables_router.get(
"/",
"",
)
def get_variables(
limit: QueryLimit,
Expand Down Expand Up @@ -144,7 +144,7 @@ def patch_variable(


@variables_router.post(
"/",
"",
status_code=status.HTTP_201_CREATED,
)
def post_variable(
Expand Down
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/routes/public/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
version_router = AirflowRouter(tags=["Version"], prefix="/version")


@version_router.get("/")
@version_router.get("")
def get_version() -> VersionInfo:
"""Get version information."""
airflow_version = airflow.__version__
Expand Down
Loading