Skip to content

Commit

Permalink
Fix incorrect default on readonly property in our API
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk committed Jul 11, 2023
1 parent 3b97eb0 commit bcacf52
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion airflow/api_connexion/openapi/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2892,7 +2892,6 @@ components:
$ref: '#/components/schemas/DagState'
external_trigger:
type: boolean
default: true
readOnly: true
conf:
type: object
Expand Down
1 change: 0 additions & 1 deletion airflow/www/static/js/types/api-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bcacf52

Please # to comment.