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.39k stars 6.47k forks source link

[REQ] Allow referencing vendor extensions at the path level #15436

Open averche opened 1 year ago

averche commented 1 year ago

Is your feature request related to a problem? Please describe.

I have the following two vendor extensions in my OpenAPI spec, x-foo-at-path-level and x-foo-at-operation-level:

    /pets:
      x-foo-at-path-level: true
      get:
        x-foo-at-operation-level: true
        responses:
          '200':
            description: A list of pets.
            content:
               ...

I'm able to reference x-foo-at-operation-level with the following in mustache:

{{#operations}}
  {{#operation}}
    {{vendorExtensions.x-foo-at-operation-level}} // able to reference this
  {{/operation}}
{{/operations}}

However, I'm not able to reference x-foo-at-path-level (or at least don't know how to).

Describe the solution you'd like

Please allow accessing the vendor extensions at the path level with {{../vendorExtensions.x-foo-at-path-level}} or similar syntax.

sachinsaxena-okta commented 10 months ago

Do you know if this works or any workaround ?