You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/30 12:51:53 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #22580: Add variable description

ephraimbuddy commented on a change in pull request #22580:
URL: https://github.com/apache/airflow/pull/22580#discussion_r838499314



##########
File path: airflow/api_connexion/schemas/variable_schema.py
##########
@@ -23,7 +23,7 @@ class VariableSchema(Schema):
 
     key = fields.String(required=True)
     value = fields.String(attribute="val", required=True)
-
+    description = fields.String(attribute="description", required=True)

Review comment:
       I don't think ``description`` should be a required field

##########
File path: airflow/api_connexion/endpoints/variable_endpoint.py
##########
@@ -46,7 +46,7 @@ def get_variable(*, variable_key: str) -> Response:
         var = Variable.get(variable_key)
     except KeyError:
         raise NotFound("Variable not found")
-    return variable_schema.dump({"key": variable_key, "val": var})
+    return variable_schema.dump({"key": variable_key, "val": var, "description": description})

Review comment:
       I don't understand where the `description` here is coming from




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org