uranusjr commented on a change in pull request #22227: URL: https://github.com/apache/airflow/pull/22227#discussion_r825528294
########## File path: airflow/api_connexion/schemas/connection_schema.py ########## @@ -44,7 +46,30 @@ class ConnectionSchema(ConnectionCollectionItemSchema): """Connection schema""" password = auto_field(load_only=True) - extra = auto_field() + extra = fields.Method('get_extra', deserialize='set_extra') + + @staticmethod + def get_extra(obj: Connection): + if obj.extra is None: + return + from airflow.utils.log.secrets_masker import redact + + try: + extra = json.loads(obj.extra) + return str(redact(extra)) Review comment: Should this use `json.dumps`? -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org