ashb commented on code in PR #74084:
URL: https://github.com/apache/airflow/pull/74084#discussion_r4237951951


##########
task-sdk/src/airflow/sdk/importers/yaml_importer/schema.json:
##########
@@ -0,0 +1,361 @@
+{
+  "$defs": {
+    "ConstRef": {
+      "additionalProperties": false,
+      "description": "Force a literal; the value is taken verbatim.",
+      "oneOf": [
+        {
+          "required": [
+            "$const"
+          ]
+        }
+      ],
+      "properties": {
+        "$const": {
+          "title": "$Const"
+        }
+      },
+      "title": "ConstRef",
+      "type": "object"
+    },
+    "Task": {
+      "additionalProperties": true,
+      "anyOf": [
+        {
+          "required": [
+            "uses"
+          ]
+        },
+        {
+          "required": [
+            "run"
+          ]
+        },
+        {
+          "required": [
+            "extends"
+          ]
+        }
+      ],
+      "description": "A ready-made operator (uses) or task with custom code 
(run).",
+      "not": {
+        "required": [
+          "uses",
+          "run"
+        ]
+      },
+      "properties": {
+        "id": {
+          "title": "Id",
+          "type": "string"
+        },
+        "needs": {
+          "items": {
+            "type": "string"
+          },
+          "title": "Needs",
+          "type": "array"
+        },
+        "extends": {
+          "anyOf": [
+            {
+              "type": "string"
+            },
+            {
+              "items": {
+                "type": "string"
+              },
+              "type": "array"
+            }

Review Comment:
   Same sort of thing here, so yes, all `anyOf` need to get transformed to 
`oneOf` (even though in this case it is "impossible" to match more than one, 
parser code generated from this still tries to, and it makes the generated code 
for, for example Go, nigh-on-impossible to use as a result.)



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to