jason810496 commented on code in PR #43841:
URL: https://github.com/apache/airflow/pull/43841#discussion_r1847615360
##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -1439,6 +1442,154 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
+ /public/config/:
+ get:
+ tags:
+ - Config
+ summary: Get Config
+ operationId: get_config
+ parameters:
+ - name: section
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Section
+ - name: accept
+ in: header
+ required: false
+ schema:
+ type: string
+ enum:
+ - application/json
+ - text/plain
+ default: '*/*'
+ title: Accept
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Config'
+ text/plain:
+ schema:
+ type: string
+ example: '[core]
+
+ dags_folder = /opt/airflow/dags
+
+ base_log_folder = /opt/airflow/logs
+
+ '
+ '401':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPExceptionResponse'
+ description: Unauthorized
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPExceptionResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPExceptionResponse'
+ description: Not Found
+ '406':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPExceptionResponse'
+ description: Not Acceptable
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /public/config/section/{section}/option/{option}:
+ get:
+ tags:
+ - Config
+ summary: Get Config Value
+ operationId: get_config_value
+ parameters:
+ - name: section
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Section
+ - name: option
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Option
+ - name: accept
+ in: header
+ required: false
+ schema:
+ type: string
+ enum:
+ - application/json
+ - text/plain
+ default: '*/*'
+ title: Accept
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Config'
+ text/plain:
+ schema:
+ type: string
+ example: '[core]
+
Review Comment:
Hi @pierrejeambrun
The OpenAPI schema at `http://localhost:29091/docs#/Config/get_config`
appears to be formatted correctly:
<img width="544" alt="get_config OpenAPI schema"
src="https://github.com/user-attachments/assets/866ebd28-1385-4017-ae3a-4fd6652d861d">
The line breaks are introduced by the auto-generation script
(`scripts/ci/pre_commit/update_fastapi_api_spec.py`, which runs
`scripts/in_container/run_update_fastapi_api_spec.py` using `get_openapi`
provided by `FastAPI`).
I prefer not to manually remove the line breaks because once this PR is
merged, the line breaks will be reintroduced when others run the pre-commit
script. wdyt ?
--
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]