Skip to content

Commit

Permalink
add airflow license
Browse files Browse the repository at this point in the history
  • Loading branch information
Sneha Prabhu authored and Sneha Prabhu committed Nov 22, 2024
1 parent 5a34c32 commit c450ab1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 7 deletions.
21 changes: 19 additions & 2 deletions airflow/api_fastapi/core_api/datamodels/extra_links.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

from pydantic import HttpUrl, RootModel
from typing import Dict


class ExtraLinksResponse(RootModel):
"""Extra Links Response."""

root: Dict[str, HttpUrl]
root: dict[str, HttpUrl]
26 changes: 21 additions & 5 deletions airflow/api_fastapi/core_api/routes/public/extra_links.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from __future__ import annotations

from typing import TYPE_CHECKING

from fastapi import Depends, HTTPException, Request, status
from sqlalchemy.orm import Session
from sqlalchemy.sql import select
from typing_extensions import Annotated
from typing import TYPE_CHECKING

from airflow.api_fastapi.common.db.common import get_session
from airflow.api_fastapi.common.router import AirflowRouter
from airflow.exceptions import TaskNotFound
from airflow.api_fastapi.core_api.openapi.exceptions import create_openapi_http_exception_doc
from airflow.api_fastapi.core_api.datamodels.extra_links import ExtraLinksResponse
from airflow.api_fastapi.core_api.openapi.exceptions import create_openapi_http_exception_doc
from airflow.exceptions import TaskNotFound

if TYPE_CHECKING:
from sqlalchemy.orm.session import Session

from airflow import DAG
from airflow.api_connexion.types import APIResponse
from airflow.models import DAG


Expand Down

0 comments on commit c450ab1

Please sign in to comment.