This is an automated email from the ASF dual-hosted git repository.
vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 485ddbf968 Add deprecation information in deprecated endpoints +
geenrate Rest API documentation from fab provider (#36664)
485ddbf968 is described below
commit 485ddbf9683fa889c71d720af9f797ef3a37e71c
Author: Vincent <[email protected]>
AuthorDate: Thu Jan 11 09:41:44 2024 -0500
Add deprecation information in deprecated endpoints + geenrate Rest API
documentation from fab provider (#36664)
---
airflow/api_connexion/openapi/v1.yaml | 22 +++++------
airflow/www/static/js/types/api-generated.ts | 44 +++++++++++-----------
docs/apache-airflow-providers-fab/index.rst | 6 +++
.../stable-rest-api-ref.rst | 23 +++++++++++
docs/conf.py | 19 ++++++++++
5 files changed, 81 insertions(+), 33 deletions(-)
diff --git a/airflow/api_connexion/openapi/v1.yaml
b/airflow/api_connexion/openapi/v1.yaml
index 60f4c2bc62..10c1f6fca8 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -2127,7 +2127,7 @@ paths:
description: |
Get a list of roles.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: get_roles
tags: [Role]
@@ -2153,7 +2153,7 @@ paths:
description: |
Create a new role.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: post_role
tags: [Role]
@@ -2187,7 +2187,7 @@ paths:
description: |
Get a role.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: get_role
tags: [Role]
@@ -2211,7 +2211,7 @@ paths:
description: |
Update a role.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: patch_role
tags: [Role]
@@ -2246,7 +2246,7 @@ paths:
description: |
Delete a role.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: delete_role
tags: [Role]
@@ -2269,7 +2269,7 @@ paths:
description: |
Get a list of permissions.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: get_permissions
tags: [Permission]
@@ -2295,7 +2295,7 @@ paths:
description: |
Get a list of users.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: get_users
tags: [User]
@@ -2321,7 +2321,7 @@ paths:
description: |
Create a new user with unique username and email.
- *New in version 2.2.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: post_user
tags: [User]
@@ -2356,7 +2356,7 @@ paths:
description: |
Get a user with a specific username.
- *New in version 2.1.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: get_user
tags: [User]
@@ -2380,7 +2380,7 @@ paths:
description: |
Update fields for a user.
- *New in version 2.2.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: patch_user
tags: [User]
@@ -2414,7 +2414,7 @@ paths:
description: |
Delete a user with a specific username.
- *New in version 2.2.0*
+ *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
x-openapi-router-controller:
airflow.api_connexion.endpoints.forward_to_fab_endpoint
operationId: delete_user
tags: [User]
diff --git a/airflow/www/static/js/types/api-generated.ts
b/airflow/www/static/js/types/api-generated.ts
index 55ade6179d..884bf3f291 100644
--- a/airflow/www/static/js/types/api-generated.ts
+++ b/airflow/www/static/js/types/api-generated.ts
@@ -676,13 +676,13 @@ export interface paths {
/**
* Get a list of roles.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
get: operations["get_roles"];
/**
* Create a new role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
post: operations["post_role"];
};
@@ -690,19 +690,19 @@ export interface paths {
/**
* Get a role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
get: operations["get_role"];
/**
* Delete a role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
delete: operations["delete_role"];
/**
* Update a role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
patch: operations["patch_role"];
parameters: {
@@ -716,7 +716,7 @@ export interface paths {
/**
* Get a list of permissions.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
get: operations["get_permissions"];
};
@@ -724,13 +724,13 @@ export interface paths {
/**
* Get a list of users.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
get: operations["get_users"];
/**
* Create a new user with unique username and email.
*
- * *New in version 2.2.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
post: operations["post_user"];
};
@@ -738,19 +738,19 @@ export interface paths {
/**
* Get a user with a specific username.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
get: operations["get_user"];
/**
* Delete a user with a specific username.
*
- * *New in version 2.2.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
delete: operations["delete_user"];
/**
* Update fields for a user.
*
- * *New in version 2.2.0*
+ * *This API endpoint is deprecated, please use the endpoint
`/auth/fab/v1` for this operation instead.*
*/
patch: operations["patch_user"];
parameters: {
@@ -4400,7 +4400,7 @@ export interface operations {
/**
* Get a list of roles.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
get_roles: {
parameters: {
@@ -4432,7 +4432,7 @@ export interface operations {
/**
* Create a new role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
post_role: {
responses: {
@@ -4455,7 +4455,7 @@ export interface operations {
/**
* Get a role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
get_role: {
parameters: {
@@ -4479,7 +4479,7 @@ export interface operations {
/**
* Delete a role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
delete_role: {
parameters: {
@@ -4500,7 +4500,7 @@ export interface operations {
/**
* Update a role.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
patch_role: {
parameters: {
@@ -4537,7 +4537,7 @@ export interface operations {
/**
* Get a list of permissions.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
get_permissions: {
parameters: {
@@ -4562,7 +4562,7 @@ export interface operations {
/**
* Get a list of users.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
get_users: {
parameters: {
@@ -4594,7 +4594,7 @@ export interface operations {
/**
* Create a new user with unique username and email.
*
- * *New in version 2.2.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
post_user: {
responses: {
@@ -4618,7 +4618,7 @@ export interface operations {
/**
* Get a user with a specific username.
*
- * *New in version 2.1.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
get_user: {
parameters: {
@@ -4646,7 +4646,7 @@ export interface operations {
/**
* Delete a user with a specific username.
*
- * *New in version 2.2.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
delete_user: {
parameters: {
@@ -4671,7 +4671,7 @@ export interface operations {
/**
* Update fields for a user.
*
- * *New in version 2.2.0*
+ * *This API endpoint is deprecated, please use the endpoint `/auth/fab/v1`
for this operation instead.*
*/
patch_user: {
parameters: {
diff --git a/docs/apache-airflow-providers-fab/index.rst
b/docs/apache-airflow-providers-fab/index.rst
index 1e39f27e18..dea679a69c 100644
--- a/docs/apache-airflow-providers-fab/index.rst
+++ b/docs/apache-airflow-providers-fab/index.rst
@@ -37,6 +37,12 @@
Configuration <configurations-ref>
Auth manager <auth-manager/index>
+.. toctree::
+ :hidden:
+ :caption: References
+
+ Stable REST API <stable-rest-api-ref>
+
.. toctree::
:hidden:
:maxdepth: 1
diff --git a/docs/apache-airflow-providers-fab/stable-rest-api-ref.rst
b/docs/apache-airflow-providers-fab/stable-rest-api-ref.rst
new file mode 100644
index 0000000000..673b88cc35
--- /dev/null
+++ b/docs/apache-airflow-providers-fab/stable-rest-api-ref.rst
@@ -0,0 +1,23 @@
+
+ .. 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.
+
+REST API Reference
+==================
+
+It's a stub file. It will be converted automatically during the build process
+to the valid documentation by the Sphinx plugin. See: /docs/conf.py
diff --git a/docs/conf.py b/docs/conf.py
index 053812b6dc..73217330c9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -832,6 +832,25 @@ if PACKAGE_NAME == "apache-airflow":
# Options for script updater
redoc_script_url =
"https://cdn.jsdelivr.net/npm/[email protected]/bundles/redoc.standalone.js"
+elif PACKAGE_NAME == "apache-airflow-providers-fab":
+ OPENAPI_FILE = os.path.join(
+ os.path.dirname(__file__), "..", "airflow", "providers", "fab",
"auth_manager", "openapi", "v1.yaml"
+ )
+ redoc = [
+ {
+ "name": "Fab provider REST API",
+ "page": "stable-rest-api-ref",
+ "spec": OPENAPI_FILE,
+ "opts": {
+ "hide-hostname": True,
+ "no-auto-auth": True,
+ },
+ },
+ ]
+
+ # Options for script updater
+ redoc_script_url =
"https://cdn.jsdelivr.net/npm/[email protected]/bundles/redoc.standalone.js"
+
def skip_util_classes(app, what, name, obj, skip, options):
if what == "data" and "STATICA_HACK" in name: