Skip to content

Add tests for json headers (python) - #25112

Merged
wing328 merged 1 commit into
masterfrom
followup-25068
Oct 4, 2026
Merged

wing328 merged 1 commit into
masterfrom
followup-25068

Conversation

@wing328

@wing328 wing328 commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

a follow up pr to #25068

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@wing328
wing328 marked this pull request as ready for review October 4, 2026 14:42
@wing328 wing328 added this to the 7.26.0 milestone Oct 4, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32 issues found across 84 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="samples/openapi3/client/petstore/python-httpx/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx/test/test_header_arg.py:46">
P2: `testHeaderArg` performs no checks, so this newly added test passes regardless of whether JSON-header behavior works. Add an active assertion that exercises the intended behavior.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2/docs/FakeApi.md:2308">
P2: This type link resolves to `.md` instead of the sibling `HeaderArg.md`, so readers cannot open the model documentation. Link to `HeaderArg.md`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1/test/test_header_arg.py:49">
P2: `testHeaderArg` passes without exercising `HeaderArg`: both setup calls are commented out, and `make_instance`'s construction code is also inside a string literal. Add an assertion that checks the intended header-argument behavior.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2-sync/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2-sync/docs/FakeApi.md:2376">
P3: The `HeaderArg` type link points to `.md`, so readers cannot open the model documentation. Link it to `HeaderArg.md`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_header_arg.py:49">
P2: `testHeaderArg` only contains commented-out setup, so this file adds no executable coverage for `HeaderArg` JSON handling. Add an assertion that serializes and deserializes a populated model.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2-sync/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2-sync/docs/HeaderArg.md:21">
P2: This example calls the instance method on the class, so it raises `TypeError`. Call `to_json()` on `header_arg_instance` instead.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HeaderArg.md:20">
P2: This example does not run under the documented Python 3 requirement: the print syntax is invalid, and `to_json` must be called on the instance. Use `print(header_arg_instance.to_json())`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-lazyImports/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-lazyImports/docs/FakeApi.md:2308">
P2: The `HeaderArg` link resolves to `.md`, so readers cannot open the referenced model documentation. Link it to `HeaderArg.md`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx-sync/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx-sync/docs/HeaderArg.md:21">
P2: This example calls the instance method without an instance, so it raises `TypeError`. Serialize the instance created above instead.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-aiohttp/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-aiohttp/docs/HeaderArg.md:21">
P2: The example calls `to_json` on the class, but it is an instance method and raises `TypeError`; serialize `header_arg_instance` instead.</violation>
</file>

<file name="samples/openapi3/client/petstore/python/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python/docs/HeaderArg.md:21">
P2: The example calls the instance method on `HeaderArg`, so running it raises `TypeError`; serialize `header_arg_instance` instead.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx-sync/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx-sync/docs/FakeApi.md:2376">
P3: This link resolves to `.md`, not the `HeaderArg` model documentation; change the target to `HeaderArg.md`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python/test/test_header_arg.py:46">
P2: `testHeaderArg` always passes without checking the JSON header serialization this PR is meant to cover. Add an assertion that exercises `X-Json-Arg` serialization.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py:4885">
P1: `X-Json-Arg` is declared as a `content: application/json` header, but the pydantic-v1 generated client assigns the raw `HeaderArg` object instead of a JSON string. `api_client.sanitize_for_serialization` later converts it to a dict, and the transport stringifies that as a Python repr (`{'path': 'x', ...}`), which is not valid JSON. The pydantic-v2 templates handle this via `x-python-json-header` (json.dumps(sanitize_for_serialization(...)), see `modules/openapi-generator/src/main/resources/python/api.mustache`), but `python-pydantic-v1/api.mustache` (lines 226-234) only emits the plain assignment, so this endpoint — the whole point of the PR — mis-serializes its header in both `python-pydantic-v1` and `python-pydantic-v1-aiohttp` samples. Add the same json-header handling to the pydantic-v1 template (`_header_params['X-Json-Arg'] = json.dumps(self.api_client.sanitize_for_serialization(_params['x_json_arg']))`, importing `json`), then regenerate.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx/docs/HeaderArg.md:21">
P2: This calls the instance method on the class, so running the example raises `TypeError` for missing `self`. Call `header_arg_instance.to_json()` instead.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-lazyImports/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-lazyImports/docs/HeaderArg.md:21">
P2: This example calls `to_json` on the class, but `to_json` requires a model instance. Call `header_arg_instance.to_json()` so the example runs.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2-sync/petstore_api/api/fake_api.py">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2-sync/petstore_api/api/fake_api.py:12711">
P2: This assignment overwrites a caller-supplied `X-Json-Arg`, despite `_headers` being documented to override spec headers; the same happens for `X-Plain-Arg`. Apply explicit `_headers` after generated header parameters.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1/docs/HeaderArg.md:20">
P2: This example fails under the supported Python 3 and calls `to_json` on the class even though it is an instance method. Use `print(header_arg_instance.to_json())`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-lazyImports/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-lazyImports/test/test_header_arg.py:48">
P2: This test passes without constructing `HeaderArg` or asserting any behavior, so it provides no coverage for the JSON-header case. Implement the fixture and add assertions that exercise the intended behavior.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md:2308">
P3: The `HeaderArg` type link points to `.md`, so readers cannot open the model documentation. Link it to `HeaderArg.md`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2/docs/HeaderArg.md">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2/docs/HeaderArg.md:21">
P2: `to_json` is an instance method, so this call raises `TypeError` because `self` is missing. Serialize `header_arg_instance` instead.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md:2333">
P3: The `HeaderArg` type link points to `.md` instead of its generated `HeaderArg.md` page. Correct the link so readers can open the model documentation.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md:2333">
P3: The `x_json_arg` type link resolves to `.md`, so readers cannot open the `HeaderArg` schema. Link it to `HeaderArg.md`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-aiohttp/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-aiohttp/test/test_header_arg.py:46">
P2: `testHeaderArg` passes without constructing `HeaderArg` or asserting anything, so this new test does not verify JSON-header behavior. Add assertions for its JSON serialization and round trip.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx-sync/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx-sync/test/test_header_arg.py:46">
P2: `testHeaderArg` always passes without exercising `HeaderArg`; add assertions for its JSON serialization and round trip so this file provides actual test coverage.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md:2308">
P2: The `HeaderArg` link resolves to `.md` instead of the generated model page. Change the target to `HeaderArg.md` so users can open the parameter type documentation.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2-sync/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2-sync/test/test_header_arg.py:48">
P2: `testHeaderArg` passes without exercising `HeaderArg`: its setup is a string literal and both test calls are commented out. Add an active assertion for the behavior this test is intended to cover.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-httpx2/test/test_header_arg.py">

<violation number="1" location="samples/openapi3/client/petstore/python-httpx2/test/test_header_arg.py:46">
P2: `testHeaderArg` is a no-op, so this newly added test provides no coverage for `HeaderArg` or its JSON behavior. Add executable assertions instead of leaving the generated stub empty.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py">

<violation number="1" location="samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py:9183">
P2: This assignment overwrites a caller-supplied `_headers['X-Json-Arg']`, so `_headers` cannot override this operation header as documented. Preserve explicit header overrides when adding the generated value.</violation>
</file>

<file name="samples/openapi3/client/petstore/python/docs/FakeApi.md">

<violation number="1" location="samples/openapi3/client/petstore/python/docs/FakeApi.md:2308">
P3: The parameter docs link the `HeaderArg` model to `.md`, which is a broken link. Every other model reference in these docs uses the model filename (e.g. `[**Pet**](Pet.md)`, `[**OuterComposite**](OuterComposite.md)`), so this is a new regression introduced by this endpoint. `api_doc.mustache` renders `[**{{dataType}}**]({{baseType}}.md)` and `baseType` resolves empty for this header parameter; the empty baseType should be fixed in the codegen instead of emitting `.md`. The broken link is emitted in all seven regenerated `docs/FakeApi.md` files (python, aiohttp, httpx, httpx2, httpx-sync, httpx2-sync, lazyImports, pydantic-v1, pydantic-v1-aiohttp).</violation>
</file>

<file name="samples/client/petstore/java/rest-assured-jackson3/src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java">

<violation number="1" location="samples/client/petstore/java/rest-assured-jackson3/src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java:32">
P2: `super.setupModule` runs while this module has no deserializers, so Jackson never registers these handlers with the mapper. Add them before calling `super.setupModule`.</violation>
</file>

<file name="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py">

<violation number="1" location="samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py:4343">
P1: `X-Json-Arg` is passed as a model and becomes a dict, which `aiohttp` cannot use as an HTTP header value. JSON-encode it before adding it to the header map, for example with `to_json()`.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

# process the header parameters
_header_params = dict(_params.get('_headers', {}))
if _params['x_json_arg'] is not None:
_header_params['X-Json-Arg'] = _params['x_json_arg']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: X-Json-Arg is declared as a content: application/json header, but the pydantic-v1 generated client assigns the raw HeaderArg object instead of a JSON string. api_client.sanitize_for_serialization later converts it to a dict, and the transport stringifies that as a Python repr ({'path': 'x', ...}), which is not valid JSON. The pydantic-v2 templates handle this via x-python-json-header (json.dumps(sanitize_for_serialization(...)), see modules/openapi-generator/src/main/resources/python/api.mustache), but python-pydantic-v1/api.mustache (lines 226-234) only emits the plain assignment, so this endpoint — the whole point of the PR — mis-serializes its header in both python-pydantic-v1 and python-pydantic-v1-aiohttp samples. Add the same json-header handling to the pydantic-v1 template (_header_params['X-Json-Arg'] = json.dumps(self.api_client.sanitize_for_serialization(_params['x_json_arg'])), importing json), then regenerate.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py, line 4885:

<comment>`X-Json-Arg` is declared as a `content: application/json` header, but the pydantic-v1 generated client assigns the raw `HeaderArg` object instead of a JSON string. `api_client.sanitize_for_serialization` later converts it to a dict, and the transport stringifies that as a Python repr (`{'path': 'x', ...}`), which is not valid JSON. The pydantic-v2 templates handle this via `x-python-json-header` (json.dumps(sanitize_for_serialization(...)), see `modules/openapi-generator/src/main/resources/python/api.mustache`), but `python-pydantic-v1/api.mustache` (lines 226-234) only emits the plain assignment, so this endpoint — the whole point of the PR — mis-serializes its header in both `python-pydantic-v1` and `python-pydantic-v1-aiohttp` samples. Add the same json-header handling to the pydantic-v1 template (`_header_params['X-Json-Arg'] = json.dumps(self.api_client.sanitize_for_serialization(_params['x_json_arg']))`, importing `json`), then regenerate.</comment>

<file context>
@@ -4773,6 +4774,146 @@ def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field(
+        # process the header parameters
+        _header_params = dict(_params.get('_headers', {}))
+        if _params['x_json_arg'] is not None:
+            _header_params['X-Json-Arg'] = _params['x_json_arg']
+
+        if _params['x_plain_arg'] is not None:
</file context>

# process the header parameters
_header_params = dict(_params.get('_headers', {}))
if _params['x_json_arg'] is not None:
_header_params['X-Json-Arg'] = _params['x_json_arg']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: X-Json-Arg is passed as a model and becomes a dict, which aiohttp cannot use as an HTTP header value. JSON-encode it before adding it to the header map, for example with to_json().

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py, line 4343:

<comment>`X-Json-Arg` is passed as a model and becomes a dict, which `aiohttp` cannot use as an HTTP header value. JSON-encode it before adding it to the header map, for example with `to_json()`.</comment>

<file context>
@@ -4246,6 +4247,130 @@ async def test_json_form_data_with_http_info(self, param : Annotated[StrictStr,
+        # process the header parameters
+        _header_params = dict(_params.get('_headers', {}))
+        if _params['x_json_arg'] is not None:
+            _header_params['X-Json-Arg'] = _params['x_json_arg']
+
+        if _params['x_plain_arg'] is not None:
</file context>

)
"""

def testHeaderArg(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: testHeaderArg performs no checks, so this newly added test passes regardless of whether JSON-header behavior works. Add an active assertion that exercises the intended behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-httpx/test/test_header_arg.py, line 46:

<comment>`testHeaderArg` performs no checks, so this newly added test passes regardless of whether JSON-header behavior works. Add an active assertion that exercises the intended behavior.</comment>

<file context>
@@ -0,0 +1,52 @@
+        )
+        """
+
+    def testHeaderArg(self):
+        """Test HeaderArg"""
+        # inst_req_only = self.make_instance(include_optional=False)
</file context>


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_json_arg** | [**HeaderArg**](.md)| |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This type link resolves to .md instead of the sibling HeaderArg.md, so readers cannot open the model documentation. Link to HeaderArg.md.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-httpx2/docs/FakeApi.md, line 2308:

<comment>This type link resolves to `.md` instead of the sibling `HeaderArg.md`, so readers cannot open the model documentation. Link to `HeaderArg.md`.</comment>

<file context>
@@ -2265,6 +2266,69 @@ No authorization required
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **x_json_arg** | [**HeaderArg**](.md)|  | 
+ **x_plain_arg** | **str**|  | [optional] 
+
</file context>
Suggested change
**x_json_arg** | [**HeaderArg**](.md)| |
**x_json_arg** | [**HeaderArg**](HeaderArg.md)| |


def testHeaderArg(self):
"""Test HeaderArg"""
# inst_req_only = self.make_instance(include_optional=False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: testHeaderArg passes without exercising HeaderArg: both setup calls are commented out, and make_instance's construction code is also inside a string literal. Add an assertion that checks the intended header-argument behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-pydantic-v1/test/test_header_arg.py, line 49:

<comment>`testHeaderArg` passes without exercising `HeaderArg`: both setup calls are commented out, and `make_instance`'s construction code is also inside a string literal. Add an assertion that checks the intended header-argument behavior.</comment>

<file context>
@@ -0,0 +1,53 @@
+
+    def testHeaderArg(self):
+        """Test HeaderArg"""
+        # inst_req_only = self.make_instance(include_optional=False)
+        # inst_req_and_optional = self.make_instance(include_optional=True)
+
</file context>


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_json_arg** | [**HeaderArg**](.md)| |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This link resolves to .md, not the HeaderArg model documentation; change the target to HeaderArg.md.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-httpx-sync/docs/FakeApi.md, line 2376:

<comment>This link resolves to `.md`, not the `HeaderArg` model documentation; change the target to `HeaderArg.md`.</comment>

<file context>
@@ -2331,6 +2332,71 @@ No authorization required
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **x_json_arg** | [**HeaderArg**](.md)|  | 
+ **x_plain_arg** | **str**|  | [optional] 
+
</file context>
Suggested change
**x_json_arg** | [**HeaderArg**](.md)| |
**x_json_arg** | [**HeaderArg**](HeaderArg.md)| |


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_json_arg** | [**HeaderArg**](.md)| |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The HeaderArg type link points to .md, so readers cannot open the model documentation. Link it to HeaderArg.md.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md, line 2308:

<comment>The `HeaderArg` type link points to `.md`, so readers cannot open the model documentation. Link it to `HeaderArg.md`.</comment>

<file context>
@@ -2265,6 +2266,69 @@ No authorization required
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **x_json_arg** | [**HeaderArg**](.md)|  | 
+ **x_plain_arg** | **str**|  | [optional] 
+
</file context>
Suggested change
**x_json_arg** | [**HeaderArg**](.md)| |
**x_json_arg** | [**HeaderArg**](HeaderArg.md)| |


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_json_arg** | [**HeaderArg**](.md)| |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The HeaderArg type link points to .md instead of its generated HeaderArg.md page. Correct the link so readers can open the model documentation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md, line 2333:

<comment>The `HeaderArg` type link points to `.md` instead of its generated `HeaderArg.md` page. Correct the link so readers can open the model documentation.</comment>

<file context>
@@ -2286,6 +2287,72 @@ No authorization required
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **x_json_arg** | [**HeaderArg**](.md)|  | 
+ **x_plain_arg** | **str**|  | [optional] 
+
</file context>
Suggested change
**x_json_arg** | [**HeaderArg**](.md)| |
**x_json_arg** | [**HeaderArg**](HeaderArg.md)| |


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_json_arg** | [**HeaderArg**](.md)| |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The x_json_arg type link resolves to .md, so readers cannot open the HeaderArg schema. Link it to HeaderArg.md.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md, line 2333:

<comment>The `x_json_arg` type link resolves to `.md`, so readers cannot open the `HeaderArg` schema. Link it to `HeaderArg.md`.</comment>

<file context>
@@ -2286,6 +2287,72 @@ No authorization required
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **x_json_arg** | [**HeaderArg**](.md)|  | 
+ **x_plain_arg** | **str**|  | [optional] 
+
</file context>
Suggested change
**x_json_arg** | [**HeaderArg**](.md)| |
**x_json_arg** | [**HeaderArg**](HeaderArg.md)| |


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_json_arg** | [**HeaderArg**](.md)| |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The parameter docs link the HeaderArg model to .md, which is a broken link. Every other model reference in these docs uses the model filename (e.g. [**Pet**](Pet.md), [**OuterComposite**](OuterComposite.md)), so this is a new regression introduced by this endpoint. api_doc.mustache renders [**{{dataType}}**]({{baseType}}.md) and baseType resolves empty for this header parameter; the empty baseType should be fixed in the codegen instead of emitting .md. The broken link is emitted in all seven regenerated docs/FakeApi.md files (python, aiohttp, httpx, httpx2, httpx-sync, httpx2-sync, lazyImports, pydantic-v1, pydantic-v1-aiohttp).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At samples/openapi3/client/petstore/python/docs/FakeApi.md, line 2308:

<comment>The parameter docs link the `HeaderArg` model to `.md`, which is a broken link. Every other model reference in these docs uses the model filename (e.g. `[**Pet**](Pet.md)`, `[**OuterComposite**](OuterComposite.md)`), so this is a new regression introduced by this endpoint. `api_doc.mustache` renders `[**{{dataType}}**]({{baseType}}.md)` and `baseType` resolves empty for this header parameter; the empty baseType should be fixed in the codegen instead of emitting `.md`. The broken link is emitted in all seven regenerated `docs/FakeApi.md` files (python, aiohttp, httpx, httpx2, httpx-sync, httpx2-sync, lazyImports, pydantic-v1, pydantic-v1-aiohttp).</comment>

<file context>
@@ -2265,6 +2266,69 @@ No authorization required
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **x_json_arg** | [**HeaderArg**](.md)|  | 
+ **x_plain_arg** | **str**|  | [optional] 
+
</file context>

@wing328
wing328 merged commit 110b820 into master Oct 4, 2026
138 of 257 checks passed
@wing328
wing328 deleted the followup-25068 branch October 4, 2026 15:12
wing328 pushed a commit that referenced this pull request Oct 5, 2026
RFC3339InstantDeserializer.java and RFC3339JavaTimeModule.java were
accidentally committed in #25112. They are not produced by the generator
for this config (not listed in .openapi-generator/FILES) and use Jackson 2
packages, which breaks compilation of the Jackson 3 sample in the
"Samples Java Client JDK17" workflow.
rar91279 pushed a commit to rar91279/openapi-generator that referenced this pull request Oct 5, 2026
…PITools#25129)

RFC3339InstantDeserializer.java and RFC3339JavaTimeModule.java were
accidentally committed in OpenAPITools#25112. They are not produced by the generator
for this config (not listed in .openapi-generator/FILES) and use Jackson 2
packages, which breaks compilation of the Jackson 3 sample in the
"Samples Java Client JDK17" workflow.

(cherry picked from commit 2ca276c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant