ColtenOuO commented on code in PR #72470:
URL: https://github.com/apache/airflow/pull/72470#discussion_r3924212554


##########
airflow-core/src/airflow/api_fastapi/common/headers.py:
##########
@@ -27,10 +27,18 @@ def header_accept_json_or_text_depends(
     accept: Annotated[
         str,
         Header(
+            description="The response content type to negotiate for.",
+            # Listed as "examples", not "enum": a real Accept header isn't 
restricted to
+            # these exact literals (it may carry q-values, be comma-separated, 
etc.), and
+            # an "enum" containing the literal "*/*" gets rendered by some 
OpenAPI client
+            # generators (notably the Java generator) as a named enum constant 
whose
+            # generated Javadoc embeds that raw value - the "*/" inside it 
prematurely
+            # closes the Javadoc comment block and breaks the generated client.
+            # See https://github.com/apache/airflow/issues/72466
             json_schema_extra={
                 "type": "string",
-                "enum": [Mimetype.JSON, Mimetype.TEXT, Mimetype.ANY],
-            }
+                "examples": [Mimetype.JSON, Mimetype.TEXT, Mimetype.ANY],

Review Comment:
   Have you tested generating the Java client using OpenAPI Generator 7.22.0 
(currently specified by Airflow)?
   
   If the Mimetype.ANY parameter is present, the OpenAPI schema should still 
generate default: '*/*'.



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