Bug Report Checklist
Description
Vendor extensions added to the request body section of the specification are not available in mustache templates.
openapi-generator version
3.4.1
OpenAPI declaration file content or url
Command line used for generation
paths:
/users:
post:
summary: Adds a new user
requestBody:
x-foo: "extension" # <- not available in mustache templates
content:
application/json:
schema: # Request body contents
type: object
properties:
id:
type: integer
name:
type: string
example: # Sample object
id: 10
name: Jessica Smith
responses:
'200':
description: OK
Steps to reproduce
Generate server API from the snippet above, using a custom bodyParts.mustache template containing {{{vendorExtensions.x-foo}}}, which will be empty.
Related issues/PRs
Suggest a fix
DefaultCodegen.fromRequestBody should probably copy the vendor extensions from RequestBody to CodegenParameter
Bug Report Checklist
Description
Vendor extensions added to the request body section of the specification are not available in mustache templates.
openapi-generator version
3.4.1
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Generate server API from the snippet above, using a custom
bodyParts.mustachetemplate containing{{{vendorExtensions.x-foo}}}, which will be empty.Related issues/PRs
Suggest a fix
DefaultCodegen.fromRequestBodyshould probably copy the vendor extensions fromRequestBodytoCodegenParameter