OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.84k stars 6.59k forks source link

[BUG] Vendor extensions on a parameter schema aren't available #9138

Open jparise opened 3 years ago

jparise commented 3 years ago
Description

Vendor extension properties on a Parameter's Schema Object aren't available (at least with the python-flask generator).

openapi-generator version

Version 5.1.0

OpenAPI declaration file content or url
param_id:
  name: param_id
  description: Unique identifier
  in: path
  required: true
  schema:
    type: string
    x-vendor-param:
      property: true
Generation Details

I inspected the debugging output (using --global-property debugOperations=true), and there is no vendorExtensions field under any of the *Params collections (e.g. allParams). I do see the raw content with the parameter's jsonSchema field, but that's not useful from within a template.

Suggest a fix

It would be useful if the extension properties were available as vendorExtensions like they are for other schema objects.

jparise commented 3 years ago

I looked at this more closely, and I think this is only "half" of a bug. The vendor extensions are available on the Parameter object, but there isn't any visibility into vendor extensions on the Parameter's Schema object.