royzhong7070 commented on issue #49064:
URL: https://github.com/apache/airflow/issues/49064#issuecomment-3084156458
Just check that, in airflow 2, the html is render in the backend.
i.e., the api return the rendered html body
the api is something like
```
/rendered-templates?dag_id={dag_id}task_id={task_id}d&execution_date={execution_date}
```
in airflow 3,
the api might be this
```
/api/v2/dags/{dag_id}/dagRuns/{run_id}/taskInstances/{task_id}/-1
```
the response body should have this
```json
rendered_fields
```
seems like we have to render the fields by js, so we have to return
`template_fields_renderers` to the frontend
for example
we have
```json
{"rendered_fields": "sql": "select * from demo"}
```
we need
```json
```
in this api `/api/v2/dags/{dag_id}/tasks/{task_id}`
```json
{"template_fields: {"sql"},
"template_fields_renderers": {"sql": "sql"}
}
```
--
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]