ashb commented on a change in pull request #13025:
URL: https://github.com/apache/airflow/pull/13025#discussion_r541312786



##########
File path: airflow/config_templates/config.yml.schema.json
##########
@@ -0,0 +1,57 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#";,
+  "type": "array",
+  "items": {
+    "type": "object",
+    "properties": {
+      "name": {
+        "type": "string"
+      },
+      "description": {
+        "type": ["string", "null"]
+      },
+      "options": {
+        "type": "array",
+        "items": {
+          "type": "object",
+          "properties": {
+            "name": {
+              "type": "string"
+            },
+            "description": {
+              "type": ["string", "null"]
+            },
+            "version_added": {
+              "type": ["string", "null"]
+            },
+            "type": {
+              "type": "string"
+            },
+            "example": {
+              "type": ["string", "null"]
+            },
+            "default": {
+              "type": ["string", "null"]
+            },
+            "sensitive": {
+              "type": "boolean"
+            }
+          },
+          "required": [
+            "name",
+            "description",
+            "version_added",
+            "type",
+            "example",
+            "default"
+          ]

Review comment:
       ```suggestion
             ],
             "additional_properties": false
   ```

##########
File path: airflow/config_templates/config.yml.schema.json
##########
@@ -0,0 +1,57 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#";,
+  "type": "array",
+  "items": {
+    "type": "object",
+    "properties": {
+      "name": {
+        "type": "string"
+      },
+      "description": {
+        "type": ["string", "null"]
+      },
+      "options": {
+        "type": "array",
+        "items": {
+          "type": "object",
+          "properties": {
+            "name": {
+              "type": "string"
+            },
+            "description": {
+              "type": ["string", "null"]
+            },
+            "version_added": {
+              "type": ["string", "null"]
+            },
+            "type": {
+              "type": "string"
+            },
+            "example": {
+              "type": ["string", "null"]
+            },
+            "default": {
+              "type": ["string", "null"]
+            },
+            "sensitive": {
+              "type": "boolean"
+            }
+          },
+          "required": [
+            "name",
+            "description",
+            "version_added",
+            "type",
+            "example",
+            "default"
+          ]
+        }
+      }
+    },
+    "required": [
+      "name",
+      "description",
+      "options"
+    ]

Review comment:
       ```suggestion
       ],
       "additional_properties": false
   ```

##########
File path: airflow/config_templates/config.yml.schema.json
##########
@@ -0,0 +1,57 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#";,
+  "type": "array",
+  "items": {
+    "type": "object",
+    "properties": {
+      "name": {
+        "type": "string"
+      },
+      "description": {
+        "type": ["string", "null"]
+      },
+      "options": {
+        "type": "array",
+        "items": {
+          "type": "object",
+          "properties": {
+            "name": {
+              "type": "string"
+            },
+            "description": {
+              "type": ["string", "null"]
+            },
+            "version_added": {
+              "type": ["string", "null"]
+            },
+            "type": {
+              "type": "string"
+            },
+            "example": {
+              "type": ["string", "null"]
+            },
+            "default": {
+              "type": ["string", "null"]

Review comment:
       This should allow numbers too I think

##########
File path: airflow/config_templates/config.yml.schema.json
##########
@@ -0,0 +1,57 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#";,
+  "type": "array",
+  "items": {
+    "type": "object",
+    "properties": {
+      "name": {
+        "type": "string"
+      },
+      "description": {
+        "type": ["string", "null"]
+      },
+      "options": {
+        "type": "array",
+        "items": {
+          "type": "object",
+          "properties": {
+            "name": {
+              "type": "string"
+            },
+            "description": {
+              "type": ["string", "null"]
+            },
+            "version_added": {
+              "type": ["string", "null"]
+            },
+            "type": {
+              "type": "string"

Review comment:
       Might be worth making this an enum type?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to