This is an automated email from the ASF dual-hosted git repository.
potiuk 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 d6a4f851e0 Fix incorrect default on readonly property in our API
(#32510)
d6a4f851e0 is described below
commit d6a4f851e0a0c3d99b327b7fca23fa002a915df7
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Jul 11 09:06:26 2023 +0200
Fix incorrect default on readonly property in our API (#32510)
The new version of openapi-spec-validator (0.6.0) started to
detect a bug in our API specification - readonly values cannot
have defaults (by definition).
This PR fixes the problem and also bumps the openapi-spec-validator
to >= 0.6.0 to make sure it is used everywhere.
---
.pre-commit-config.yaml | 2 +-
airflow/api_connexion/openapi/v1.yaml | 1 -
airflow/www/static/js/types/api-generated.ts | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 15e1399a0c..11ce7b2f28 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -317,7 +317,7 @@ repos:
name: Lint OpenAPI using openapi-spec-validator
entry: openapi-spec-validator --schema 3.0.0
language: python
- additional_dependencies: ['openapi-spec-validator']
+ additional_dependencies: ['openapi-spec-validator>=0.6.0']
files: ^airflow/api_connexion/openapi/
- id: lint-dockerfile
name: Lint Dockerfile
diff --git a/airflow/api_connexion/openapi/v1.yaml
b/airflow/api_connexion/openapi/v1.yaml
index 6e3faa2f24..8c2b4b1912 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -2892,7 +2892,6 @@ components:
$ref: '#/components/schemas/DagState'
external_trigger:
type: boolean
- default: true
readOnly: true
conf:
type: object
diff --git a/airflow/www/static/js/types/api-generated.ts
b/airflow/www/static/js/types/api-generated.ts
index bcb18ad0e9..9d60b6de8f 100644
--- a/airflow/www/static/js/types/api-generated.ts
+++ b/airflow/www/static/js/types/api-generated.ts
@@ -1076,7 +1076,6 @@ export interface components {
/** @enum {string} */
run_type?: "backfill" | "manual" | "scheduled" | "dataset_triggered";
state?: components["schemas"]["DagState"];
- /** @default true */
external_trigger?: boolean;
/**
* @description JSON object describing additional configuration
parameters.