Fix/issue 2261 by mromaszewicz · Pull Request #2262 · oapi-codegen/oapi-codegen

@mromaszewicz @claude

…r RequestObject

ParameterDefinition.JsonTag() only produced a `json:"..."` tag and
ignored x-oapi-codegen-extra-tags. This meant path parameters in
strict-server RequestObject structs never included extra struct tags,
even though query/header/cookie parameters did (via GenerateParamsTypes).

Update JsonTag() to read x-oapi-codegen-extra-tags from both the
parameter and schema levels, with parameter-level taking precedence,
matching the existing merge behavior in GenerateParamsTypes().

Fixes oapi-codegen#2261

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@jamietanna jamietanna linked an issue

Mar 2, 2026

that may be closed by this pull request